Kick/Ban Commands

By Cage on May 14, 2006

Kick and Ban commands for you to put on your bot. Each of the following commands needs to be used in PM (private message). Only works for channel operators.

Usage:

!kb [channel] [nickname] [reason for kick]

!k [channel] [nickname] [reason for kick]

!b [channel] [nickname]

Bans are in the form of: b>*!*@host




Enjoy.

on *:TEXT:!kb*:?: {
  if ($nick isop $2) && ($me isop $2) && ($3 ison $2) {
    mode $2 +b $address($3,2)
    kick $3- (Requested by $nick $+ )
  }
  else if ($3 !ison $2) {
    notice $nick $3 is not in $2 $+($nick,.)
  }
  else {
    notice $nick You don't have access to that command $+($nick,.)
  }
}
on *:TEXT:!b*:?: {
  if ($nick isop $2) && ($me isop $2) && ($3 ison $2) {
    mode $2 +b $address($3,2)
  }
  else if ($3 !ison $2) {
    notice $nick $3 is not in $2 $+($nick,.)
  }
  else {
    notice $nick You don't have access to that command $+($nick,.)
  }
}
on *:TEXT:!k*:?: {
  if ($nick isop $2) && ($me isop $2) && ($3 ison $2) {
    kick $3- (Requested by $nick $+ )
  }
  else if ($3 !ison $2) {
    notice $nick $3 is not in $2 $+($nick,.)
  }
  else {
    notice $nick You don't have access to that command $+($nick,.)
  }
}

Comments

Sign in to comment.
Jethro   -  Jan 28, 2011

Because the author of this old snippet missed the $2 for $chan > kick $2 $3- (Requested by $nick $+ )To make matters worse, the overall code of this snippet is redundant. For one thing, he could have made this:> mode $2 +b $address($3,2)
kick $3- (Requested by $nick $+ )
to

ban -k $2-3 3 $4-

But I suppose he didn't know about the ban command then.

 Respond  
IshWittZi   -  Jan 28, 2011

$nick No such channel <-- This comes out every time I message the bot :D

 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.