X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/fa72cee166158abdeaffd7c0b9b24263396e5358..45b9f1cbc0e0be0cc8801be9f61796fa603ad462:/src/s_user.c diff --git a/src/s_user.c b/src/s_user.c index e4f81a5..441012c 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -711,7 +711,7 @@ introduce_client(struct Client *client_p, struct Client *source_p, struct User * if(aconf->autojoin != NULL) { - user_join(client_p, source_p, aconf->autojoin, NULL, 0); + user_join(client_p, source_p, aconf->autojoin, NULL); } } @@ -1293,6 +1293,7 @@ oper_up(struct Client *source_p, struct oper_conf *oper_p) { unsigned int old = source_p->umodes, oldsnomask = source_p->snomask; hook_data_umode_changed hdata; + struct ConfItem *aconf; SetOper(source_p); @@ -1354,6 +1355,18 @@ oper_up(struct Client *source_p, struct oper_conf *oper_p) sendto_one_notice(source_p, ":*** Oper privs are %s", oper_p->privset->privs); send_oper_motd(source_p); + aconf = source_p->localClient->att_conf; + + /* Do the auth::autojoin_opers wizardry here */ + if(aconf->autojoin_opers != NULL) + { + /* opers should never be banned from the opers channel. + * Plus this is post-umode being set so you'll pass +I $o or +O. + * Hence why we're making this a normal clean join. --jdhore + */ + user_join(&me, source_p, aconf->autojoin_opers, NULL); + } + return (1); } @@ -1422,7 +1435,7 @@ change_nick_user_host(struct Client *target_p, const char *nick, const char *use struct membership *mscptr; int changed = irccmp(target_p->name, nick); int changed_case = strcmp(target_p->name, nick); - int do_qjm = irccmp(target_p->username, user) || irccmp(target_p->host, host); + int do_qjm = irccmp(target_p->username, user) || (irccmp(target_p->host, host) && ConfigChannel.cycle_host_change); char mode[10], modeval[NICKLEN * 2 + 2], reason[256], *mptr; va_list ap;