Mercurial > ~mikael > mcabber > hg
diff mcabber/src/commands.c @ 848:a9161d2dc414
Introduce special buffer stuff
Update roster and commands: add support for a new "special" kind of buffer.
A special buffer "[status]" is automatically created at startup.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 08 May 2006 23:45:58 +0200 |
parents | e1b7f71b0b1c |
children | bdd526ec62bc |
line wrap: on
line diff
--- a/mcabber/src/commands.c Mon May 08 22:38:30 2006 +0200 +++ b/mcabber/src/commands.c Mon May 08 23:45:58 2006 +0200 @@ -1121,7 +1121,8 @@ } else { if (name) scr_LogPrint(LPRINT_NORMAL, "Name: %s", name); scr_LogPrint(LPRINT_NORMAL, "Type: %s", - ((type == ROSTER_TYPE_GROUP) ? "group" : "unknown")); + type == ROSTER_TYPE_GROUP ? "group" : + (type == ROSTER_TYPE_SPECIAL ? "special" : "unknown")); } g_free(buffer); @@ -1193,6 +1194,10 @@ scr_LogPrint(LPRINT_NORMAL, "You can't rename groups."); return; } + if (type & ROSTER_TYPE_SPECIAL) { + scr_LogPrint(LPRINT_NORMAL, "You can't rename this item."); + return; + } newname = g_strdup(arg); // Remove trailing space @@ -1231,6 +1236,10 @@ scr_LogPrint(LPRINT_NORMAL, "You can't move groups!"); return; } + if (type & ROSTER_TYPE_SPECIAL) { + scr_LogPrint(LPRINT_NORMAL, "You can't move this item."); + return; + } newgroupname = g_strdup(arg); // Remove trailing space