diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-03-30 14:47:29 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-03-30 14:47:29 +0000 |
commit | 6c31213a38a5f136bebe4cdbc9dea66031e9b26c (patch) | |
tree | 9a3308b94f3586b816ca5005f15d694717021f75 /src/modules | |
parent | dcc778ed46ba8c1bdeffd37bd6cd287efbba2868 (diff) |
More docs on data structures
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9226 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_watch.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index 40c055979..d94796a20 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -15,6 +15,32 @@ /* $ModDesc: Provides support for the /WATCH command */ + +/* + * Okay, it's nice that this was documented and all, but I at least understood very little + * of it, so I'm going to attempt to explain the data structures in here a bit more. + * + * For efficiency, many data structures are kept. + * + * The first is a global list `watchentries': + * hash_map<irc::string, std::deque<User*> > + * + * That is, if nick 'w00t' is being watched by user pointer 'Brain' and 'Om', <w00t, (Brain, Om)> + * will be in the watchentries list. + * + * The second is that each user has a per-user data structure attached to their user record via Extensible: + * std::map<irc::string, std::string> watchlist; + * So, in the above example with w00t watched by Brain and Om, we'd have: + * Brain- + * `- w00t + * Om- + * `- w00t + * + * Hopefully this helps any brave soul that ventures into this file other than me. :-) + * -- w00t (mar 30, 2008) + */ + + /* This module has been refactored to provide a very efficient (in terms of cpu time) * implementation of /WATCH. * |