Respect use global flag with SASL

This commit is contained in:
TingPing 2013-10-17 04:52:06 -04:00
parent c6ad450151
commit bc3b923131
1 changed files with 5 additions and 2 deletions

View File

@ -1744,11 +1744,14 @@ static const char *sasl_mechanisms[] =
void void
inbound_sasl_authenticate (server *serv, char *data) inbound_sasl_authenticate (server *serv, char *data)
{ {
ircnet *net = (ircnet*)serv->network;
char *user, *pass = NULL; char *user, *pass = NULL;
const char *mech = sasl_mechanisms[serv->sasl_mech]; const char *mech = sasl_mechanisms[serv->sasl_mech];
user = (((ircnet*)serv->network)->user) if (net->user && !(net->flags & FLAG_USE_GLOBAL))
? (((ircnet*)serv->network)->user) : prefs.hex_irc_user_name; user = net->user;
else
user = prefs.hex_irc_user_name;
switch (serv->sasl_mech) switch (serv->sasl_mech)
{ {