summaryrefslogtreecommitdiff
path: root/bouncer/ircserver.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2014-01-25 01:47:04 +0100
committerTreeki <treeki@gmail.com>2014-01-25 01:47:04 +0100
commitd67fdae167bf5118b17d3bfaeb5f91929dfa812d (patch)
treec064c5b235e1ffbf0e28d8b075e8ae70919aca01 /bouncer/ircserver.cpp
parentbdbdb57fc3ae81c0dbb46c4e6ffdd6c0205a81c0 (diff)
downloadbounce4-d67fdae167bf5118b17d3bfaeb5f91929dfa812d.tar.gz
bounce4-d67fdae167bf5118b17d3bfaeb5f91929dfa812d.zip
add processing for the KICK irc message
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));