comparison 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
comparison
equal deleted inserted replaced
847:e1b7f71b0b1c 848:a9161d2dc414
1119 } 1119 }
1120 } 1120 }
1121 } else { 1121 } else {
1122 if (name) scr_LogPrint(LPRINT_NORMAL, "Name: %s", name); 1122 if (name) scr_LogPrint(LPRINT_NORMAL, "Name: %s", name);
1123 scr_LogPrint(LPRINT_NORMAL, "Type: %s", 1123 scr_LogPrint(LPRINT_NORMAL, "Type: %s",
1124 ((type == ROSTER_TYPE_GROUP) ? "group" : "unknown")); 1124 type == ROSTER_TYPE_GROUP ? "group" :
1125 (type == ROSTER_TYPE_SPECIAL ? "special" : "unknown"));
1125 } 1126 }
1126 1127
1127 g_free(buffer); 1128 g_free(buffer);
1128 } 1129 }
1129 1130
1191 1192
1192 if (type & ROSTER_TYPE_GROUP) { 1193 if (type & ROSTER_TYPE_GROUP) {
1193 scr_LogPrint(LPRINT_NORMAL, "You can't rename groups."); 1194 scr_LogPrint(LPRINT_NORMAL, "You can't rename groups.");
1194 return; 1195 return;
1195 } 1196 }
1197 if (type & ROSTER_TYPE_SPECIAL) {
1198 scr_LogPrint(LPRINT_NORMAL, "You can't rename this item.");
1199 return;
1200 }
1196 1201
1197 newname = g_strdup(arg); 1202 newname = g_strdup(arg);
1198 // Remove trailing space 1203 // Remove trailing space
1199 for (p = newname; *p; p++) ; 1204 for (p = newname; *p; p++) ;
1200 while (p > newname && *p == ' ') *p = 0; 1205 while (p > newname && *p == ' ') *p = 0;
1227 1232
1228 oldgroupname = buddy_getgroupname(bud); 1233 oldgroupname = buddy_getgroupname(bud);
1229 1234
1230 if (type & ROSTER_TYPE_GROUP) { 1235 if (type & ROSTER_TYPE_GROUP) {
1231 scr_LogPrint(LPRINT_NORMAL, "You can't move groups!"); 1236 scr_LogPrint(LPRINT_NORMAL, "You can't move groups!");
1237 return;
1238 }
1239 if (type & ROSTER_TYPE_SPECIAL) {
1240 scr_LogPrint(LPRINT_NORMAL, "You can't move this item.");
1232 return; 1241 return;
1233 } 1242 }
1234 1243
1235 newgroupname = g_strdup(arg); 1244 newgroupname = g_strdup(arg);
1236 // Remove trailing space 1245 // Remove trailing space