summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-08 12:52:24 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-08 12:52:24 +0000
commit6f1b8f50dd8a9f73c9e02e64253e7e45642a88d0 (patch)
tree4cb07b9523faaaa9cfd9c43f4f904203231328f3 /include
parent7a3907f0518238402a4ea592fe5fb18849a833c5 (diff)
Change to chanrec::PartUser. As with KickUser and ServerKickUser, returns the number of users left, if it returns 0, delete the chanrec
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4786 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/channels.h11
-rw-r--r--include/modules.h7
2 files changed, 10 insertions, 8 deletions
diff --git a/include/channels.h b/include/channels.h
index 444adf64f..906297104 100644
--- a/include/channels.h
+++ b/include/channels.h
@@ -263,6 +263,15 @@ class chanrec : public Extensible
*/
long ServerKickUser(userrec* user, const char* reason, bool triggerevents);
+ /* 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
+ * @return The number of users left on the channel. If this is zero
+ * when the method returns, you MUST delete the chanrec immediately!
+ */
+ long PartUser(userrec *user, const char* reason = NULL);
+
/** Destructor for chanrec
*/
virtual ~chanrec() { /* stub */ }
@@ -304,7 +313,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);
+//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);
diff --git a/include/modules.h b/include/modules.h
index 25fb52077..39265fcee 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -1520,13 +1520,6 @@ class Server : public Extensible
*/
virtual chanrec* JoinUserToChannel(userrec* user, const std::string &cname, const std::string &key);
- /** Forces a user to part a channel.
- * This is similar to svspart and can be used to implement redirection, etc.
- * Although the return value of this function is a pointer to a channel record, the returned data is
- * undefined and should not be read or written to. This behaviour may be changed in a future version.
- */
- virtual chanrec* PartUserFromChannel(userrec* user, const std::string &cname, const std::string &reason);
-
/** Forces a user nickchange.
* This command works similarly to SVSNICK, and can be used to implement Q-lines etc.
* If you specify an invalid nickname, the nick change will be dropped and the target user will receive