diff options
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r-- | src/command/cmd_funcs.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index a6c0011f..b2893633 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -420,6 +420,7 @@ cmd_connect(ProfWin *window, const char *const command, gchar **args) } else { cons_show("Error evaluating password, see logs for details."); account_free(account); + free(user); return TRUE; } @@ -5406,6 +5407,10 @@ cmd_time(ProfWin *window, const char *const command, gchar **args) gboolean cmd_states(ProfWin *window, const char *const command, gchar **args) { + if (args[0] == NULL) { + return FALSE; + } + _cmd_set_boolean_preference(args[0], command, "Sending chat states", PREF_STATES); // if disabled, disable outtype and gone @@ -5439,6 +5444,10 @@ cmd_wintitle(ProfWin *window, const char *const command, gchar **args) gboolean cmd_outtype(ProfWin *window, const char *const command, gchar **args) { + if (args[0] == NULL) { + return FALSE; + } + _cmd_set_boolean_preference(args[0], command, "Sending typing notifications", PREF_OUTTYPE); // if enabled, enable states @@ -6612,6 +6621,10 @@ cmd_autoconnect(ProfWin *window, const char *const command, gchar **args) gboolean cmd_chlog(ProfWin *window, const char *const command, gchar **args) { + if (args[0] == NULL) { + return FALSE; + } + _cmd_set_boolean_preference(args[0], command, "Chat logging", PREF_CHLOG); // if set to off, disable history @@ -6633,6 +6646,10 @@ cmd_grlog(ProfWin *window, const char *const command, gchar **args) gboolean cmd_history(ProfWin *window, const char *const command, gchar **args) { + if (args[0] == NULL) { + return FALSE; + } + _cmd_set_boolean_preference(args[0], command, "Chat history", PREF_HISTORY); // if set to on, set chlog @@ -6646,6 +6663,10 @@ cmd_history(ProfWin *window, const char *const command, gchar **args) gboolean cmd_carbons(ProfWin *window, const char *const command, gchar **args) { + if (args[0] == NULL) { + return FALSE; + } + _cmd_set_boolean_preference(args[0], command, "Message carbons preference", PREF_CARBONS); jabber_conn_status_t conn_status = connection_get_status(); @@ -6756,11 +6777,13 @@ cmd_plugins_sourcepath(ProfWin *window, const char *const command, gchar **args) if (!is_dir(path)) { cons_show("Plugins sourcepath must be a directory."); + free(path); return TRUE; } cons_show("Setting plugins sourcepath: %s", path); prefs_set_string(PREF_PLUGINS_SOURCEPATH, path); + free(path); return TRUE; } @@ -6845,6 +6868,7 @@ cmd_plugins_install(ProfWin *window, const char *const command, gchar **args) return TRUE; } + free(path); cons_show("Argument must be a file or directory."); return TRUE; } |