mIRC Homepage
Posted By: ragaroah Whats the command for this? - 10/05/04 10:58 PM
When some1 kicks me or the bot, he/she gets kicked and banned for 2 mins.
How can I do this?
Posted By: Adamaru Re: Whats the command for this? - 11/05/04 12:17 AM
whith a timer i think smile

/timer 1 [duration of ban] mode $chan -b $nick (or the mask of the target)
Posted By: Axiom Re: Whats the command for this? - 11/05/04 12:42 AM
That works, but its more efficient to just use the built-in /ban -uN command, where N = number of seconds to delay before unbanning. for two minutes you'd set -u120


/ban [-kruN] [#channel] <nickname|address> [type]
Bans someone from the current channel using their address. To do this, it first does a /userhost on the user, which gives it the user's address, and then it does a /mode # +b <user address>.

If you specify the -k switch, mIRC performs a ban/kick combination on the nickname.

If you specify the -uN switch, mIRC pauses N seconds before removing the ban.

If you specify the -r switch, /ban removes the ban of the specified type for that nickname, eg. /ban -r nick 2

If you do not specify a ban type, then mIRC uses the whole nick!*user@host to do the ban. If you are banning an IP address then a wild card replaces the last number of the IP address. If you are on the channel then the #channel specification is not necessary.

If you specify a wildcard address it is used as-is, if you specify a full address then the type mask is applied to it.

For a list of ban types see the $mask identifier.

Note: This command uses the IAL maintained by mIRC.
Posted By: RockSteady Re: Whats the command for this? - 11/05/04 07:42 AM
Try ban -ku120
k kicks and u120 is 120 seconds aka 2 minutes
Posted By: ragaroah Re: Whats the command for this? - 11/05/04 01:35 PM
Hmm, well any1 got an already made line for that?
The best I can do is paste it in remote grin
I dont get the above...which part do I past in?
Posted By: RockSteady Re: Whats the command for this? - 11/05/04 01:57 PM
ban -ku120 $chan $nick Reason here
Posted By: x3RiouS Re: Whats the command for this? - 11/05/04 04:31 PM
That's what I have:
Code:
on *:BAN:#: {
  if ($nick == $me) halt
  if (%on.ban == on &amp;&amp; $banmask iswm $address($me,-1)) { %on.ban.kin $replace(%on.ban.target,@chan,$chan,@nick,$nick) $replace(%on.ban.msg,@chan,$chan,@nick,$nick,@me,$me) }
  if ($me !isop $chan) halt
  if ($banmask iswm $address($me,-1)) { mode $chan -b-o+b $banmask $nick $address($nick,2) | kick $chan $nick Don't mess with x3RiouS man! | halt }
}

It's only if someone bans you....
and I didn't write it, it's from a script.
Posted By: landonsandor Re: Whats the command for this? - 11/05/04 04:41 PM
Just to make things simpler:

Code:
on @!*:BAN:#: {
  if (%on.ban == on &amp;&amp; $banmask iswm $address($me,-1)) { %on.ban.kin $replace(%on.ban.target,@chan,$chan,@nick,$nick) $replace(%on.ban.msg,@chan,$chan,@nick,$nick,@me,$me) }
  if ($banmask iswm $address($me,-1)) { mode $chan -b-o+b $banmask $nick $address($nick,2) | kick $chan $nick Don't mess with x3RiouS man! | halt }
}


The @ before the * tells mirc to ONLY work if you're OPPED so the if ($me !isop $chan) comparison isnt even needed. Also, the ! before the * tells mirc to look for OTHER PEOPLE triggering this and to IGNORE it if YOU trigger it. Type /help Access levels in mirc for more info.
Posted By: Wolfie Re: Whats the command for this? - 12/05/04 07:03 PM
To make it even simpler:
Code:
on @!*:BAN:#: {
  if ($banmask !iswm $address($me,5)) { return }
  if (%on.ban == on) { %on.ban.kin $replace(%on.ban.target,@chan,$chan,@nick,$nick) $replace(%on.ban.msg,@chan,$chan,@nick,$nick,@me,$me) }
  mode $chan -bo+b $banmask $nick $address($nick,2)
  kick $chan $nick Don't mess with x3RiouS man!
}

My question though - what's the purpose of setting %on.ban.kin? Just curious as it seems to serve no purpose in this script.
Posted By: Collective Re: Whats the command for this? - 12/05/04 07:09 PM
I don't think it is setting %on.ban.kin, there is no = or set/var command.

It will perform whatever %on.ban.kin is set to as a command.
Posted By: Wolfie Re: Whats the command for this? - 12/05/04 07:13 PM
Oh, true enough. cool I thought it was setting the values, overlooked that it was using it to execute a line. Thanks for pointing that out.
© mIRC Discussion Forums