summaryrefslogtreecommitdiff
path: root/src/modules/m_remove.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_remove.cpp')
-rw-r--r--src/modules/m_remove.cpp12
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);