pidgin: e7b56831: Notify the user if an IRC /nick command ..
elb at pidgin.im
elb at pidgin.im
Fri Apr 17 23:10:38 EDT 2009
-----------------------------------------------------------------
Revision: e7b568313cd84adb8e24dcfd56c373fe3e331439
Ancestor: 4b0e16d96a9ee2554770c4400445bee7ceb49d9a
Author: elb at pidgin.im
Date: 2009-04-18T03:08:12
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e7b568313cd84adb8e24dcfd56c373fe3e331439
Modified files:
ChangeLog libpurple/protocols/irc/msgs.c
ChangeLog:
Notify the user if an IRC /nick command fails, rather than trying fallbacks.
This code should not come into play on initial connect, but only on /nick
commands issued by the user. If it does, we'll have to try again.
Fixes #5181
-------------- next part --------------
============================================================
--- ChangeLog 98b38ea16c1f945d62e167b6fff2735a37bdc59b
+++ ChangeLog 72856c3c446e4e4b1b1dee03d56dc91b4d536b95
@@ -26,6 +26,9 @@ version 2.6.0 (??/??/2009):
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.
+
Pidgin:
* Added -f command line option to tell Pidgin to ignore NetworkManager
============================================================
--- libpurple/protocols/irc/msgs.c d2ef7d6ec4d533fa954a4f91eaa7f8dedb5728db
+++ libpurple/protocols/irc/msgs.c f550f818e13254325cbcc2f67e71ee5ed1cae580
@@ -1004,10 +1004,23 @@ void irc_msg_nickused(struct irc_conn *i
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
More information about the Commits
mailing list