libpurple/protocols/irc/parse.c

changeset 33600
7f43656ee445
parent 32733
d4a74c710a15
parent 33404
bbd52f93184e
child 33602
6014ed8b3a2b
--- a/libpurple/protocols/irc/parse.c	Sun Jan 13 14:51:04 2013 -0600
+++ b/libpurple/protocols/irc/parse.c	Sun Jan 13 14:53:18 2013 -0600
@@ -102,6 +102,14 @@
 	{ "501", "n:", irc_msg_badmode },	/* Unknown mode flag		*/
 	{ "506", "nc:", irc_msg_nosend },	/* Must identify to send	*/
 	{ "515", "nc:", irc_msg_regonly },	/* Registration required	*/
+#ifdef HAVE_CYRUS_SASL
+	{ "903", "*", irc_msg_authok},		/* SASL auth successful		*/
+	{ "904", "*", irc_msg_authtryagain },	/* SASL auth failed, can recover		*/
+	{ "905", "*", irc_msg_authfail },	/* SASL auth failed		*/
+	{ "906", "*", irc_msg_authfail },	/* SASL auth failed		*/
+	{ "907", "*", irc_msg_authfail },	/* SASL auth failed		*/
+	{ "cap", "vv:", irc_msg_cap },		/* SASL capable			*/
+#endif
 	{ "invite", "n:", irc_msg_invite },	/* Invited			*/
 	{ "join", ":", irc_msg_join },		/* Joined a channel		*/
 	{ "kick", "cn:", irc_msg_kick },	/* KICK				*/
@@ -678,6 +686,11 @@
 				PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
 				_("Disconnected."));
 		return;
+#ifdef HAVE_CYRUS_SASL
+	} else if (!strncmp(input, "AUTHENTICATE ", 13)) {
+		irc_msg_auth(irc, input + 13);
+		return;
+#endif
 	}
 
 	if (input[0] != ':' || (cur = strchr(input, ' ')) == NULL) {

mercurial