Skip to content
MSN Addons

User Detect Halt

A TG007 community discussion started by grinning_male.

Discussion 7 posts
Page 1 of 1
Open
Topic #6217 · 7 published posts · 1,072 views

on *:join:*:{
 set %users $read(text\users.txt,w,* $+ $address($nick,1) $+ * ) | set %cok $readn
 if ($nick == $me) {
 return }
 else {
 if (!$read(text\users.txt,w,* $+ $address($nick,1) $+ *)) {
   write text\users.txt $address($nick,1) $nick
   msg $comchan($nick,1)  new Member added ( $nick ) }

 

How can I make a halt on this code so if there is a join flood it will halt after 3 or 4 joins and not message the room with all the nick joins?

try this one

 

#Onjoinwritter on
on *:join:*:{
 set -u3 %Onjoinwritter. [ $+ [ $chan ] ] $calc( %Onjoinwritter. [ $+ [ $chan ] ] + 1 )
if (%Onjoinwritter. [ $+ [ $chan ] ] == 3) { .disable #Onjoinwritter }
 if ($nick != $me) && (!$read(text\users.txt,w,* $+ $address($nick,1) $+ *)) {
   write text\users.txt $address($nick,1) $nick
   msg $comchan($nick,1) new Member added ( $nick ) 
 }
}
#onjoinwritter end

Thanks Samooh works perfect :taz:

Super

How do you add a timer to this to turn it back on say after 5 mins or so?

#Onjoinwritter on
on *:join:*:{
set -u3 %Onjoinwritter. [ $+ [ $chan ] ] $calc( %Onjoinwritter. [ $+ [ $chan ] ] + 1 )
if (%Onjoinwritter. [ $+ [ $chan ] ] == 3) { .disable #Onjoinwritter | .timeronjoinwrite 1 600 .enable #Onjoinwritter }
if ($nick != $me) && (!$read(text\users.txt,w,* $+ $address($nick,1) $+ *)) {
write text\users.txt $address($nick,1) $nick
msg $comchan($nick,1) new Member added ( $nick ) 
}
}
#onjoinwritter end

 

 

Custom Computer

AMD Athlon 64 x2 Dual Core 5200+

Asus M2N-SLI MOB

2GB DDR2 @ 800mhz

160GB Hard Drive

NVidia GeForce 8400GS 256

Thanks Molson :taz: