diff options
author | TingPing <tingping@tingping.se> | 2013-03-12 02:21:18 -0400 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2013-03-12 02:21:18 -0400 |
commit | bf0fb9f3275ab245b4f8f32ed87b482000b78243 (patch) | |
tree | 0f9e1a05794109455b6baa15d73d5ade18b48411 /src/common/proto-irc.c | |
parent | c76dedd9b9f7a15deaac01783bab2f2da225ebd6 (diff) |
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 18015607..699d068d 100644 --- a/src/common/proto-irc.c +++ b/src/common/proto-irc.c @@ -1016,6 +1016,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; @@ -1153,6 +1158,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; @@ -1180,6 +1190,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) { |