Added /roster unread preferrence

closes #712
This commit is contained in:
James Booth
2016-01-17 02:17:12 +00:00
parent e58be44f81
commit cce01f1d75
11 changed files with 89 additions and 17 deletions

View File

@@ -2310,6 +2310,33 @@ cmd_roster(ProfWin *window, const char *const command, gchar **args)
return TRUE;
}
} else if (g_strcmp0(args[0], "unread") == 0) {
if (g_strcmp0(args[1], "before") == 0) {
cons_show("Roster unread message count: before");
prefs_set_string(PREF_ROSTER_UNREAD, "before");
if (conn_status == JABBER_CONNECTED) {
rosterwin_roster();
}
return TRUE;
} else if (g_strcmp0(args[1], "after") == 0) {
cons_show("Roster unread message count: after");
prefs_set_string(PREF_ROSTER_UNREAD, "after");
if (conn_status == JABBER_CONNECTED) {
rosterwin_roster();
}
return TRUE;
} else if (g_strcmp0(args[1], "off") == 0) {
cons_show("Roster unread message count: off");
prefs_set_string(PREF_ROSTER_UNREAD, "off");
if (conn_status == JABBER_CONNECTED) {
rosterwin_roster();
}
return TRUE;
} else {
cons_bad_cmd_usage(command);
return TRUE;
}
} else if (g_strcmp0(args[0], "room") == 0) {
if (g_strcmp0(args[1], "order") == 0) {
if (g_strcmp0(args[2], "name") == 0) {