JS Unregkicker

By Joystyk on Oct 07, 2008

Okay, we've been having some interesting bits of people coming in to a certain channel. The only people who EVER use the channel are Registered... It's a MINIMUM Prerequisite to be accepted. So like I was saying, we needed a method to stop the unwanted from coming in. This script isn't too Valuable, but it's working well with my bot, to help deter alot of the said unwanted visitors. This only works on Servers WITH chanserv, obviously...

The amount of times it will perform the unreg kick can be altered, by taking the 0 (which loops it, when it's set) and adding the number you would like, for the amount you would like.

And as well, you can alter the amount of time inbetween, by changing the 300, to whatever number you'd like. (Mind you, the number that goes here is how many SECONDS inbetween. 300 = 5 minutes.. Be careful.)

Enjoy.

EDITED to Silence the timers, as well as work in active channel, as opposed to a specified (IN SNIPPET) Channel, per suggestion. As well as appreciation for the begining portion

menu nicklist {
  .Unreg Kick ( $+ $iif(%unregkick == on,On ( $+ $timer([unregkick]).secs secs left),Off) $+ ): {
    if (%unregkick == on) {
      set %unregkick off | .timer[unregkick] off | .notice $chan Unreg Kicks will no longer be performed.
    }
    else {
      set %unregkick on | .timer[unregkick] 0 300 .msg chanserv unregkick $chan | .notice $chan Activation of timed Unreg Kick Confirmed. This channel is now periodically eliminating unregistered nicks. Please refrain from using such.
    }

  }
}

Comments

Sign in to comment.
Joystyk   -  Oct 31, 2008

Edited with timer. Awesome Idea!

 Respond  
Superior   -  Oct 08, 2008

Another small suggestion, if you want to know how long it takes before the next check is performed, you could add this line:*

  .Unreg Kick ( $+ $iif(%unregkick == on,On ( $+ $timer([unregkick]).secs secs left),Off) $+ ): {

*Replace with: .Unreg Kick ( $+ $iif(%unregkick == on,On,Off) $+ ): {

 Respond  
Joystyk   -  Oct 08, 2008

EDITED to Silence the timers, as well as work in active channel, as opposed to a specified (IN SNIPPET) Channel, per suggestion. As well as appreciation for the begining portion, to Superior. A portion in which has eluded me for the longest time. :P

 Respond  
^Neptune   -  Oct 07, 2008

You don't need to use // at the start of every command, just the command itself like "notice" will do. :]. / and // are just used for the mIRC editbox to interpret the thing you're typing is a command.

Also, you can put a . before the timers so that they don't show up when they're activated.

 Respond  
Superior   -  Oct 07, 2008

However I am not familiar with the command unregkick, I suggest you change a few things:

menu nicklist { 
  .Unreg Kick ( $+ $iif(%unregkick == on,On,Off) $+ ): {
    if (%unregkick == on) {
      set %unregkick off | .timer[unregkick] off | .notice $chan Unreg Kicks will no longer be performed. 
    }
    else {
      set %unregkick on | .timer[unregkick] 0 300 .msg chanserv unregkick $chan | .notice $chan Activation of timed Unreg Kick Confirmed. This channel is now periodically eliminating unregistered nicks. Please refrain from using such. 
    }

  }
}

This way it:
Will work at the first try!
Will work on the channel you are currently on!
Will silence the message to chanserv and the channel!

Overall, its a nice code, however you can do this with the level system inside chanserv too!

 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.