1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-30 21:55:24 +00:00

Show message in chat room when nickname conflict

This commit is contained in:
James Booth 2013-01-16 01:00:06 +00:00
parent 02a71e2510
commit af6779401a
2 changed files with 10 additions and 4 deletions

View File

@ -1624,7 +1624,7 @@ _cmd_msg(gchar **args, struct cmd_help_t help)
g_string_free(full_jid, TRUE); g_string_free(full_jid, TRUE);
} else { } else {
cons_show("No such nick \"%s\" in room %s.", usr, room_name); win_current_show("No such participant \"%s\" in room.", usr);
} }
return TRUE; return TRUE;

View File

@ -152,10 +152,16 @@ prof_handle_delayed_message(char *from, char *message, GTimeVal tv_stamp,
void void
prof_handle_error_message(const char *from, const char *err_msg) prof_handle_error_message(const char *from, const char *err_msg)
{ {
if (err_msg != NULL) { if (err_msg == NULL) {
cons_bad_show("Error received from server: %s", err_msg); cons_bad_show("Unknown error received from service.");
} else if (strcmp(err_msg, "conflict") == 0) {
if (win_current_is_groupchat()) {
win_current_show("Nickname already in use.");
} else { } else {
cons_bad_show("Unknown error received from server."); cons_bad_show("Error received from server: %s", err_msg);
}
} else {
cons_bad_show("Error received from server: %s", err_msg);
} }
win_show_error_msg(from, err_msg); win_show_error_msg(from, err_msg);