From: brain Date: Sun, 26 Nov 2006 18:12:50 +0000 (+0000) Subject: Update comments to reflect new API X-Git-Tag: v2.0.23~6572 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=0e8a71803850ca62e9c7fd1447714d7548184d95;p=user%2Fhenk%2Fcode%2Finspircd.git Update comments to reflect new API git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5807 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/include/channels.h b/include/channels.h index 70e5c2233..e382b73e1 100644 --- a/include/channels.h +++ b/include/channels.h @@ -395,7 +395,7 @@ class chanrec : public Extensible /** Write to a channel, from a server, using va_args for text * @param ServName Server name to prefix the line with - * @param text A printf-style format string which builds the output line without prefi + * @param text A printf-style format string which builds the output line without prefix * @param ... Zero or more POD type */ void WriteChannelWithServ(const char* ServName, const char* text, ...); @@ -406,19 +406,30 @@ class chanrec : public Extensible */ void WriteChannelWithServ(const char* ServName, const std::string &text); - /** Write to all users on a channel except a specific user, using va_args for text + /** Write to all users on a channel except a specific user, using va_args for text. + * Internally, this calls WriteAllExcept(). * @param user User whos details to prefix the line with, and to omit from receipt of the message * @param serversource If this parameter is true, use the local server name as the source of the text, otherwise, * use the nick!user@host of the user. * @param status The status of the users to write to, e.g. '@' or '%'. Use a value of 0 to write to everyone - * @param text A printf-style format string which builds the output line without prefi + * @param text A printf-style format string which builds the output line without prefix * @param ... Zero or more POD type */ void WriteAllExceptSender(userrec* user, bool serversource, char status, char* text, ...); + /** Write to all users on a channel except a list of users, using va_args for text + * @param user User whos details to prefix the line with, and to omit from receipt of the message + * @param serversource If this parameter is true, use the local server name as the source of the text, otherwise, + * use the nick!user@host of the user. + * @param status The status of the users to write to, e.g. '@' or '%'. Use a value of 0 to write to everyone + * @param except_list A list of users NOT to send the text to + * @param text A printf-style format string which builds the output line without prefix + * @param ... Zero or more POD type + */ void WriteAllExcept(userrec* user, bool serversource, char status, CUList &except_list, char* text, ...); - /** Write to all users on a channel except a specific user, using std::string for text + /** Write to all users on a channel except a specific user, using std::string for text. + * Internally, this calls WriteAllExcept(). * @param user User whos details to prefix the line with, and to omit from receipt of the message * @param serversource If this parameter is true, use the local server name as the source of the text, otherwise, * use the nick!user@host of the user. @@ -427,6 +438,14 @@ class chanrec : public Extensible */ void WriteAllExceptSender(userrec* user, bool serversource, char status, const std::string& text); + /** Write to all users on a channel except a list of users, using std::string for text + * @param user User whos details to prefix the line with, and to omit from receipt of the message + * @param serversource If this parameter is true, use the local server name as the source of the text, otherwise, + * use the nick!user@host of the user. + * @param status The status of the users to write to, e.g. '@' or '%'. Use a value of 0 to write to everyone + * @param except_list A list of users NOT to send the text to + * @param text A std::string containing the output line without prefix + */ void WriteAllExcept(userrec* user, bool serversource, char status, CUList &except_list, const std::string& text); /** Returns the maximum number of bans allowed to be set on this channel diff --git a/include/modules.h b/include/modules.h index 57fbc03b6..deb7dcf22 100644 --- a/include/modules.h +++ b/include/modules.h @@ -611,6 +611,8 @@ class Module : public Extensible * @param target_type The type of target (TYPE_USER or TYPE_CHANNEL) * @param text Changeable text being sent by the user * @param status The status being used, e.g. PRIVMSG @#chan has status== '@', 0 to send to everyone. + * @param exempt_list A list of users not to send to. For channel messages, this will usually contain just the sender. + * It will be ignored for private messages. * @return 1 to deny the NOTICE, 0 to allow it */ virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text,char status, CUList &exempt_list); @@ -630,6 +632,8 @@ class Module : public Extensible * @param target_type The type of target (TYPE_USER or TYPE_CHANNEL) * @param text Changeable text being sent by the user * @param status The status being used, e.g. PRIVMSG @#chan has status== '@', 0 to send to everyone. + * @param exempt_list A list of users not to send to. For channel notices, this will usually contain just the sender. + * It will be ignored for private notices. * @return 1 to deny the NOTICE, 0 to allow it */ virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text,char status, CUList &exempt_list);