From f8fba69ea39d87de9d07165301e7478c155401b6 Mon Sep 17 00:00:00 2001 From: pomac Date: Sun, 19 Sep 2004 23:56:35 +0000 Subject: [PATCH] - Reimplemented fully working capab support git-svn-id: svn://red.pomac.com/rage@85 55c13d69-e7e2-0310-b639-a4a306287c42 --- trunk/src/common/modes.c | 8 ++++---- trunk/src/common/proto-irc.c | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/trunk/src/common/modes.c b/trunk/src/common/modes.c index bcdca46..8a71692 100644 --- a/trunk/src/common/modes.c +++ b/trunk/src/common/modes.c @@ -661,10 +661,6 @@ run_005 (server * serv) if((pre = get_isupport(serv, "NETWORK"))) { - /* if (serv->networkname) - free (serv->networkname); - serv->networkname = strdup (parv[w] + 8);*/ - if (serv->server_session->type == SESS_SERVER) { safe_strcpy (serv->server_session->channel, pre, CHANLEN); @@ -695,4 +691,8 @@ run_005 (server * serv) serv->bad_nick_prefixes = strdup (pre); } } + + if(isupport(serv, "CAPAB")) /* after this we get a 290 numeric reply */ + tcp_send_len (serv, "CAPAB IDENTIFY-MSG\r\n", 20); + } diff --git a/trunk/src/common/proto-irc.c b/trunk/src/common/proto-irc.c index e0cb333..6b2591f 100644 --- a/trunk/src/common/proto-irc.c +++ b/trunk/src/common/proto-irc.c @@ -385,6 +385,23 @@ irc_numeric(session *sess, int parc, char *parv[]) case RPL_ISUPPORT: /* 005 */ inbound_005(sess->server,parc,parv); break; + case 290: /* CAPAB reply */ + { + int i; + + /* initalize variables */ + sess->server->have_idmsg = FALSE; + + for (i = 2; i < parc; i++) + { + if (strcmp(parv[2], "IDENTIFY-MSG")) + { + sess->server->have_idmsg = TRUE; + break; + } + } + break; + } case RPL_AWAY: /* 301 */ inbound_away(sess->server,parv[3],parv[4]); break;