RoOm LoCkDoWn

By PyThOn on Jul 11, 2011

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
}
}

Comments

Sign in to comment.
PyThOn   -  Aug 02, 2011

-updated-

 Respond  
PyThOn   -  Aug 02, 2011

Does that mass kick them out?

 Respond  
Jethro   -  Aug 02, 2011

This is the correct construction:

on @$*:TEXT:/^([+-])TK$/i:#: {
  if ($nick == <bot_owner_nick>) {
  mode # $+($regml(1),smiljnut) 1
  msg # 12Lockdown $iif($regml(1) == -,de) Active
}
}

What you have currently is incorrect.

 Respond  
PyThOn   -  Aug 02, 2011

Thanks both of u they both help me alot

 Respond  
Jethro   -  Aug 02, 2011

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.

 Respond  
xbox_gamer1   -  Aug 02, 2011

PythOn
you can use

for channel owner only:

 if ($nick isin #) {

OR

for bot owner

if ($nick == yournick) {

hope this helps

 Respond  
PyThOn   -  Jul 12, 2011

I don't need all of your silly comments tbh.
The ones that are able to help me stay.
Aka Yours gets deleted.

And how do i make it where only a bot owner can lockdown a channel?
Thanks Meta And Thanks PuNK TuReD

 Respond  
Dani_l11   -  Jul 12, 2011

Why do you remove comments?

Also, its deactivated, not de activate.

 Respond  
Meta   -  Jul 11, 2011

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.

 Respond  
PuNkTuReD   -  Jul 11, 2011

you do realize your text events can be triggered by anyone?

 Respond  
Sorasyn   -  Jul 11, 2011

I am curious. Why do you name your snippets with a certain aesthetic annoyance. I aM NoW pOsTiNg A CoMmEnT oN yOuR sNiPpEt.

 Respond  
Scakk   -  Jul 11, 2011

You set and remove the modes all at once.

mode $chan +smiljnut 1 and mode $chan -smiljnut

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.