aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_serverbots.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_serverbots.cpp')
-rw-r--r--src/modules/m_serverbots.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/m_serverbots.cpp b/src/modules/m_serverbots.cpp
index 47f728249..51dd2ae8e 100644
--- a/src/modules/m_serverbots.cpp
+++ b/src/modules/m_serverbots.cpp
@@ -37,6 +37,9 @@ class Alias
/** RequiredNick must be on a ulined server */
bool ULineOnly;
+ /** Requires oper? */
+ bool OperOnly;
+
/** Format that must be matched for use */
std::string format;
};
@@ -129,6 +132,9 @@ class BotData
return false;
}
+ if ((a->OperOnly) && (!IS_OPER(user)))
+ return 0;
+
if (!a->RequiredNick.empty())
{
User* u = ServerInstance->FindNick(a->RequiredNick);
@@ -334,6 +340,7 @@ class ModuleServerBots : public Module
tag->readString("replace", a.ReplaceFormat, true);
a.RequiredNick = tag->getString("requires");
a.ULineOnly = tag->getBool("uline");
+ a.OperOnly = tag->getBool("operonly");
a.format = tag->getString("format");
bot->Aliases.insert(std::make_pair(a.AliasedCommand, a));