diff options
author | TingPing <tngpng@gmail.com> | 2013-04-03 12:12:26 -0700 |
---|---|---|
committer | TingPing <tngpng@gmail.com> | 2013-04-03 12:12:26 -0700 |
commit | 4c217d4ba35808f84099f705524399e703d09df7 (patch) | |
tree | db64393741f8f1083c5d901470f96f2e3259be4a /src/common/proto-irc.c | |
parent | 23b20813853fba432687025c61733ee58b82e26c (diff) | |
parent | eb5313f8503091017ecb81ad8d48be576a666a81 (diff) |
Merge pull request #448 from TingPing/awaynotify2
Add away-notify support
Diffstat (limited to 'src/common/proto-irc.c')
-rw-r--r-- | src/common/proto-irc.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c index 790e3242..906ee713 100644 --- a/src/common/proto-irc.c +++ b/src/common/proto-irc.c @@ -1029,6 +1029,11 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[]) inbound_quit (serv, nick, ip, (word_eol[3][0] == ':') ? word_eol[3] + 1 : word_eol[3]); return; + + case WORDL('A','W','A','Y'): + inbound_away_notify (serv, nick, + (word_eol[3][0] == ':') ? word_eol[3] + 1 : NULL); + return; } goto garbage; @@ -1166,6 +1171,11 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[]) serv->have_namesx = TRUE; } + if (strstr (word_eol[5], "away-notify") != 0) + { + serv->have_awaynotify = TRUE; + } + if (strstr (word_eol[5], "sasl") != 0) { serv->have_sasl = TRUE; @@ -1193,6 +1203,11 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[]) want_cap ? strcat (buffer, " multi-prefix") : strcpy (buffer, "CAP REQ :multi-prefix"); want_cap = 1; } + if (strstr (word_eol[5], "away-notify") != 0) + { + want_cap ? strcat (buffer, " away-notify") : strcpy (buffer, "CAP REQ :away-notify"); + want_cap = 1; + } /* if the SASL password is set, request SASL auth */ if (strstr (word_eol[5], "sasl") != 0 && strlen (sess->server->saslpassword) != 0) { |