comparison mcabber/mcabber/xmpp.c @ 2004:aa7e03c35488

Accept "true" as well as "1" for autojoin in bookmarked rooms
author Hermitifier
date Thu, 26 Jan 2012 10:11:03 +0100
parents 51f032d5ca22
children a73ce708c2c9
comparison
equal deleted inserted replaced
2003:10cec229b41a 2004:aa7e03c35488
2204 bm_elt = g_new0(struct bookmark, 1); 2204 bm_elt = g_new0(struct bookmark, 1);
2205 bm_elt->roomjid = g_strdup(fjid); 2205 bm_elt->roomjid = g_strdup(fjid);
2206 autojoin = lm_message_node_get_attribute(x, "autojoin"); 2206 autojoin = lm_message_node_get_attribute(x, "autojoin");
2207 nick = lm_message_node_get_child_value(x, "nick"); 2207 nick = lm_message_node_get_child_value(x, "nick");
2208 name = lm_message_node_get_attribute(x, "name"); 2208 name = lm_message_node_get_attribute(x, "name");
2209 if (autojoin && !strcmp(autojoin, "1")) 2209 if (autojoin && (!strcmp(autojoin, "1") || !strcmp(autojoin, "true")))
2210 bm_elt->autojoin = 1; 2210 bm_elt->autojoin = 1;
2211 if (nick) 2211 if (nick)
2212 bm_elt->nick = g_strdup(nick); 2212 bm_elt->nick = g_strdup(nick);
2213 if (name) 2213 if (name)
2214 bm_elt->name = g_strdup(name); 2214 bm_elt->name = g_strdup(name);