diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-10 17:21:26 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-10 17:21:26 +0000 |
commit | 0942fe7405f0ff38038f7445c241fdae0bd7d1a2 (patch) | |
tree | 2d386c188161a949e7c32e28744a097c0d06247c /src/modules/m_remove.cpp | |
parent | 3eefd1dfbdf611e526670b89dbd738e17c392c2c (diff) |
Convert to templated GetExt
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4285 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_remove.cpp')
-rw-r--r-- | src/modules/m_remove.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index aa8246464..d865066b3 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -60,6 +60,7 @@ class cmd_remove : public command_t userrec* target; chanrec* channel; int tlevel, ulevel; + char* dummy; std::string tprivs, uprivs, reason; @@ -102,16 +103,19 @@ class cmd_remove : public command_t /* This is adding support for the +q and +a channel modes, basically if they are enabled, and the remover has them set. */ /* Then we change the @|%|+ to & if they are +a, or ~ if they are +q */ + + std::string protect = "cm_protect_" + std::string(channel->name); + std::string founder = "cm_founder_"+std::string(channel->name); - if (user->GetExt("cm_protect_" + std::string(channel->name))) + if (user->GetExt(protect, dummy)) uprivs = "&"; - if (user->GetExt("cm_founder_"+std::string(channel->name))) + if (user->GetExt(founder, dummy)) uprivs = "~"; /* Now it's the same idea, except for the target */ - if (target->GetExt("cm_protect_"+std::string(channel->name))) + if (target->GetExt(protect, dummy)) tprivs = "&"; - if (target->GetExt("cm_founder_"+std::string(channel->name))) + if (target->GetExt(founder, dummy)) tprivs = "~"; tlevel = chartolevel(tprivs); |