diff options
author | Adam <Adam@anope.org> | 2011-04-22 03:16:11 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-05-16 04:06:17 -0400 |
commit | c8c23158a4ff74822d6c7d201dc53d879e3d91e8 (patch) | |
tree | 4bc9ae029691d5e7c03ebc1481683a010b733844 /modules/core/os_mode.cpp | |
parent | 1782ce260c5bc214ec0b2e39257ab1371b68ae9c (diff) |
Moved the core pseudo clients out into their own modules
Diffstat (limited to 'modules/core/os_mode.cpp')
-rw-r--r-- | modules/core/os_mode.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/core/os_mode.cpp b/modules/core/os_mode.cpp index 476eef032..5efed5383 100644 --- a/modules/core/os_mode.cpp +++ b/modules/core/os_mode.cpp @@ -12,6 +12,7 @@ /*************************************************************************/ #include "module.h" +#include "operserv.h" class CommandOSMode : public Command { @@ -36,7 +37,7 @@ class CommandOSMode : public Command source.Reply(_("Services is unable to change modes. Are your servers' U:lines configured correctly?")); else { - c->SetModes(OperServ, false, modes.c_str()); + c->SetModes(operserv->Bot(), false, modes.c_str()); Log(LOG_ADMIN, u, this) << modes << " on " << target; } @@ -48,10 +49,10 @@ class CommandOSMode : public Command source.Reply(_(NICK_X_NOT_IN_USE), target.c_str()); else { - u2->SetModes(OperServ, "%s", modes.c_str()); + u2->SetModes(operserv->Bot(), "%s", modes.c_str()); source.Reply(_("Changed usermodes of \002%s\002 to %s."), u2->nick.c_str(), modes.c_str()); - u2->SendMessage(OperServ, _("\002%s\002 changed your usermodes to %s."), u->nick.c_str(), modes.c_str()); + u2->SendMessage(operserv->Bot(), _("\002%s\002 changed your usermodes to %s."), u->nick.c_str(), modes.c_str()); Log(LOG_ADMIN, u, this) << modes << " on " << target; } @@ -86,7 +87,10 @@ class OSMode : public Module this->SetAuthor("Anope"); this->SetType(CORE); - this->AddCommand(OperServ, &commandosmode); + if (!operserv) + throw ModuleException("OperServ is not loaded!"); + + this->AddCommand(operserv->Bot(), &commandosmode); } }; |