summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-10-27 11:52:51 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-10-27 11:52:51 +0000
commit9e48e683e749e345a1ddfb8014f37c9ee7b237da (patch)
treee5170724cf49bfd724478134e4590d3e20347dda /src
parentc64c2b6fd0c9114c1991a9bf17d1db31a5876bf4 (diff)
Fix bug #1111, BS KICK should properly handle the CAPS, FLOOD, and REPEAT options now.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2591 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/core/bs_kick.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/bs_kick.c b/src/core/bs_kick.c
index 77b2726be..bd03ff006 100644
--- a/src/core/bs_kick.c
+++ b/src/core/bs_kick.c
@@ -20,7 +20,7 @@ int do_kickcmd(User * u);
class CommandBSKick : public Command
{
public:
- CommandBSKick() : Command("KICK", 3, 4)
+ CommandBSKick() : Command("KICK", 3, 6)
{
}
@@ -103,8 +103,8 @@ class CommandBSKick : public Command
}
} else if (option == "CAPS") {
if (value == "ON") {
- char *min = strtok(NULL, " ");
- char *percent = strtok(NULL, " ");
+ const char *min = params.size() > 4 ? params[4].c_str() : NULL;
+ const char *percent = params.size() > 5 ? params[5].c_str() : NULL;
if (ttb) {
errno = 0;
@@ -175,8 +175,8 @@ class CommandBSKick : public Command
}
} else if (option == "FLOOD") {
if (value == "ON") {
- char *lines = strtok(NULL, " ");
- char *secs = strtok(NULL, " ");
+ const char *lines = params.size() > 4 ? params[4].c_str() : NULL;
+ const char *secs = params.size() > 5 ? params[5].c_str() : NULL;
if (ttb) {
errno = 0;
@@ -221,7 +221,7 @@ class CommandBSKick : public Command
}
} else if (option == "REPEAT") {
if (value == "ON") {
- char *times = strtok(NULL, " ");
+ const char *times = params.size() > 4 ? params[4].c_str() : NULL;
if (ttb) {
errno = 0;