Mercurial > pidgin.yaz
changeset 1876:8ebd3b0ff325
[gaim-migrate @ 1886]
na na na na
na na na na
hey hey hey
good bye
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 22 May 2001 01:03:23 +0000 |
parents | c0a69f90d662 |
children | a333eccaae93 |
files | plugins/jabber/jabber.c |
diffstat | 1 files changed, 17 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/jabber/jabber.c Tue May 22 00:18:33 2001 +0000 +++ b/plugins/jabber/jabber.c Tue May 22 01:03:23 2001 +0000 @@ -596,7 +596,7 @@ type = xmlnode_get_attrib(p->x, "type"); - if (!type || !strcmp(type, "normal") || !strcmp(type, "chat")) { + if (!type || !strcasecmp(type, "normal") || !strcasecmp(type, "chat")) { /* XXX namespaces could be handled better. (mid) */ if ((xmlns = xmlnode_get_tag(p->x, "x"))) @@ -617,7 +617,7 @@ if (!from) return; - if (type && !strcmp(type, "jabber:x:conference")) { + if (type && !strcasecmp(type, "jabber:x:conference")) { char *room; room = xmlnode_get_attrib(xmlns, "jid"); @@ -642,7 +642,7 @@ if (msg) free(msg); - } else if (!strcmp(type, "error")) { + } else if (!strcasecmp(type, "error")) { if ((y = xmlnode_get_tag(p->x, "error"))) { type = xmlnode_get_attrib(y, "code"); msg = xmlnode_get_data(y); @@ -653,7 +653,7 @@ do_error_dialog(msg, from); g_free(from); } - } else if (!strcmp(type, "groupchat")) { + } else if (!strcasecmp(type, "groupchat")) { struct jabber_chat *jc; static int i = 0; @@ -730,13 +730,13 @@ show = xmlnode_get_data(y); if (!show) { state = UC_NORMAL; - } else if (!strcmp(show, "away")) { + } else if (!strcasecmp(show, "away")) { state = UC_AWAY; - } else if (!strcmp(show, "chat")) { + } else if (!strcasecmp(show, "chat")) { state = UC_CHAT; - } else if (!strcmp(show, "xa")) { + } else if (!strcasecmp(show, "xa")) { state = UC_XA; - } else if (!strcmp(show, "dnd")) { + } else if (!strcasecmp(show, "dnd")) { state = UC_DND; } } else { @@ -802,10 +802,12 @@ } } else { if (who->resource) { - if (type && !strcmp(type, "unavailable")) { + if (type && !strcasecmp(type, "unavailable")) { struct jabber_data *jd; - if (!jc) - jc = find_existing_chat(GJ_GC(j), who); + if (!jc && !(jc = find_existing_chat(GJ_GC(j), who))) { + g_free(buddy); + return; + } jd = jc->gc->proto_data; if (strcmp(who->resource, jc->Jid->resource)) { remove_chat_buddy(jc->b, who->resource); @@ -816,8 +818,10 @@ serv_got_chat_left(GJ_GC(j), jc->b->id); g_free(jc); } else { - if (!jc) - jc = find_existing_chat(GJ_GC(j), who); + if (!jc && !(jc = find_existing_chat(GJ_GC(j), who))) { + g_free(buddy); + return; + } if (!find_chat_buddy(jc->b, who->resource)) add_chat_buddy(jc->b, who->resource); else if ((y = xmlnode_get_tag(p->x, "status"))) {