Top

Revolveing Door Kick/ban

Please Register to submit score.
Average Score  7.2
Scores Submitted  6
Date Added  Oct 02, 2007
Last Updated  May 14, 2008
Tags  ban  bot  door  kick  revolveing 

Introduction

add to a new remote and set Ur self as Bot owner by typing /owner UrNick on Ur bot's side then use !revolve on #channelhere to turn it on a channel and !revolve off #channelhere to take it off a channel use !rrooms to list channels you have it working on, and !revolve set number to set number of join's you want it to kick/ban for..

Grab the Code

Comments

  (6)  RSS
KuTsuM
Comments: 139
 
mIRC Snippet:  Revolveing Door Kick/ban
Posted on Oct 3, 2007 10:18 pm
Couple of things I noticed upfront from just glancing at the code:
if (($nick != %botking) && ($2 == on)) {
Ban -ku60 $chan $nick How Dare You Try And Use Commands You Don't Have Access To
}
elseif (($nick != %botking) && ($2 == off)) {
Ban -ku60 $chan $nick How Dare You Try And Use Commands You Don't Have Access To
}

That is a waste of code and can simply be shortened to:
if ($nick != %botking) ban -ku60 $chan $nick How Dare You Try And Use Commands You Don't Have Access To
elseif () { }


Also, $3 is really important to the process so you should check to see if it is specified before setting the variable:
elseif (($nick == %botking) && ($2 == on)) {
set %door [ $+ [ $3 ] ] on
should be.. elseif (($nick == %botking) && ($2 == on) && ($3) {
set %door [ $+ [ $3 ] ] on
KuTsuM
Comments: 139
 
mIRC Snippet:  Revolveing Door Kick/ban
Posted on Oct 3, 2007 10:27 pm
on *:join:%revolve: {
if ($nick isreg #) {
inc -u60 %revolvingdoor. [ $+ [ $nick ] ]
if (%revolvingdoor. [ $+ [ $nick ] ] = %setrevolve) {
Ban -ku600 $chan $nick This Room Has No Revolving Door
}
}
}

The above code won't work if you have more than one channel set. Here's how you do it to allow more:

on *:JOIN:#: {
if (!$istok(%revolve,$chan,44)) halt
if ($nick isreg #) {
inc -u60 %revolvingdoor. [ $+ [ $nick ] ]
if (%revolvingdoor. [ $+ [ $nick ] ] = %setrevolve) {
Ban -ku600 $chan $nick This Room Has No Revolving Door
}
}
}
RubixCube
Comments: 53
 
mIRC Snippet:  Revolveing Door Kick/ban
Posted on Oct 3, 2007 10:52 pm
It's not bad. But why not just generalize the if ($nick (!)= %botking) events? It's rather pointless to constantly use an if ($nick (!)= %botking in each if statement.
napa182
Comments: 743
 
mIRC Snippet:  Revolveing Door Kick/ban
Posted on Oct 4, 2007 12:23 am
Quote:
The above code won't work if you have more than one channel


hmm seems to work for me like that =/
mountaindew
Comments: 1,379
 
mIRC Snippet:  Revolveing Door Kick/ban
Posted on Oct 5, 2007 4:33 pm
KuTsuM, use

Code:
[code]on *:event:*:#channel:{[/code]

to show the code box :P
SnoooP
Comments: 348
 
mIRC Snippet:  Revolveing Door Kick/ban
Posted on May 14, 2008 8:40 pm
:D works well

Please Register or Login to start posting comments.
Bottom