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=g" + temp1;
- }
- temp2 = temp2 + temp1 + " ";
- }
- if (temp2.length())
- output = temp2.substr(0,temp2.length()-1);
+ InsertMode(output,"g",1);
}
virtual void OnUserPart(userrec* user, chanrec* channel, std::string partreason)
{
if (line.find(*i) != std::string::npos)
{
- WriteServ(user->fd,"936 %s %s :Your message contained a censored word, and was blocked",user->nick, chan->name);
+ WriteServ(user->fd,"936 %s %s %s :Your message contained a censored word, and was blocked",user->nick, chan->name, i->c_str());
return 1;
}
}
return 0;
}
- 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)
{
else return 0;
}
- 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)
- {
- return ProcessMessages(user,(chanrec*)dest,text);
- }
- else return 0;
+ return OnUserPreMessage(user,dest,target_type,text,status);
}
virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list ¶ms)