# HG changeset patch # User Ethan Blanton # Date 1240950510 0 # Node ID 68a5090f44eb23b52657f9b6b31709c15a1e55c5 # Parent 490b39a1d4382cf3b2aed5b593cd4ab207973af5 applied changes from 4b0e16d96a9ee2554770c4400445bee7ceb49d9a through e7b568313cd84adb8e24dcfd56c373fe3e331439 diff -r 490b39a1d438 -r 68a5090f44eb ChangeLog --- a/ChangeLog Tue Apr 28 20:27:09 2009 +0000 +++ b/ChangeLog Tue Apr 28 20:28:30 2009 +0000 @@ -4,6 +4,9 @@ IRC: * Correctly handle WHOIS for users who are joined to a large number of channels. + * Notify the user if a /nick command fails, rather than trying + fallback nicks. + version 2.5.5 (03/01/2009): libpurple: diff -r 490b39a1d438 -r 68a5090f44eb libpurple/protocols/irc/msgs.c --- a/libpurple/protocols/irc/msgs.c Tue Apr 28 20:27:09 2009 +0000 +++ b/libpurple/protocols/irc/msgs.c Tue Apr 28 20:28:30 2009 +0000 @@ -993,10 +993,23 @@ void irc_msg_nickused(struct irc_conn *irc, const char *name, const char *from, char **args) { char *newnick, *buf, *end; + PurpleConnection *gc = purple_account_get_connection(irc->account); if (!args || !args[1]) return; + if (gc && purple_connection_get_state(gc) == PURPLE_CONNECTED) { + /* We only want to do the following dance if the connection + has not been successfully completed. If it has, just + notify the user that their /nick command didn't go. */ + buf = g_strdup_printf(_("The nickname \"%s\" is already being used."), + irc->reqnick); + purple_notify_error(gc, _("Nickname in use"), + _("Nickname in use"), buf); + g_free(buf); + g_free(irc->reqnick); + } + if (strlen(args[1]) < strlen(irc->reqnick) || irc->nickused) newnick = g_strdup(args[1]); else