diff options
Diffstat (limited to 'src/modules/m_shun.cpp')
-rw-r--r-- | src/modules/m_shun.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index 1127d397d..c007228e3 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -160,6 +160,7 @@ class ModuleShun : public Module ShunFactory *f; std::set<std::string> ShunEnabledCommands; bool NotifyOfShun; + bool affectopers; public: ModuleShun(InspIRCd* Me) : Module(Me) @@ -200,6 +201,7 @@ class ModuleShun : public Module ShunEnabledCommands.clear(); NotifyOfShun = true; + affectopers = false; std::stringstream dcmds(cmds); std::string thiscmd; @@ -210,6 +212,7 @@ class ModuleShun : public Module } NotifyOfShun = MyConf.ReadFlag("shun", "notifyuser", "yes", 0); + affectopers = MyConf.ReadFlag("shun", "affectopers", "no", 0); } virtual void OnUserConnect(User* user) @@ -239,6 +242,12 @@ class ModuleShun : public Module return 0; } + if (!affectopers && IS_OPER(user)) + { + /* Don't do anything if the user is an operator and affectopers isn't set */ + return 0; + } + std::set<std::string>::iterator i = ShunEnabledCommands.find(command); if (i == ShunEnabledCommands.end()) |