Mercurial > pidgin
changeset 13057:5a9ff0c8593d
[gaim-migrate @ 15419]
Handle a bad nick change properly, as opposed to a bad nick at signon.
committer: Tailor Script <tailor@pidgin.im>
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Sat, 28 Jan 2006 01:35:58 +0000 |
parents | b00a592651b6 |
children | 256abf4dd912 |
files | src/protocols/irc/msgs.c |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)