I made this snippet to help me LockDown rooms easyer.
This snippet is very simple.
+tk to Start/Activate the lockdown
-tk to de Activate.
There is also a mass kick option where i picked up from: http://www.hawkee.com/snippet/5426/
Go to the user and then go to controls then mass kick them. . Also if someone is still able to join the room and has mod it will de op them.
The Bot or user must have Admin/IRCop, Or Room Owner to use this.
So yeah enjoy!
;Made by PyThOn
menu nicklist {
Control
.Mass Kick { masskick $chan }
}
alias masskick {
if ($1 != $null) { set -u5 %channel $1 | names $1 }
}
raw 353:*:{
if ($3 == %channel) {
set %masskick $remove($1-,^,~,&,@,%,+,$me = $3)
set %loop $numtok(%masskick,32)
while (%loop > 0) {
if ($gettok(%masskick,%loop,32) != $me) { kick %channel $gettok(%masskick,%loop,32) Room Lockdown! }
dec %loop
}
unset %masskick %channel %loop
}
}
on @$*:TEXT:/^([+-])TK$/i:#: {
if ($nick == <bot_owner_nick>) {
mode # $+($regml(1),smiljnut) 1
msg # 12Lockdown $iif($regml(1) == -,de) Active
}
}
I wouldn't use isin if I were you, it's too great a chance to get your script compromised by another nickname who shares part of yours.
Let's say > PyThOn is the owner nickname and someone named > GrumpyPyThOn996 will be able to command and take charge of the client running the code.
I would use
if ($wildsite == $address($me,2)) {
if you run two mIRC using the same host
Or
if ($wildsite == *!*@YourHostHere) {
To specify your own.
The on TEXT's can be combined:
on $*:TEXT:/^([+-])TK$/i:#: {
mode # $+($regml(1),smiljnut) 1
msg # 12Lockdown $iif($regml(1) == -,de) Active
}
PuNkTuReD is correct though, to an extent, though technically speaking, anyone will be able to lock down the channel, but only voices up will be able to unlock it.