added DoNotRegister system and command cmd_noregister
[NeonServV5.git] / src / event_neonspam_join.c
index 1578a0154ec551d82367749ad631cc7f62288f33..ed7fa5d876c68049f45eabe3a2346e7ca43eb0ba 100644 (file)
@@ -27,6 +27,7 @@ struct neonspam_event_join_cache {
 };
 
 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
     loadNeonSpamSettings(chanuser->chan);
@@ -62,7 +63,7 @@ static USERAUTH_CALLBACK(neonspam_event_join_nick_lookup) {
 static void neonspam_event_join_punish(struct ClientSocket *client, struct ChanUser *chanuser, struct NeonSpamSettings *settings, int action) {
     int uaccess = 0;
     if(chanuser->user->flags & USERFLAG_ISAUTHED)
-        uaccess = getChannelAccess(chanuser->user, chanuser->chan, 0);
+        uaccess = getChannelAccess(chanuser->user, chanuser->chan);
     if(uaccess >= settings->exceptlevel[SPAMSETTINGS_JOINEXCINDEX]) return;
     //scanops / scanvoiced
     MYSQL_RES *res;