Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
H3rnand3zzz committed Apr 3, 2023
1 parent b84061f commit 2f225ea
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/command/cmd_funcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,55 +1024,43 @@ cmd_account_clear(ProfWin* window, const char* const command, gchar** args)
}

char* property = args[2];
if (strcmp(property, "password") == 0) { // TODO: code cleanup (cons_show(""))
if (strcmp(property, "password") == 0) {
accounts_clear_password(account_name);
cons_show("Removed password for account %s", account_name);
cons_show("");
} else if (strcmp(property, "eval_password") == 0) {
accounts_clear_eval_password(account_name);
cons_show("Removed eval password for account %s", account_name);
cons_show("");
} else if (strcmp(property, "server") == 0) {
accounts_clear_server(account_name);
cons_show("Removed server for account %s", account_name);
cons_show("");
} else if (strcmp(property, "port") == 0) {
accounts_clear_port(account_name);
cons_show("Removed port for account %s", account_name);
cons_show("");
} else if (strcmp(property, "otr") == 0) {
accounts_clear_otr(account_name);
cons_show("OTR policy removed for account %s", account_name);
cons_show("");
} else if (strcmp(property, "pgpkeyid") == 0) {
accounts_clear_pgp_keyid(account_name);
cons_show("Removed PGP key ID for account %s", account_name);
cons_show("");
} else if (strcmp(property, "startscript") == 0) {
accounts_clear_script_start(account_name);
cons_show("Removed start script for account %s", account_name);
cons_show("");
} else if (strcmp(property, "client") == 0) {
accounts_clear_client(account_name);
cons_show("Reset client name for account %s", account_name);
cons_show("");
} else if (strcmp(property, "theme") == 0) {
accounts_clear_theme(account_name);
cons_show("Removed theme for account %s", account_name);
cons_show("");
} else if (strcmp(property, "muc") == 0) {
accounts_clear_muc(account_name);
cons_show("Removed MUC service for account %s", account_name);
cons_show("");
} else if (strcmp(property, "resource") == 0) {
accounts_clear_resource(account_name);
cons_show("Removed resource for account %s", account_name);
cons_show("");
} else {
cons_show("Invalid property: %s", property);
cons_show("");
}

cons_show("");
return TRUE;
}

Expand Down

0 comments on commit 2f225ea

Please sign in to comment.