X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fmodules.h;h=2ba139e7eb463fb24b847dbb3f764c170f8ff16f;hb=8869f710e51a459ccf22a8b73a1c45d33237c973;hp=12df69a211159ab245917440d177a71c11213be0;hpb=9ebbd138cc41fdd89d32b1bcbd137be4f89afa5e;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/modules.h b/include/modules.h index 12df69a21..2ba139e7e 100644 --- a/include/modules.h +++ b/include/modules.h @@ -462,7 +462,7 @@ class Module : public classbase * @param user The user being kicked * @param chan The channel the user is being kicked from * @param reason The kick reason - * @return 1 to prevent the kick, 0 to allow it + * @return 1 to prevent the kick, 0 to continue normally, -1 to explicitly allow the kick regardless of normal operation */ virtual int OnUserPreKick(userrec* source, userrec* user, chanrec* chan, std::string reason); @@ -544,9 +544,10 @@ class Module : public classbase * @param dest The target of the message (chanrec* or userrec*) * @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. * @return 1 to deny the NOTICE, 0 to allow it */ - virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text); + virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text,char status); /** Called whenever a user is about to NOTICE A user or a channel, before any processing is done. * Returning any nonzero value from this function stops the process immediately, causing no @@ -562,9 +563,10 @@ class Module : public classbase * @param dest The target of the message (chanrec* or userrec*) * @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. * @return 1 to deny the NOTICE, 0 to allow it */ - virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text); + virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text,char status); /** Called before any nickchange, local or remote. This can be used to implement Q-lines etc. * Please note that although you can see remote nickchanges through this function, you should