summaryrefslogtreecommitdiff
path: root/modules/core/os_set.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-04-22 03:16:11 -0400
committerAdam <Adam@anope.org>2011-05-16 04:06:17 -0400
commitc8c23158a4ff74822d6c7d201dc53d879e3d91e8 (patch)
tree4bc9ae029691d5e7c03ebc1481683a010b733844 /modules/core/os_set.cpp
parent1782ce260c5bc214ec0b2e39257ab1371b68ae9c (diff)
Moved the core pseudo clients out into their own modules
Diffstat (limited to 'modules/core/os_set.cpp')
-rw-r--r--modules/core/os_set.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/core/os_set.cpp b/modules/core/os_set.cpp
index cb50aa8fe..de622537d 100644
--- a/modules/core/os_set.cpp
+++ b/modules/core/os_set.cpp
@@ -12,6 +12,7 @@
/*************************************************************************/
#include "module.h"
+#include "operserv.h"
class CommandOSSet : public Command
{
@@ -84,14 +85,14 @@ class CommandOSSet : public Command
u->isSuperAdmin = 1;
source.Reply(_("You are now a SuperAdmin"));
Log(LOG_ADMIN, u, this) << "SUPERADMIN ON";
- ircdproto->SendGlobops(OperServ, GetString(NULL, _("%s is now a Super-Admin")).c_str(), u->nick.c_str());
+ ircdproto->SendGlobops(operserv->Bot(), _("%s is now a Super-Admin"), u->nick.c_str());
}
else if (setting.equals_ci("OFF"))
{
u->isSuperAdmin = 0;
source.Reply(_("You are no longer a SuperAdmin"));
Log(LOG_ADMIN, u, this) << "SUPERADMIN OFF";
- ircdproto->SendGlobops(OperServ, GetString(NULL, _("%s is no longer a Super-Admin")).c_str(), u->nick.c_str());
+ ircdproto->SendGlobops(operserv->Bot(), _("%s is no longer a Super-Admin"), u->nick.c_str());
}
else
source.Reply(_("Setting for SuperAdmin must be \002on\002 or \002off\002 (must be enabled in services.conf)"));
@@ -206,7 +207,7 @@ class CommandOSSet : public Command
" LIST List the options"));
else if (subcommand.equals_ci("LIST"))
source.Reply(_("Syntax: \002SET LIST\n"
- "Display the various %s settings"), OperServ->nick.c_str());
+ "Display the various %s settings"), Config->s_OperServ.c_str());
else if (subcommand.equals_ci("READONLY"))
source.Reply(_("Syntax: \002SET READONLY {ON | OFF}\002\n"
" \n"
@@ -255,7 +256,10 @@ class OSSet : public Module
this->SetAuthor("Anope");
this->SetType(CORE);
- this->AddCommand(OperServ, &commandosset);
+ if (!operserv)
+ throw ModuleException("OperServ is not loaded!");
+
+ this->AddCommand(operserv->Bot(), &commandosset);
}
};