* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
/* $ModDesc: Adds user mode +c, which if set, users must be on a common channel with you to private message you */
/* $ModDesc: Adds user mode +c, which if set, users must be on a common channel with you to private message you */
public:
PrivacyMode(InspIRCd* Instance) : ModeHandler(Instance, 'c', 0, 0, false, MODETYPE_USER, false) { }
public:
PrivacyMode(InspIRCd* Instance) : ModeHandler(Instance, 'c', 0, 0, false, MODETYPE_USER, false) { }
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool)
- return Version(1,1,0,0, VF_COMMON|VF_VENDOR, API_VERSION);
+ return Version("$Id$", VF_COMMON|VF_VENDOR, API_VERSION);
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
- user->WriteServ("531 %s %s :You are not permitted to send private messages to this user (+c set)", user->nick, t->nick);
+ user->WriteNumeric(ERR_CANTSENDTOUSER, "%s %s :You are not permitted to send private messages to this user (+c set)", user->nick.c_str(), t->nick.c_str());
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
+ virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
return OnUserPreMessage(user, dest, target_type, text, status, exempt_list);
}
{
return OnUserPreMessage(user, dest, target_type, text, status, exempt_list);
}