Browse Source

m_commandsno: Might be een g0ed idea to exclude some commands lel

Wazakindjes 3 years ago
parent
commit
5cb0ed8a44
1 changed files with 3 additions and 1 deletions
  1. 3 1
      u4/m_commandsno.c

+ 3 - 1
u4/m_commandsno.c

@@ -38,7 +38,7 @@ static ModuleInfo *MyModInfo;
 
 ModuleHeader MOD_HEADER(commandsno) = {
 	"m_commandsno",
-	"$Id: v1.01 2017/11/26 Gottem$",
+	"$Id: v1.02 2018/12/01 Gottem$",
 	"Adds snomask +C: lets IRC operators see command usages",
 	"3.2-b8-1",
 	NULL
@@ -72,6 +72,8 @@ MOD_LOAD(m_commandsno) {
 
 		tmp = strdup(cmdlist);
 		for(cmd = strtoken(&p, tmp, ","); cmd; cmd = strtoken(&p, NULL, ",")) {
+			if(!stricmp(cmd, "PRIVMSG") || !stricmp(cmd, "NOTICE"))
+				continue;
 			ovr = CmdoverrideAdd(MyModInfo->handle, cmd, commandsno_override_cmd);
 			if(ModuleGetError(MyModInfo->handle) != MODERR_NOERROR || !ovr) {
 				config_error("Error replacing command %s when loading module %s: %s", cmd, MOD_HEADER(commandsno).name, ModuleGetErrorStr(MyModInfo->handle));