summaryrefslogtreecommitdiff
path: root/src/modules/m_botmode.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-09 13:41:29 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-09 13:41:29 +0000
commit6dfc98470938a932ddee0100f515658dffe94438 (patch)
treef496107a29fe8f32778f30e00eff0401937836b9 /src/modules/m_botmode.cpp
parent0b5f8887db6916c367975146e12e157b4b1ceae3 (diff)
Stripcolor not finished yet.
Add security check into censor and botmode (om you will need this in cloaking) which prevents non-opers from changing other users modes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4213 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_botmode.cpp')
-rw-r--r--src/modules/m_botmode.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp
index f56db1e8b..57ab1e91c 100644
--- a/src/modules/m_botmode.cpp
+++ b/src/modules/m_botmode.cpp
@@ -32,6 +32,10 @@ class BotMode : public ModeHandler
ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
{
+ /* Only opers can change other users modes */
+ if ((source != dest) && (!*source->oper))
+ return MODEACTION_DENY;
+
if (adding)
{
if (!dest->IsModeSet('B'))