• Home
  • Servers
  • Chat
  • Channels
  • Commands
  • Forum
  • FAQ
  • Software
  • Quotes
Topic Options
Rate This Topic
#2704 - 07/22/08 05:07 PM !kick and !ban Script
usrbingeek Offline

WyldRyde Staff

Registered: 07/31/06
Posts: 646
Loc: Burlington, VT
This script allows your mIRC bot to kick or ban users on your command. This is similar to BotServ Fantasy commands and I strongly suggest you use botserv's fantasy commands in place of this script: /msg botserv set #yourchannel fantasy on


If you still want to use this, first copy this line to your Variables and change the example protectednicks to nicks of users you never want kicked or banned. If you don't have any just leave the variable empty. If you have more then you may add more. All nicks should be separated by a space.
Code:
%nickwhitelist protectednick1 protectednick2 protectednick3



Copy this code to your Remote tab and change #YOURCHANNEL to your channel's name.
Code:
on !*:TEXT:!ban*:#YOURCHANNEL:{
  if (($2 != $me) && (, $+ $2 $+ , !isin %nickwhitelist)) {
    if ($nick isop $chan) {
      if ($3) {
        ban -ku $+ $3 $chan $2 $4-
      }
      if (!$3) {
        msg $nick $2 banned for 300 seconds since you didn't include how many seconds the ban should last.
        ban -ku300 $chan $2
      }
      if (!$2) {
        msg $nick you need to specify a nick! Proper syntax is !ban <nick> <timeinseconds> e.g. !ban nick 300
      }
    }
}
on !*:TEXT:!kick*:#YOURCHANNEL:{
  if (($2 != $me) && (, $+ $2 $+ , !isin %nickwhitelist)) {
    if ($nick isop $chan) {
      if ($3) {
        kick $chan  $2 $3 
        }
      if (!$3) {
        kick $chan  $2 Stop it!
      }
      if (!$2) {
        msg $nick you need to specify a nick! Proper syntax is !kick <nick> <reason> e.g. !kick nick Don't spam
        }
    }
}


The ban script is used by typing !ban nick time
If time isn't include the user will only be banned for 300 seconds. (You may not use this script to permamently ban any user.)

The kick script is used by typing !kick nick reason
If a reason isn't provided, "Stop it!" will be used.

Feel free to edit this script if it doesn't meet your needs.
_________________________
WyldRyde IRC Network
Steve Mermelstein
Root Admin

#!/usr/bin/geek
My Amazon.com Wishlist

Please no PMs. Please post to a topic instead so your question(s) may benefit others.

Top
Sponsored Links
Sponsored Links
Member
*****

Registered: 27/08/04
Posts: 10136
Loc: Mountain View, CA
Top
#2705 - 07/22/08 05:27 PM Re: !kick and !ban Script [Re: usrbingeek]
jwire4 Offline
Over 50 posts

Registered: 03/18/08
Posts: 55
Loc: Califotnia
nice script! great job as always usrbingeek smile
_________________________
<witty comment here>

Top
#2706 - 07/22/08 05:29 PM Re: !kick and !ban Script [Re: jwire4]
iPhone Offline
Over 100 posts

Registered: 03/08/08
Posts: 118
Loc: New Jersey
I'll try it out.. see if I can get it working... but I think I'll stick to the botserv
_________________________
-Kevin C. Nunez, CEO and Founder of #iPhone on WyldRyde

Top


Moderator:  Jeff, mandy, usrbingeek