summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/proto-irc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c
index b5c68e82..651125e0 100644
--- a/src/common/proto-irc.c
+++ b/src/common/proto-irc.c
@@ -1097,8 +1097,14 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[])
 
 				if (!strncmp (text, "CHALLENGE ", 10))		/* QuakeNet CHALLENGEAUTH upon our request */
 				{
-					response = challengeauth_response (((ircnet *)serv->network)->user, serv->password, word[5]);
-					tcp_sendf (serv, "PRIVMSG %s :CHALLENGEAUTH %s %s %s\r\n", CHALLENGEAUTH_NICK, ((ircnet *)serv->network)->user, response, CHALLENGEAUTH_ALGO);
+					response = challengeauth_response (((ircnet *)serv->network)->user ? ((ircnet *)serv->network)->user : prefs.hex_irc_user_name, serv->password, word[5]);
+
+					tcp_sendf (serv, "PRIVMSG %s :CHALLENGEAUTH %s %s %s\r\n",
+						CHALLENGEAUTH_NICK,
+						((ircnet *)serv->network)->user ? ((ircnet *)serv->network)->user : prefs.hex_irc_user_name,
+						response,
+						CHALLENGEAUTH_ALGO);
+
 					g_free (response);
 				}