summaryrefslogtreecommitdiff
path: root/modules/core/cs_akick.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/cs_akick.cpp
parent1782ce260c5bc214ec0b2e39257ab1371b68ae9c (diff)
Moved the core pseudo clients out into their own modules
Diffstat (limited to 'modules/core/cs_akick.cpp')
-rw-r--r--modules/core/cs_akick.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/core/cs_akick.cpp b/modules/core/cs_akick.cpp
index 4584ac6b5..e168bdb67 100644
--- a/modules/core/cs_akick.cpp
+++ b/modules/core/cs_akick.cpp
@@ -12,6 +12,7 @@
/*************************************************************************/
#include "module.h"
+#include "chanserv.h"
/* Split a usermask up into its constitutent parts. Returned strings are
* malloc()'d, and should be free()'d when done with. Returns "*" for
@@ -532,7 +533,7 @@ class CommandCSAKick : public Command
"When akicking a \037registered nick\037 the nickserv account\n"
"will be added to the akick list instead of the mask.\n"
"All users within that nickgroup will then be akicked.\n"),
- ChanServ->nick.c_str());
+ Config->s_ChanServ.c_str());
source.Reply(_(
" \n"
"The \002AKICK DEL\002 command removes the given nick or mask\n"
@@ -552,7 +553,7 @@ class CommandCSAKick : public Command
"AKICK mask.\n"
" \n"
"The \002AKICK CLEAR\002 command clears all entries of the\n"
- "akick list."), ChanServ->nick.c_str());
+ "akick list."), Config->s_ChanServ.c_str());
return true;
}
@@ -572,7 +573,10 @@ class CSAKick : public Module
this->SetAuthor("Anope");
this->SetType(CORE);
- this->AddCommand(ChanServ, &commandcsakick);
+ if (!chanserv)
+ throw ModuleException("ChanServ is not loaded!");
+
+ this->AddCommand(chanserv->Bot(), &commandcsakick);
}
};