pidgin/purple-plugin-pack

Use the new FreeNode IDENTIFY syntax

2010-04-18, Richard Laager
967fe31cb1a9
Parents 01f5244ea63b
Children b917ed290b4a
Use the new FreeNode IDENTIFY syntax

By passing a username, we can authenticate as the regular nick
even when we're using an alternate one due to a conflict.
--- a/irchelper/irchelper.c Sun Apr 18 17:07:38 2010 -0500
+++ b/irchelper/irchelper.c Sun Apr 18 17:21:29 2010 -0500
@@ -163,6 +163,7 @@
IRC_NETWORK_TYPE_FUNCOM = 0x1000,
IRC_NETWORK_TYPE_INDIEZEN = 0x2000,
IRC_NETWORK_TYPE_SPIDERNET = 0x4000,
+ IRC_NETWORK_TYPE_FREENODE = 0x8000,
} IRCHelperStateFlags;
struct proto_stuff
@@ -267,6 +268,8 @@
type = IRC_NETWORK_TYPE_INDIEZEN;
else if (g_str_has_suffix(username, DOMAIN_SUFFIX_SPIDERNET))
type = IRC_NETWORK_TYPE_SPIDERNET;
+ else if (g_str_has_suffix(username, DOMAIN_SUFFIX_FREENODE))
+ type = IRC_NETWORK_TYPE_FREENODE;
g_free(username);
return type;
@@ -673,6 +676,11 @@
nickserv_msg_identify("AUTH", connection->proto_data, connection, nickpassword);
else if (state & (IRC_NETWORK_TYPE_INDIEZEN | IRC_NETWORK_TYPE_SPIDERNET))
nickserv_msg_identify("identify", connection->proto_data, connection, nickpassword);
+ else if (state & IRC_NETWORK_TYPE_FREENODE)
+ {
+ char *authentication = g_strdup_printf("quote %s IDENTIFY %s", NICK_NICKSERV, userparts[0]);
+ nickserv_do_identify(authentication, connection->proto_data, connection, nickpassword);
+ }
else
nickserv_identify(connection->proto_data, connection, nickpassword);
}