summaryrefslogtreecommitdiff
path: root/bouncer/ircserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bouncer/ircserver.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/bouncer/ircserver.cpp b/bouncer/ircserver.cpp
index 3b09d49..19bea9d 100644
--- a/bouncer/ircserver.cpp
+++ b/bouncer/ircserver.cpp
@@ -203,7 +203,7 @@ void IRCServer::lineReceivedEvent(char *line, int size) {
} else if (strcmp(cmdBuf, "PART") == 0) {
Channel *c = findChannel(targetBuf, false);
if (c) {
- c->handlePart(user, paramsAfterFirst);;
+ c->handlePart(user, paramsAfterFirst);
return;
}
@@ -212,6 +212,24 @@ void IRCServer::lineReceivedEvent(char *line, int size) {
i.second->handleQuit(user, allParams);
return;
+ } else if (strcmp(cmdBuf, "KICK") == 0) {
+ char *space = strchr(paramsAfterFirst, ' ');
+ const char *kickMsg = "";
+
+ if (space) {
+ *space = 0;
+ kickMsg = space + 1;
+
+ if (*kickMsg == ':')
+ ++kickMsg;
+ }
+
+ Channel *c = findChannel(targetBuf, false);
+ if (c) {
+ c->handleKick(user, paramsAfterFirst, kickMsg);
+ return;
+ }
+
} else if (strcmp(cmdBuf, "NICK") == 0) {
if (user.isSelf) {
strncpy(currentNick, allParams, sizeof(currentNick));