mIRC Home    About    Download    Register    News    Help

Print Thread
#172981 18/03/07 11:43 PM
Joined: Mar 2007
Posts: 7
M
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
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...

Code:
}
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...

Code:
}
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
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Jan 2007
Posts: 259
Code:
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
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You can replace
Code:
  else { 
    mode $2 +b $mask($address($3,2),2)
    .kick $2-3 $iif($4 == $null,$read(txt\insult.txt),$4-)
  }

with
Code:
  else { 
    .ban -k $2 $address($3,2) $iif(!$4,$read(txt\insult.txt),$4-)
  }


Joined: Oct 2006
Posts: 342
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
Code:
ban -k $2 $address($3,2)



I think this won't work right?


learn learn learn
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
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
Offline
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
R
Hoopy frood
Offline
Hoopy frood
R
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.


Link Copied to Clipboard