1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Merge branch 'master' into stabber-tests

This commit is contained in:
James Booth 2015-05-17 22:28:25 +01:00
commit 09f01d518c

View File

@ -3980,23 +3980,21 @@ cmd_history(gchar **args, struct cmd_help_t help)
gboolean
cmd_carbons(gchar **args, struct cmd_help_t help)
{
jabber_conn_status_t conn_status = jabber_get_connection_status();
if (conn_status != JABBER_CONNECTED) {
cons_show("You are not currently connected.");
return TRUE;
}
gboolean result = _cmd_set_boolean_preference(args[0], help,
"Message carbons preference", PREF_CARBONS);
// enable carbons
if (strcmp(args[0], "on") == 0) {
iq_enable_carbons();
}
else if (strcmp(args[0], "off") == 0){
iq_disable_carbons();
jabber_conn_status_t conn_status = jabber_get_connection_status();
if (conn_status == JABBER_CONNECTED) {
// enable carbons
if (strcmp(args[0], "on") == 0) {
iq_enable_carbons();
}
else if (strcmp(args[0], "off") == 0){
iq_disable_carbons();
}
}
return result;
}
@ -4411,4 +4409,4 @@ gint _compare_commands(Command *a, Command *b)
g_free(key_b);
return result;
}
}