Sponsored Links




Topic Options
Rate This Topic
#2704 - 07/22/08 05:07 PM !kick and !ban Script
usrbingeek Administrator Offline
WyldRyde Staff

Registered: 07/31/06
Posts: 470
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: 50
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: 108
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


Recent Posts
Rules for Voiced (+v) users in #Chris
by Axlin
Yesterday at 05:36 PM
WyldRyde Channel Management Script **BETA**
by usrbingeek
11/19/08 12:35 AM
Saying Hello
by cirian75
11/18/08 02:13 PM
Multiple Network question
by usrbingeek
11/16/08 10:00 PM
Recruiting new ops and half ops in #iPhone
by techman224
11/14/08 07:09 PM
Common Commands Script
by burace17
11/14/08 02:55 PM
Rules for Voiced Users being Enforced More
by abcd
11/14/08 08:33 AM
New bot policy
by Freekie
11/11/08 10:11 PM
my favorite channels on WR
by sbushfan11
11/10/08 05:42 AM
Volunteer Half-Op Positions Available In My New Ch
by mikem
11/08/08 03:16 PM
Script Bots. Need One?
by Samuel
11/07/08 10:10 PM
Services Help Version 2.4
by Jerry
11/06/08 09:41 PM
Recent Pics
mIRC on Linux???
Computer Spam o_O
My Windows Desktop
Who's Online
1 registered (Ryan), 5 Guests and 5 Spiders online.
Key: Admin, Global Mod, Mod
Top Posters
usrbingeek 469
Kat 266
iPhone 108
Phil 91
Freekie 85
techman224 75
CCMike 73
Justin 70
tengrrl 55
wirelesspacket 52
Terms Of Use
Use of this community signifies your agreement to the Terms Of Service and Conditions of Use.