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/cs_invite.cpp | |
parent | 1782ce260c5bc214ec0b2e39257ab1371b68ae9c (diff) |
Moved the core pseudo clients out into their own modules
Diffstat (limited to 'modules/core/cs_invite.cpp')
-rw-r--r-- | modules/core/cs_invite.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/modules/core/cs_invite.cpp b/modules/core/cs_invite.cpp index efafdeedd..e7bcbbdab 100644 --- a/modules/core/cs_invite.cpp +++ b/modules/core/cs_invite.cpp @@ -12,13 +12,14 @@ /*************************************************************************/ #include "module.h" +#include "chanserv.h" class CommandCSInvite : public Command { public: CommandCSInvite() : Command("INVITE", 1, 3) { - this->SetDesc(_("Tells ChanServ to invite you into a channel")); + this->SetDesc(Anope::printf(_("Tells %s to invite you into a channel"), Config->s_ChanServ.c_str())); } CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) @@ -62,9 +63,9 @@ class CommandCSInvite : public Command source.Reply(_("You are already in \002%s\002! "), c->name.c_str()); else { - ircdproto->SendInvite(whosends(ci), chan, u2->nick); + ircdproto->SendInvite(ci->WhoSends(), chan, u2->nick); source.Reply(_("\002%s\002 has been invited to \002%s\002."), u2->nick.c_str(), c->name.c_str()); - u2->SendMessage(whosends(ci), _("You have been invited to \002%s\002."), c->name.c_str()); + u2->SendMessage(ci->WhoSends(), _("You have been invited to \002%s\002."), c->name.c_str()); } return MOD_CONT; } @@ -76,7 +77,7 @@ class CommandCSInvite : public Command "Tells %s to invite you into the given channel.\n" " \n" "By default, limited to AOPs or those with level 5 and above\n" - "on the channel."), ChanServ->nick.c_str()); + "on the channel."), Config->s_ChanServ.c_str()); return true; } @@ -96,7 +97,10 @@ class CSInvite : public Module this->SetAuthor("Anope"); this->SetType(CORE); - this->AddCommand(ChanServ, &commandcsinvite); + if (!chanserv) + throw ModuleException("ChanServ is not loaded!"); + + this->AddCommand(chanserv->Bot(), &commandcsinvite); } }; |