aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-03-03 14:45:55 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-03-03 14:45:55 +0000
commit4e22cd8f4decc1d419d7ac236f68786a4c6d8311 (patch)
tree12f03fb742387ca520e0ee04c5e4f9316c5f41cb
parent2e831d8c5afed965465a163769ea5dcd62394eef (diff)
downloadsircbot-4e22cd8f4decc1d419d7ac236f68786a4c6d8311.tar.bz2
sircbot-4e22cd8f4decc1d419d7ac236f68786a4c6d8311.tar.xz
fix kick handling
-rw-r--r--sircbot.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sircbot.c b/sircbot.c
index 81d2deb..fdb9b8c 100644
--- a/sircbot.c
+++ b/sircbot.c
@@ -206,6 +206,9 @@ int handle_response(struct irc_session *sess, char *user, char *cmd, char *data,
} else if (strncmp(cmd, "JOIN", 4) == 0) {
return join_channel(chan, numchan, data);
} else if (strncmp(cmd, "KICK", 4) == 0) {
+ char *p = strchr(data, ' ');
+ if (p)
+ *p = '\0';
return kick_channel(chan, numchan, data);
} else if (strncmp(cmd, "PRIVMSG", 7) == 0) {
char *p = strchr(data, ' ');