comparison mcabber/src/jab_iq.c @ 1415:317f8d181626

Rename command public functions Add a prefix ("cmd_").
author Mikael Berthe <mikael@lilotux.net>
date Sat, 19 Jan 2008 16:42:34 +0100
parents 366ef500c522
children af54d33facd0
comparison
equal deleted inserted replaced
1414:366ef500c522 1415:317f8d181626
1192 "field?var=status-message"), "value"); 1192 "field?var=status-message"), "value");
1193 for (s = adhoc_status_list; !s->name || strcmp(s->name, value); s++); 1193 for (s = adhoc_status_list; !s->name || strcmp(s->name, value); s++);
1194 if (s->name) { 1194 if (s->name) {
1195 char *status = g_strdup_printf("%s %s", s->status, 1195 char *status = g_strdup_printf("%s %s", s->status,
1196 message ? message : ""); 1196 message ? message : "");
1197 setstatus(NULL, status); 1197 cmd_setstatus(NULL, status);
1198 g_free(status); 1198 g_free(status);
1199 xmlnode_put_attrib(command, "status", "completed"); 1199 xmlnode_put_attrib(command, "status", "completed");
1200 xmlnode_put_attrib(iq, "type", "result"); 1200 xmlnode_put_attrib(iq, "type", "result");
1201 xmlnode_insert_dataform_result_message(command, 1201 xmlnode_insert_dataform_result_message(command,
1202 "Status has been changed"); 1202 "Status has been changed");
1290 { 1290 {
1291 char* to_leave = xmlnode_get_tag_data(x, "value"); 1291 char* to_leave = xmlnode_get_tag_data(x, "value");
1292 if (to_leave) { 1292 if (to_leave) {
1293 GList* b = buddy_search_jid(to_leave); 1293 GList* b = buddy_search_jid(to_leave);
1294 if (b) 1294 if (b)
1295 room_leave(b->data, "Asked by remote command"); 1295 cmd_room_leave(b->data, "Asked by remote command");
1296 } 1296 }
1297 } 1297 }
1298 xmlnode_put_attrib(iq, "type", "result"); 1298 xmlnode_put_attrib(iq, "type", "result");
1299 xmlnode_insert_dataform_result_message(command, 1299 xmlnode_insert_dataform_result_message(command,
1300 "Groupchats have been left"); 1300 "Groupchats have been left");