From 6f1b8f50dd8a9f73c9e02e64253e7e45642a88d0 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 8 Aug 2006 12:52:24 +0000 Subject: 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 --- include/channels.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include/channels.h') 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); -- cgit v1.2.3