diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-27 19:40:47 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-27 19:40:47 +0000 |
commit | a1f073f66f4b985bf776b9be2015136209c0c311 (patch) | |
tree | 1413b1367e52ece46803c5d8fb57325c5ebbfd22 /include/mode.h | |
parent | 98a92e20f1fa4a9c7e5749e063414483d4615c2e (diff) |
Change std::pair<bool,std::string> to neater typedef "ModePair"
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4557 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/mode.h')
-rw-r--r-- | include/mode.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/mode.h b/include/mode.h index 6e2f03788..58586a001 100644 --- a/include/mode.h +++ b/include/mode.h @@ -55,6 +55,13 @@ enum ModeMasks { MASK_CHANNEL = 0 /* A channel mode */ }; +/** + * Used by ModeHandler::ModeSet() to return the state of a mode upon a channel or user. + * The pair contains an activity flag, true if the mode is set with the given parameter, + * and the parameter of the mode (or the parameter provided) in the std::string. + */ +typedef std::pair<bool,std::string> ModePair; + /** Each mode is implemented by ONE ModeHandler class. * You must derive ModeHandler and add the child class to * the list of modes handled by the ircd, using @@ -172,7 +179,8 @@ class ModeHandler : public Extensible /** * If your mode needs special action during a server sync to determine which side wins when comparing timestamps, * override this function and use it to return true or false. The default implementation just returns true if - * theirs < ours. + * theirs < ours. This will only be called for non-listmodes with parameters, when adding the mode and where + * theirs == ours (therefore the default implementation will always return false). * @param theirs The timestamp of the remote side * @param ours The timestamp of the local side * @param their_param Their parameter if the mode has a parameter @@ -195,7 +203,7 @@ class ModeHandler : public Extensible * the current setting for this mode set locally, when the bool is true, or, the parameter given. * This allows the local server to enforce our locally set parameters back to a remote server. */ - virtual std::pair<bool,std::string> ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string ¶meter); + virtual ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string ¶meter); }; /** |