virtual void On005Numeric(std::string &output)
{
- std::stringstream line(output);
- std::string temp1, temp2;
- while (!line.eof())
- {
- line >> temp1;
- if (temp1.substr(0,10) == "CHANMODES=")
- {
- // append the chanmode to the end
- temp1 = temp1.substr(10,temp1.length());
- temp1 = "CHANMODES=" + temp1 + "C";
- }
- temp2 = temp2 + temp1 + " ";
- }
- if (temp2.length())
- output = temp2.substr(0,temp2.length()-1);
+ InsertMode(output,"C",4);
}
- 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)
{
- if (target_type == TYPE_CHANNEL)
- {
- chanrec* c = (chanrec*)dest;
- if (c->IsCustomModeSet('C'))
- {
- if ((text.length()) && (text[0] == '\1'))
- {
- if (strncmp(text.c_str(),"\1ACTION ",8))
- {
- WriteServ(user->fd,"492 %s %s :Can't send CTCP to channel (+C set)",user->nick, c->name);
- return 1;
- }
- }
- }
- }
- return 0;
+ return OnUserPreNotice(user,dest,target_type,text,status);
}
- 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)
{
if (target_type == TYPE_CHANNEL)
{