added automatic multi-bot rejoin for opless channels
[NeonServV5.git] / src / event_neonspam_join.c
index a192d792c284154c3a74be5d51c971c2f8fd1a70..fc501e75f5aeb426060d6d5eb7d9df72eaacf5f6 100644 (file)
@@ -30,6 +30,11 @@ static void neonspam_event_join(struct ChanUser *chanuser) {
     if(chanuser->user->flags & USERFLAG_WAS_REGISTRING) return;
     struct ClientSocket *client = getChannelBot(chanuser->chan, BOTID);
     if(!client) return; //we can't "see" this event
+    if(chanuser->user == client->user) {
+        requestOp(client->user, chanuser->chan);
+        return;
+    }
+    if(chanuser->user->flags & USERFLAG_ISBOT) return;
     loadNeonSpamSettings(chanuser->chan);
     struct NeonSpamSettings *settings = chanuser->chan->spam_settings;
     if(!settings || !(settings->flags & SPAMSETTINGS_JOINSCAN)) return;