summary refs log tree commit diff stats
path: root/src/common/proto-irc.c
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2013-05-11 02:00:32 +0200
committerBerke Viktor <bviktor@hexchat.org>2013-05-11 02:00:32 +0200
commita98b95923b4cfc2b05bc570036f810d127aa6e90 (patch)
treea3ce20ad97646c6be03f80b40fc7cf9ad08b2ad0 /src/common/proto-irc.c
parentcf3d1ebb8b9177f5284c4afdeb02cbe820105175 (diff)
Get rid of this unnecessary buffer
Diffstat (limited to 'src/common/proto-irc.c')
-rw-r--r--src/common/proto-irc.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c
index 53225a95..5ea2c75c 100644
--- a/src/common/proto-irc.c
+++ b/src/common/proto-irc.c
@@ -42,6 +42,7 @@
 #include "util.h"
 #include "hexchatc.h"
 #include "url.h"
+#include "servlist.h"
 
 
 static void
@@ -1218,10 +1219,23 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[])
 					if (strstr (word_eol[5], "sasl") != 0)
 					{
 						serv->have_sasl = TRUE;
-						EMIT_SIGNAL (XP_TE_SASLAUTH, serv->server_session, sess->server->sasluser, NULL, NULL, NULL, 0);
+						EMIT_SIGNAL
+						(
+							XP_TE_SASLAUTH,
+							serv->server_session,
+							(((ircnet *)sess->server->network)->user) ? (((ircnet *)sess->server->network)->user) : prefs.hex_irc_user_name,
+							NULL,
+							NULL,
+							NULL,
+							0
+						);
 						tcp_send_len (serv, "AUTHENTICATE PLAIN\r\n", 20);
 
-						pass = encode_sasl_pass (sess->server->sasluser, sess->server->password);
+						pass = encode_sasl_pass
+						(
+							(((ircnet *)sess->server->network)->user) ? (((ircnet *)sess->server->network)->user) : prefs.hex_irc_user_name,
+							sess->server->password
+						);
 						tcp_sendf (sess->server, "AUTHENTICATE %s\r\n", pass);
 						free (pass);
 					}