From bc3b9231314aaa2be58dde02a70e75bcfee46c71 Mon Sep 17 00:00:00 2001 From: TingPing Date: Thu, 17 Oct 2013 04:52:06 -0400 Subject: [PATCH] Respect use global flag with SASL --- src/common/inbound.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common/inbound.c b/src/common/inbound.c index 097cb118..1dc0c978 100644 --- a/src/common/inbound.c +++ b/src/common/inbound.c @@ -1744,11 +1744,14 @@ static const char *sasl_mechanisms[] = void inbound_sasl_authenticate (server *serv, char *data) { + ircnet *net = (ircnet*)serv->network; char *user, *pass = NULL; const char *mech = sasl_mechanisms[serv->sasl_mech]; - user = (((ircnet*)serv->network)->user) - ? (((ircnet*)serv->network)->user) : prefs.hex_irc_user_name; + if (net->user && !(net->flags & FLAG_USE_GLOBAL)) + user = net->user; + else + user = prefs.hex_irc_user_name; switch (serv->sasl_mech) {