From 0942fe7405f0ff38038f7445c241fdae0bd7d1a2 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 10 Jul 2006 17:21:26 +0000 Subject: Convert to templated GetExt git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4285 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_remove.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/modules/m_remove.cpp') 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); -- cgit v1.3.1-10-gc9f91