summaryrefslogtreecommitdiff
path: root/src/modules/m_botmode.cpp
diff options
context:
space:
mode:
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'))