mirror of
https://github.com/profanity-im/profanity.git
synced 2025-02-02 15:08:15 -05:00
Show message in chat room when nickname conflict
This commit is contained in:
parent
02a71e2510
commit
af6779401a
@ -1624,7 +1624,7 @@ _cmd_msg(gchar **args, struct cmd_help_t help)
|
||||
g_string_free(full_jid, TRUE);
|
||||
|
||||
} 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;
|
||||
|
@ -152,10 +152,16 @@ prof_handle_delayed_message(char *from, char *message, GTimeVal tv_stamp,
|
||||
void
|
||||
prof_handle_error_message(const char *from, const char *err_msg)
|
||||
{
|
||||
if (err_msg != NULL) {
|
||||
cons_bad_show("Error received from server: %s", err_msg);
|
||||
if (err_msg == NULL) {
|
||||
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 {
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user