summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_alias.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index fc07b5f2d..bf085fcc0 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -37,6 +37,8 @@ class Alias : public classbase
std::string requires;
/** Alias requires ulined server */
bool uline;
+ /** Requires oper? */
+ bool operonly;
};
class ModuleAlias : public Module
@@ -60,7 +62,7 @@ class ModuleAlias : public Module
a.replace_with = MyConf.ReadValue("alias", "replace", i);
a.requires = MyConf.ReadValue("alias", "requires", i);
a.uline = MyConf.ReadFlag("alias", "uline", i);
-
+ a.operonly = MyConf.ReadFlag("alias", "operonly", i);
Aliases.push_back(a);
}
@@ -144,6 +146,9 @@ class ModuleAlias : public Module
{
if (Aliases[i].text == c)
{
+ if ((Aliases[i].operonly) && (!*user->oper))
+ return 0;
+
if (Aliases[i].requires != "")
{
u = ServerInstance->FindNick(Aliases[i].requires);