mIRC Home    About    Download    Register    News    Help

Print Thread
#82640 10/05/04 10:58 PM
Joined: Mar 2004
Posts: 3
R
Self-satisified door
OP Offline
Self-satisified door
R
Joined: Mar 2004
Posts: 3
When some1 kicks me or the bot, he/she gets kicked and banned for 2 mins.
How can I do this?

Joined: May 2004
Posts: 8
A
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
A
Joined: May 2004
Posts: 8
whith a timer i think smile

/timer 1 [duration of ban] mode $chan -b $nick (or the mask of the target)

Joined: May 2004
Posts: 3
A
Self-satisified door
Offline
Self-satisified door
A
Joined: May 2004
Posts: 3
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.

Last edited by Axiom; 11/05/04 12:58 AM.
Joined: May 2004
Posts: 11
R
Pikka bird
Offline
Pikka bird
R
Joined: May 2004
Posts: 11
Try ban -ku120
k kicks and u120 is 120 seconds aka 2 minutes

Joined: Mar 2004
Posts: 3
R
Self-satisified door
OP Offline
Self-satisified door
R
Joined: Mar 2004
Posts: 3
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?

Joined: May 2004
Posts: 11
R
Pikka bird
Offline
Pikka bird
R
Joined: May 2004
Posts: 11
ban -ku120 $chan $nick Reason here

Joined: May 2004
Posts: 23
X
Ameglian cow
Offline
Ameglian cow
X
Joined: May 2004
Posts: 23
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.

Joined: Dec 2002
Posts: 1,534
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,534
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.


Those who fail history are doomed to repeat it
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
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.

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
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.

Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
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.


Link Copied to Clipboard