Kick Me/Ban Me/KickBan Me

By MaxEvans on Mar 16, 2009

This is a fun little script I made a while back. It fits perfectly with truth or dare games. (I dare you to type !kickme) It was a completely random idea me and my brother came up with.

Commands:
!kickme
!banme
!kickbanme

Bans for 30 seconds.

on *:Text:*:#:{
if ($1 == !kickme) { kick # $nick Kicked on request }
  elseif ($1 == !kickbanme) { ban -ku30 # $nick 2 Kick + 30 second ban by request }
  elseif ($1 == !banme) { ban -u30 # $nick 2 | msg # $nick activated a 30 second ban by request. }
}

Comments

Sign in to comment.
Jethro   -  Mar 17, 2009

Slacker, why do you use the regular expressions when it has nothing to do with the commands? If the regex is used, you should change your code to this:

on $*:Text:/^!(kickme|kickbanme|banme)$/S:#:{
  if ($regml(1) == kickme) { kick # $nick Kicked on request }
  elseif ($regml(1) == kickbanme) { ban -ku30 # $nick 2 Kick + 30 second ban by request }
  elseif ($regml(1) == banme) { ban -u30 # $nick 2 | msg # $nick activated a 30 second ban by request. }
}

Otherwise, you could just use:

on *:Text:*:#:{
if ($1 == !kickme) { kick # $nick Kicked on request }
  elseif ($1 == !kickbanme) { ban -ku30 # $nick 2 Kick + 30 second ban by request }
  elseif ($1 == !banme) { ban -u30 # $nick 2 | msg # $nick activated a 30 second ban by request. }
}
 Respond  
slacker   -  Mar 16, 2009

you could put them under one event

on $*:Text:/^!(kickme|kickbanme|banme)$/S:#:{ 
  if ($1 == !kickme) { kick # $nick Kicked on request }
  elseif ($1 == !kickbanme) { ban -ku30 # $nick 2 Kick + 30 second ban by request }
  elseif ($1 == !banme) { ban -u30 # $nick 2 | msg # $nick activated a 30 second ban by request. }
}
 Respond  
Kirby   -  Mar 16, 2009

My apologies, I forgot the $chan.

on *:text:!kickbanme:#: { !ban -ku30 # $nick Kick + 30 second ban by request }

You only need $chan or # when it's an event. For aliases, however, $chan or # are not necessary.

 Respond  
MaxEvans   -  Mar 16, 2009

I just used that as a test on my bot, and it didn't do anything. But when I typed /!ban MyNick on the bot, it did. Which is weird.

The status window showed this.

  • /ban: invalid parameters
 Respond  
Kirby   -  Mar 16, 2009

Sounds okay. :-)

You can also use the power of the prefixes that mIRC's default /ban has, to kick+ban the user.

On *:Text:!kickbanme:#: {
  /kick $chan $nick Kick + 30 second ban by request
  mode $chan +b $nick
  .timer 1 30 mode $chan -b $nick
}

can be also rewritten as
on *:text:!kickbanme:#: { !ban -ku30 # $nick Kick + 30 second ban by request }The -k switch means to 'kick', and the u30 switch means to (unban or unset, either one works) in N seconds. The 2 after the $nick is the ban mask. The kind of ban mask you supplied wasn't a real one as it was a nick ban. I prefer using mask 2 as it is the most "unique" ban mask out of all of them.
In this situation where you're "playing around", almost any ban mask is fine, unless you share a channel with a few dozen New Yorkers with the same ISP. You can use the same concept that I used, but with the "ban me".

If you noticed, I put

/!ban

instead of

/ban

.
Using ! before a command means taking the original one (very useful when dealing with common mIRC default aliases such as /kick and /ban). This means it won't take any modified aliases that a person who might use this script has; it's safer this way, and can prevent errors.

 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.