Changes in protocols/jabber/presence.c [24f113b:5ebff60]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/presence.c
r24f113b r5ebff60 181 181 } 182 182 183 static char *choose_priority(struct im_connection *ic)184 {185 struct jabber_data *jd = ic->proto_data;186 char *prio = set_getstr(&ic->acc->set, "priority");187 188 if (jd->away_state->code != NULL) {189 int new_prio = (atoi(prio) - 5);190 if (new_prio < 0) {191 new_prio = 0;192 }193 return g_strdup_printf("%d", new_prio);194 }195 196 return g_strdup(prio);197 }198 199 183 /* Whenever presence information is updated, call this function to inform the 200 184 server. */ … … 205 189 GSList *l; 206 190 int st; 207 char *prio = choose_priority(ic);208 191 209 192 node = jabber_make_packet("presence", NULL, NULL, NULL); 210 xt_add_child(node, xt_new_node("priority", prio, NULL));193 xt_add_child(node, xt_new_node("priority", set_getstr(&ic->acc->set, "priority"), NULL)); 211 194 if (jd->away_state) { 212 195 xt_add_child(node, xt_new_node("show", jd->away_state->code, NULL)); … … 239 222 240 223 xt_free_node(node); 241 g_free(prio);242 224 return st; 243 225 }
Note: See TracChangeset
for help on using the changeset viewer.