Mercurial > pidgin.yaz
comparison src/protocols/jabber/jabber.c @ 7999:38df71d58500
[gaim-migrate @ 8676]
this fixes the add/remove button showing up incorrectly for jabber chat rooms
when you add or remove a chat, the button doesn't automagically update in the
chat window. i'm too hungry to figure that out right now, so someone else
should do it.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 04 Jan 2004 23:07:41 +0000 |
parents | 6fca0d9cc98b |
children | c4b5a35c7a12 |
comparison
equal
deleted
inserted
replaced
7998:5e193b3a2342 | 7999:38df71d58500 |
---|---|
1079 } | 1079 } |
1080 | 1080 |
1081 return m; | 1081 return m; |
1082 } | 1082 } |
1083 | 1083 |
1084 static GaimChat *jabber_find_blist_chat(GaimAccount *account, const char *name) | |
1085 { | |
1086 GaimBlistNode *gnode, *cnode; | |
1087 JabberID *jid; | |
1088 | |
1089 if(!(jid = jabber_id_new(name))) | |
1090 return NULL; | |
1091 | |
1092 for(gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) { | |
1093 for(cnode = gnode->child; cnode; cnode = cnode->next) { | |
1094 GaimChat *chat = (GaimChat*)cnode; | |
1095 const char *room, *server; | |
1096 if(!GAIM_BLIST_NODE_IS_CHAT(cnode)) | |
1097 continue; | |
1098 | |
1099 if(chat->account != account) | |
1100 return; | |
1101 | |
1102 if(!(room = g_hash_table_lookup(chat->components, "room"))) | |
1103 continue; | |
1104 if(!(server = g_hash_table_lookup(chat->components, "server"))) | |
1105 continue; | |
1106 | |
1107 if(!g_utf8_collate(room, jid->node) && !g_utf8_collate(server, jid->domain)) { | |
1108 jabber_id_free(jid); | |
1109 return chat; | |
1110 } | |
1111 } | |
1112 } | |
1113 jabber_id_free(jid); | |
1114 return NULL; | |
1115 } | |
1116 | |
1084 static GaimPluginProtocolInfo prpl_info = | 1117 static GaimPluginProtocolInfo prpl_info = |
1085 { | 1118 { |
1086 OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME, | 1119 OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME, |
1087 NULL, | 1120 NULL, |
1088 NULL, | 1121 NULL, |
1133 NULL, /* convo_closed */ /* XXX: thread_ids */ | 1166 NULL, /* convo_closed */ /* XXX: thread_ids */ |
1134 jabber_normalize, | 1167 jabber_normalize, |
1135 NULL, /* set_buddy_icon */ | 1168 NULL, /* set_buddy_icon */ |
1136 NULL, /* remove_group */ | 1169 NULL, /* remove_group */ |
1137 jabber_chat_buddy_real_name, | 1170 jabber_chat_buddy_real_name, |
1138 jabber_chat_set_topic | 1171 jabber_chat_set_topic, |
1172 jabber_find_blist_chat | |
1139 }; | 1173 }; |
1140 | 1174 |
1141 static GaimPluginInfo info = | 1175 static GaimPluginInfo info = |
1142 { | 1176 { |
1143 2, /**< api_version */ | 1177 2, /**< api_version */ |