cmd_shun* mycommand;
ShunFactory *f;
std::map<std::string, bool> ShunEnabledCommands;
+ bool NotifyOfShun;
public:
ModuleShun(InspIRCd* Me) : Module(Me)
cmds = "PING PONG QUIT";
ShunEnabledCommands.clear();
+ NotifyOfShun = true;
std::stringstream dcmds(cmds);
std::string thiscmd;
{
ShunEnabledCommands[thiscmd] = true;
}
+
+ NotifyOfShun = MyConf.ReadFlag("shun", "notifyuser", "yes", 0);
}
virtual void OnUserConnect(User* user)
std::map<std::string, bool>::iterator i = ShunEnabledCommands.find(command);
if (i == ShunEnabledCommands.end())
+ {
+ user->WriteServ("NOTICE %s :*** Command %s not processed, as you have been blocked from issuing commands (SHUN)", user->nick.c_str(), command.c_str());
return 1;
+ }
if (command == "QUIT")
{