]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/users.h
Fix timedbans bug reported by jamie
[user/henk/code/inspircd.git] / include / users.h
index 83ea9bf3f4198a5d470f8e9fc03cf9d438d25720..4633f1cd293322df1d990b90855ab8a89acfc622 100644 (file)
@@ -46,6 +46,7 @@ enum UserModes {
        UM_WALLOPS = 'w'-65,
        UM_INVISIBLE = 'i'-65,
        UM_OPERATOR = 'o'-65,
+       UM_SNOMASK = 'n'-65,
 };
 
 enum RegistrationState {
@@ -170,6 +171,10 @@ class userrec : public connection
         * channels are removed from this list.
         */
        InvitedList invites;
+
+       /** Number of channels this user is currently on
+        */
+       unsigned int ChannelCount;
  public:
        /** Resolvers for looking up this users IP address
         * This will occur if and when res_reverse completes.
@@ -372,9 +377,11 @@ class userrec : public connection
 
        /** Process a snomask modifier string, e.g. +abc-de
         * @param sm A sequence of notice mask characters
-        * @return True if the notice masks were successfully applied
+        * @return The cleaned mode sequence which can be output,
+        * e.g. in the above example if masks c and e are not
+        * valid, this function will return +ab-d
         */
-       bool userrec::ProcessNoticeMasks(const char *sm);
+       std::string ProcessNoticeMasks(const char *sm);
 
        /** Returns true if a notice mask is set
         * @param sm A notice mask character to check
@@ -715,6 +722,12 @@ class userrec : public connection
         */
        int CountChannels();
 
+       /** Modify the number of channels this user is on (used by CountChannels).
+        * Pass a positive number to increment the counter, or a negative number
+        * to decrement it.
+        */
+       void ModChannelCount(int n);
+
        /** Send a notice to all local users from this user
         * @param text The text format string to send
         * @param ... Format arguments