|
Joined: Mar 2007
Posts: 7
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Mar 2007
Posts: 7 |
Alright...I got the quote thing (THANKS KARDAFOL!)... Now what I'm trying to do is make it so I can message the bot (/msg thebot kick #channel nickname) to kick and ban people so it doesn't show my name. The kicking works fine ...Here's the scrpit for an example... }
on 100:text:kick*:?: {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me kick <#channel> <nick> [reason]. | halt }
if ($me !isop $2) && ($me !ishop $2) { .msg $nick I'm not oped in $2 $+ . | closemsg $nick | halt }
if ($me !ison $2) { .msg $nick I'm not on that channel. | closemsg $nick | halt }
if (($2 !== $null) && ($3 == $null)) { .msg $nick You didn't specified the nickname to kick | closemsg $nick | halt }
if ($level($mask($address($2,2),2)) > $level($mask($address($nick,2),2))) { .msg $nick You can't ban an operator with a higher level. | halt }
if (($2 !== $null) && ($3 !== $null) && ($level($mask($address($3,2),2)) == 500)) { .msg $nick I will not kick my owner. | halt }
if (($2 !== $null) && ($3 !== $null) && ($4 == $null)) { kick $2 $3 $read(txt\insult.txt) | closemsg $nick }
if (($2 !== $null) && ($3 !== $null) && ($4 !== $null)) { kick $2 $3 $4- | closemsg $nick }
} That works great...Now I'm trying to do kickban, but that's not working...Here's the script... }
on 100:text:kb*:?: {
if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me kb <#channel> <nick> [reason]. | halt }
if ($me !isop $2) && ($me !ishop $2) { .msg $nick I'm not oped in $2 $+ . | closemsg $nick | halt }
if ($me !ison $2) { .msg $nick I'm not on that channel. | closemsg $nick | halt }
if (($2 !== $null) && ($3 == $null)) { .msg $nick You didn't specified the nickname to kickban | closemsg $nick | halt }
if ($level($mask($address($2,2),2)) > $level($mask($address($nick,2),2))) { .msg $nick You can't ban an operator with a higher level. | halt }
if (($2 !== $null) && ($3 == $null) && ($level($mask($address($3,2),2)) == 500) { .msg $nick I will not kick ban my owner. | halt }
if (($2 !== $null) && ($3 == $null)) { mode $chan +b $mask($address($2,2),2) | .kick $chan $2 $3 $read(txt\insult.txt) | closemsg $nick | halt }
if (($2 !== $null) && ($3 !== $null) && ($4 !== $null)) { mode $chan +b $mask($address($2,2),2) | .kick $chan $2 $3 $4- | closemsg $nick | halt }
} I can do /msg thebot kb #channel And it will tell me to specify a nickname, so that part is ok... but when I add the nickname, nothing happens...But in the bots window in mIRC, it shows part of the message/command I just sent...Like if I say /msg thebot kb #channel nickname It will query the bot with kb #channel nickname.. It's very fustrating, I searched here for answers and many other places without luck. I tried providing as much info on this as possible above. Any help would be appreciated with the kickban script.
Canadian newbie
|
|
|
|
Joined: Jan 2007
Posts: 259
Fjord artisan
|
Fjord artisan
Joined: Jan 2007
Posts: 259 |
on 100:text:kb*:?: {
if ($2 == $null) .msg $nick Command incomplete. Syntax: /msg $me kb <#channel> <nick> [reason].
elseif ($me !isop $2) .msg $nick I'm not oped in $2 $+ .
elseif ($me !ison $2) .msg $nick I'm not on that channel.
elseif ($3 == $null) .msg $nick You didn't specified the nickname to kickban
elseif ($level($mask($address($2,2),2)) > $level($mask($address($nick,2),2))) .msg $nick You can't ban an operator with a higher level.
elseif ($level($mask($address($3,2),2)) == 500) .msg $nick I will not kick ban my owner.
else {
mode $2 +b $mask($address($3,2),2)
.kick $2-3 $iif($4 == $null,$read(txt\insult.txt),$4-)
}
.closemsg $nick
}
Replace the old code with this, and it should work =)
Those who can, cannot. Those who cannot, can.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
You can replace else {
mode $2 +b $mask($address($3,2),2)
.kick $2-3 $iif($4 == $null,$read(txt\insult.txt),$4-)
} with else {
.ban -k $2 $address($3,2) $iif(!$4,$read(txt\insult.txt),$4-)
}
|
|
|
|
Joined: Oct 2006
Posts: 342
Fjord artisan
|
Fjord artisan
Joined: Oct 2006
Posts: 342 |
I think this won't work right?
learn learn learn
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Why not? $2 is the channel and $3 is the nick.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Because you can't kick an address.
However, you can do:
/ban -k $2 $3 2
Or, if you want to use that reason $iif that you have, you can do:
/ban -k $2 $3 2 $iif(!$4,$read(txt\insult.txt),$4-)
The red "2" is the mask that you want to use.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Oh, yeah...I did know that, not sure why I coded it the way I did, rather than using the format that you showed, Riamus.
|
|
|
|
|