diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-02-08 16:28:03 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-02-08 16:28:03 +0000 |
commit | ed809c886f3791801dc6e77443b50ac2ffd5e71d (patch) | |
tree | b799939e220e370119c895148c0b280fbe73b2fd /src | |
parent | 538f14e515ff06fbf2f22901e05c55cd0c11dce4 (diff) |
Apply patch for bug #704 from Darom, shun:affectopers option -- Thanks!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11057 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-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()) |