Sat, 28 Jan 2006 01:35:58 +0000
[gaim-migrate @ 15419]
Handle a bad nick change properly, as opposed to a bad nick at signon.
| src/protocols/irc/msgs.c | file | annotate | diff | comparison | revisions |
--- a/src/protocols/irc/msgs.c Sat Jan 28 01:20:44 2006 +0000 +++ b/src/protocols/irc/msgs.c Sat Jan 28 01:35:58 2006 +0000 @@ -806,8 +806,16 @@ void irc_msg_badnick(struct irc_conn *irc, const char *name, const char *from, char **args) { - gaim_connection_error(gaim_account_get_connection(irc->account), - _("Your selected account name was rejected by the server. It probably contains invalid characters.")); + GaimConnection *gc = gaim_account_get_connection(irc->account); + if (gaim_connection_get_state(gc) == GAIM_CONNECTED) { + gaim_notify_error(gc, _("Invalid nickname"), + _("Invalid nickname"), + _("Your selected nickname was rejected by the server. It probably contains invalid characters.")); + + } else { + gaim_connection_error(gaim_account_get_connection(irc->account), + _("Your selected account name was rejected by the server. It probably contains invalid characters.")); + } } void irc_msg_nickused(struct irc_conn *irc, const char *name, const char *from, char **args)