Well, basically, if someone joins your channel but he/she didn't stay in it for AT LEAST 60 seconds, then he/she gets banned for 5 minutes.
By the way, type:
/chan (channel that you want to set this joiner-protector)
For example:
/chan #mystery
Thus, the protector for the joiner will work in #mystery.
Fell free to edit it! :)
on *:JOIN:%chan: {
set %joined [ $+ [ $nick ] ] on
timer 1 60 set %joined [ $+ [ $nick ] ] off
}
on *:PART:%chan: {
if (%joined [ $+ [ $nick ] ] == on) {
ban -ku300 $chan $nick 4,8/!\ Joining and parting for nothing is not allowed in this chan! Now you are banned for 5 minutes! 4,8/!\
set %joined [ $+ [ $nick ] ] off
halt
}
}
alias chan {
if ($1 == $null) { echo Specify the channel you want the Joiner Protector to work at! | halt }
set %chan $2
echo Joiner protector will work in $1 $+ !
}
alias chanOff {
if (%chan == $null) { echo You did not set a channel! Use /chan (channel-name) to set a chan for the joiner protector! | halt }
unset %chan
echo You have succesfully unset the chan for the joiner protector!
}
@MitchellGled - The person that codes the snippet is going to think it's cool. >.>
I\'m not really in to these kind of things, but the code needs a lot of improvements and I don\'t think anyone else has stepped up to the plate yet:
I\'d use $wildsite preferably as they could easily change nicks and comeback. And you should change the set %joined [ $+ [ $nick ] ] to unset %joined [ $+ [ $nick ] ] as your variables would flood out easily. Also, your /chan alias won\'t work because you are setting %chan to $2 instead of $1. And if we don\'t specify $2, then who nothing will work. Your /chanoff alias, your /echo command should be %chan and not chan. You could also receive an error message if you are not an op in %chan, so please provide error checking and clean up the code. Finally, please learn how to use if then else statements. /help $wildsite and /help if then else 2/10 really.
nice little script. functional and useful. very close in operation and code to mine and i had to check for a moment lol... but i use wildsite alot. dont ask why, i know alot of people shun it\'s use.
as for the ban. i see you have used the kick ban. not needed. all you need is a simple \" ban -u600 or what ever \" not the \"ban -ku300 or whatever\" once they are banned and out the channel, the ban prevents them from coming back anyway until the timer expires.
one thing i had forgot in mine which you have got right though is the protect check. you could also use the isop check to protect any ops in channel from pings or accidental closures. maybe edit to check for that? what you think
you can do this :
[c] alias chan {
if ($1 == $null) { echo Specify the channel you want the Joiner Protector to work at! | halt }
if (%chan != $null) { /set %chan $addtok(%chan,,44) $+ , $+ $1 | %finish = $input(Channel $1 Added!,68) }
else { /set %chan $1 | %finish = $input(Channel $1 Added!,68) }
echo Joiner protector will work in $1 $+ !
}
[/c]