]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/channels.h
More numerics.h conversion
[user/henk/code/inspircd.git] / include / channels.h
index bf06e760a98ab0445771b87bd4044eec0af8a361..2042df2209d31f51f72b9b839c02b5d5b6c84639 100644 (file)
@@ -137,12 +137,12 @@ class CoreExport Channel : public Extensible
        std::string name; /* CHANMAX */
 
        /** Modes for the channel.
-        * This is not a null terminated string! It is a hash where
+        * This is not a null terminated string! It is a bitset where
         * each item in it represents if a mode is set. For example
         * for mode +A, index 0. Use modechar-65 to calculate which
         * field to check.
         */
-       unsigned char modes[64];
+       std::bitset<64> modes;
 
        /** User lists.
         * There are four user lists, one for 
@@ -349,11 +349,11 @@ class CoreExport Channel : public Extensible
        /** Part a user from this channel with the given reason.
         * If the reason field is NULL, no reason will be sent.
         * @param user The user who is parting (must be on this channel)
-        * @param reason The (optional) part reason
+        * @param reason The part reason
         * @return The number of users left on the channel. If this is zero
         * when the method returns, you MUST delete the Channel immediately!
         */
-       long PartUser(User *user, const char* reason = NULL);
+       long PartUser(User *user, std::string &reason);
 
        /* Join a user to a channel. May be a channel that doesnt exist yet.
         * @param user The user to join to the channel.
@@ -535,6 +535,10 @@ class CoreExport Channel : public Extensible
         */
        bool IsExtBanned(User *u, char type);
 
+       /** Overloaded version to check whether a particular string is extbanned
+        */
+       bool IsExtBanned(const std::string &str, char type);
+
        /** Clears the cached max bans value
         */
        void ResetMaxBans();