diff options
author | TingPing <tingping@tingping.se> | 2013-10-17 04:52:06 -0400 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2013-10-17 04:52:06 -0400 |
commit | bc3b9231314aaa2be58dde02a70e75bcfee46c71 (patch) | |
tree | 10f2dbb7da93e6bfd62588299c87d2a8a66c7ecc | |
parent | c6ad4501518bc83e94d0b62a4d1b157fe3c08def (diff) |
Respect use global flag with SASL
-rw-r--r-- | src/common/inbound.c | 7 |
1 files 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) { |