]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/s_user.c
Start moving parts of join to channels.c so they can be used in more places.
[irc/rqf/shadowircd.git] / src / s_user.c
index e4f81a59c868df4eded962e7602bd0aadd77f07c..3086828476d31c787c04dfdde139dbe38e43e6ec 100644 (file)
@@ -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, 0);
+       }
+
        return (1);
 }