diff options
author | Berke Viktor <bviktor@hexchat.org> | 2013-05-17 02:08:34 +0200 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2013-05-17 02:08:34 +0200 |
commit | 0a2af0ab6256f5ccbbd81e62fabfc8fa6022995b (patch) | |
tree | f26722e4a07e071bd32b272d26828df855a9ac91 /src/common | |
parent | a1a94ed31973c0d8a262c82c3cb3d10c760d0ad7 (diff) |
Fix crash when using global username for QuakeNet
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/proto-irc.c | 10 |
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); } |