Lockdown

By Mudkipz on Sep 10, 2008

Does what it says on the tin! It virtually locks down your Channel, Applying mode s(secret)m(Moderated) and i(Invite) while kicking all the unvoiced, Voice all the people you want kept in the chan.
To unapply the modes do !lockdown off and !lockdown to activate.
This is an Input and text, So ops in your cahn can use it, But not halfops!

NOTE: I left mode +v off, incase you forget to voice someone and need to invite them in
Also, Please dont claim this script as your own, This took me some time to make.

Triggers fixed

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Server: Irc.swiftirc.net      ;;;
;;; Nicks: iHawk iRwar Kitty_Rwar ;;;
;;; Leo_cool_1 Mr`Wiskers|away    ;;;
;;; Channels: #tk #mudkip         ;;;
;;; Email: Mudkipz@scripting.net  ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

on *:input:#: {
if ($1- == !lockdown) {
    set %e 1 
    :fred
    set %chan $nick(#,%e,reg)
    if (%chan == $null) { 
      halt
    }
    elseif (%chan ison #) && (%chan == $me) { 
      inc %e
      goto fred
    }
    elseif (%chan isreg #) || (%chan isvoice #) || (%chan isop #) {
      kick # %chan 
      mode # +i
      mode # +s
      mode # +m
      inc %e
      goto fred
    }
  }
  if ($1- == !lockdown off) {
    /mode # -i
    /mode # -s
    /mode # -m
}

on *:text:*:#: {
  if ($1- == !lockdown) {
if ($nick isop $chan) {
    set %e 1 
    :fred
    set %chan $nick(#,%e,reg)
    if (%chan == $null) { 
      halt
    }
    elseif (%chan ison #) && (%chan == $me) { 
      inc %e
      goto fred
    }
    elseif (%chan isreg #) || (%chan isvoice #) || (%chan isop #) {
      kick # %chan Lockdown
      mode # +i
      mode # +s
      mode # +m
      inc %e
      goto fred
    }
  }
  if ($1- == !lockdown off) {
if ($nick isop $chan) {
    /mode # -i
    /mode # -s
    /mode # -m
  }
}

Comments

Sign in to comment.
Mudkipz   -  Sep 10, 2008

I seen i forgot the bracket, Internet was down tho.

 Respond  
napa182   -  Sep 10, 2008

you should look into while loops as well you can put the chan modes on one line

on @*:text:*:#: {
  if ($nick isop #) {
    if ($1 == !lockdown) {
      set $+(%,lockdown,.,$chan) on
      mode # +ism
      var %a = $nick(#,0,r), %o = 1
      while (%o <= %a) {
        ban -ku30 # $nick(#,%o,r) 2 Channel LockDown
        inc %o 
      }
    }
    if ($1 == !lockdownoff) { if ($($+(%,lockdown,.,$chan),2)) { mode # -ism | unset $+(%,lockdown,.,$chan) } }
  }
}
on @*:input:#: {
  if ($1 == !lockdown) {
    set $+(%,lockdown,.,$chan) on
    mode # +ism
    var %a = $nick(#,0,r), %o = 1
    while (%o <= %a) {
      ban -ku30 # $nick(#,%o,r) 2 Channel LockDown
      inc %o 
    }
  }
  if ($1 == !lockdownoff) { if ($($+(%,lockdown,.,$chan),2)) { mode # -ism | unset $+(%,lockdown,.,$chan) } }
}
 Respond  
Zmodem   -  Sep 10, 2008

This still doesn't work, because you need a { after the *ON :INPUT:#:**.

 Respond  
Jonesy44   -  Sep 10, 2008

Lol, you may want to consider running it through mIRC script dialog to add correct alignment

 Respond  
Mudkipz   -  Sep 10, 2008

OH NOW I SEE! Sorry =( You were right, i forgot the input since it was was at the bottom of my input list. Fixed

 Respond  
Zmodem   -  Sep 10, 2008

Too early in the stages of coding. Like Akishoot said, no event/menu for locking down the channel in the first place. This will not work.

 Respond  
Jonesy44   -  Sep 10, 2008

How can you test this, when there is absolutely no trigger?

 Respond  
Akishoot   -  Sep 10, 2008

No... The very first line of the actual coding. You're missing the on EVENT part...

if ($1- == !lockdown) {
    set %e 1 
    :fred
    set %chan $nick(#,%e,reg)
    if (%chan == $null) { 
      halt
    }
    elseif (%chan ison #) && (%chan == $me) { 
      inc %e
      goto fred
    }
    elseif (%chan isreg #) || (%chan isvoice #) || (%chan isop #) {
      kick # %chan 
      mode # +i
      mode # +s
      mode # +m
      inc %e
      goto fred
    }
  }
  if ($1- == !lockdown off) {
    /mode # -i
    /mode # -s
    /mode # -m
}
 Respond  
Mudkipz   -  Sep 10, 2008

These scripts have been fully tested... I havnt made a single mistake, you dont need to put the access level if thats what you mean the *:text: Works, I use it in all my scripts

 Respond  
rhasttaff   -  Sep 10, 2008

hello! i think that you have missed the 1° event

i dontknow if it
on :text::#: {
or
on :input::#: {

Jah Bless´´´

 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.