]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/channels.h
kick_channel -> chanrec::KickUser(), server_kick_channel -> chanrec::ServerKickUser()
[user/henk/code/inspircd.git] / include / channels.h
index 76b60466887fe0ab6ac1b686a2cc7a386d2b4e5c..444adf64fae150bee741c12f77d217457decdbcf 100644 (file)
@@ -166,14 +166,14 @@ class chanrec : public Extensible
         * @param mode The mode character to set or unset
         * @param mode_on True if you want to set the mode or false if you want to remove it
         */
-       void SetCustomMode(char mode,bool mode_on);
+       void SetMode(char mode,bool mode_on);
 
        /** Sets or unsets the parameters for a custom mode in a channels info
         * @param mode The mode character to set or unset
         * @param parameter The parameter string to associate with this mode character
         * @param mode_on True if you want to set the mode or false if you want to remove it
         */
-       void SetCustomModeParam(char mode,char* parameter,bool mode_on);
+       void SetModeParam(char mode,const char* parameter,bool mode_on);
  
        /** Returns true if a mode is set on a channel
          * @param mode The mode character you wish to query
@@ -245,6 +245,24 @@ class chanrec : public Extensible
         */
        chanrec();
 
+       /* Make src kick user from this channel with the given reason.
+        * @param src The source of the kick
+        * @param user The user being kicked (must be on this channel)
+        * @param reason The reason for the kick
+        * @return The number of users left on the channel. If this is zero
+        * when the method returns, you MUST delete the chanrec immediately!
+        */
+       long KickUser(userrec *src, userrec *user, const char* reason);
+
+       /* Make the server kick user from this channel with the given reason.
+        *  @param user The user being kicked (must be on this channel)
+        *  @param reason The reason for the kick
+        *  @param triggerevents True if you wish this kick to trigger module events
+        *  @return The number of users left on the channel. If this is zero
+        *  when the method returns, you MUST delete the chanrec immediately!
+        */
+       long ServerKickUser(userrec* user, const char* reason, bool triggerevents);
+
        /** Destructor for chanrec
         */
        virtual ~chanrec() { /* stub */ }
@@ -287,7 +305,7 @@ class ucrec : public classbase
 
 chanrec* add_channel(userrec *user, const char* cn, const char* key, bool override);
 chanrec* del_channel(userrec *user, const char* cname, const char* reason, bool local);
-void kick_channel(userrec *src,userrec *user, chanrec *Ptr, char* reason);
-void server_kick_channel(userrec* user, chanrec* Ptr, char* reason, bool triggerevents);
+//void kick_channel(userrec *src,userrec *user, chanrec *Ptr, char* reason);
+//void server_kick_channel(userrec* user, chanrec* Ptr, char* reason, bool triggerevents);
 
 #endif