Join/Flood Channel Protection - Forum
Friday, 09 Dec 2016, 16:27:44
Welcome on westor (^WeSt) website!
Welcome NOT MEMBER | RSS
[ New messages · Members · Forum rules · Search · RSS ]
Page 1 of 11
Forum moderator: ^WeSt 
Forum » General » mIRC Codes » Join/Flood Channel Protection (use right click on the channel for options)
Join/Flood Channel Protection
^WeStDate: Thursday, 18 Sep 2014, 21:19:42 | Message # 1
ULTRA MEMBER
Group: Administrators
Messages: 13
Awards: 0
Reputation: 0
Status: Offline
This module will kick-ban any user if trying to join/part from the channel more than 2 times, use right click on the channel for more.


Code
#join_flood on
ON !*:JOIN:#: {
   if ($me !isop $chan) { return }
   var %h = joinchan_ $+ $chan
   if ($hget(%h,$address($nick,2)) == 2) {
     if (%joinchan_flood_ban_secs) { var %s = %joinchan_flood_ban_secs }
     elseif (!%joinchan_flood_ban_secs) { var %s = $rand(300,600) }
     ban -ku $+ %s $chan $nick 2 [BANNED]: Too many join/part detected from your host/ip ( $+ $address($nick,2) $+ ), please try to join again later. - (Ban Time:  $+ $duration(%s) $+  $+ )  
     hdel %h $address($nick,2)
     return
   }
   hinc -me %h $address($nick,2)
   .timer[JOINCHAN_REMOVE_ $+ $address($nick,2) $+ _ $+ $chan $+ ] 1 60 join_chan_ok $address($nick,2) $chan
}

ON *:PART:#: { if ($nick == $me) { join_chan_off } }
ON *:DISCONNECT: { join_chan_off }
ON *:CONNECT: { join_chan_off }
#join_flood end

ON *:UNLOAD { unset %joinchan_flood_ban_secs | .disable #join_flood | var %ok = $input(The Join/Part Flood Protection module has been unloaded successfully. $crlf $crlf $+ $+ by westor,oidbk30,by westor) }
ON *:LOAD: { .enable #join_flood | var %ok = $input(The Join/Part Flood Protection module has been loaded successfully. $crlf $crlf $+ $+ by westor,oidbk30,by westor) }
alias join_chan_off { hfree -w joinchan_* | .timer[JOINCHAN_*] off }
alias join_chan_ok {  
   var %h = joinchan_ $+ $2
   if ($hget(%h,$1)) { hdel %h $1 }
}

menu channel {
   -
   Join/Part Flood Protection by westor ( $+ $upper($group(#join_flood)) $+ )
   .$iif($group(#join_flood) == off,Enable the protection): {  
     .enable #join_flood
     var %ok = $input(The Join/Part Flood Protection has been enabled.,oidbk60,by westor)
   }
   .$iif($group(#join_flood) == on,Disable the protection): {  
     .disable #join_flood
     join_chan_off
     var %ok = $input(The Join/Part Flood Protection has been disabled.,oidbk60,by westor)
   }
   .-
   .Set ban seconds: {
     var %s = $input(Enter here the second(s) that you want to ban the user from the channel,eidbk30,by westor)
     if (!%s) { return }
     if (%s) && (%s !isnum) { var %error = $input(The seconds must be only numbers!,hodbk30,by westor) | return }
     set %joinchan_flood_ban_secs %s
     var %ok = $input(The join/flood protection ban seconds has been changed!,oidbk30,by westor)
   }
   -
}


I Would Like To Kiss You But I Cant Tell Me Why Not My Baby ? ? ?
 
Forum » General » mIRC Codes » Join/Flood Channel Protection (use right click on the channel for options)
Page 1 of 11
Search:


Website builderuCoz