Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/commands.c @ 549:448e299e45da
MUC: "/room topic" shows the current room topic
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 27 Nov 2005 21:38:53 +0100 |
parents | 887c1bd37617 |
children | ba5271b49f21 |
comparison
equal
deleted
inserted
replaced
548:265c50238a48 | 549:448e299e45da |
---|---|
1285 } | 1285 } |
1286 jb_room_unlock(buddy_getjid(bud)); | 1286 jb_room_unlock(buddy_getjid(bud)); |
1287 } else if (!strncasecmp(arg, "topic", 5)) { | 1287 } else if (!strncasecmp(arg, "topic", 5)) { |
1288 gchar *msg; | 1288 gchar *msg; |
1289 arg += 5; | 1289 arg += 5; |
1290 if (*arg++ != ' ') { | 1290 for (; *arg && *arg == ' '; arg++) |
1291 scr_LogPrint(LPRINT_NORMAL, "Wrong or missing parameter"); | 1291 ; |
1292 if (!*arg) { | |
1293 const char *topic = buddy_gettopic(bud); | |
1294 if (topic) | |
1295 scr_LogPrint(LPRINT_NORMAL, "Topic: %s", topic); | |
1296 else | |
1297 scr_LogPrint(LPRINT_NORMAL, "No topic has been set"); | |
1292 return; | 1298 return; |
1293 } | 1299 } |
1294 for (; *arg && *arg == ' '; arg++) | 1300 for (; *arg && *arg == ' '; arg++) |
1295 ; | 1301 ; |
1296 if (!(buddy_gettype(bud) & ROSTER_TYPE_ROOM)) { | 1302 if (!(buddy_gettype(bud) & ROSTER_TYPE_ROOM)) { |