mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2007
Posts: 34
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jul 2007
Posts: 34
I know that you can remove bans against you automatically with the script
Code:
on *:ban:#:{ if ($banmask iswm $address($me,5)) { cs unban # }


Is there a way to modify it so instead of "cs unban #" it goes "mode # -b $me"

I have it set where that works, but on the network that i use, there are 5 ban types, so every time it unbans me, it tries to do all 5, and 4 of them don't work. Eventually, I get disconnected for flooding because i receive the message that 'On is an unknown command' I am fairly sure that it's because I have 5 bantypes it tries to remove. Is there a way I can configure the script so it recognize the different ban types and only try to remove that one? All help is appreciated and thanks in advance!

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
As far as I know no network is limited to a fixed set of ban types.
Of course, there are some types used more often than others smile
Is this not sufficient?
Code:
on *:ban:#:{ 
  if ($banmask iswm $ial($me)) { mode $chan -b $banmask }
}

Edit: I did not notice the missing closing bracket at first. This missing bracket is likely to be the reason for your "on: unknown command" error.

Last edited by Horstl; 20/08/07 12:47 AM.
Joined: Jul 2007
Posts: 34
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jul 2007
Posts: 34
Thanks! That works a lot better than having 5 different on ban events!

Joined: May 2005
Posts: 74
D
Babel fish
Offline
Babel fish
D
Joined: May 2005
Posts: 74
I use this

Code:
on *:ban:#:{
  if ($banmask == $address($me,0)) || ($banmask == $address($me,1)) || ($banmask == $address($me,2)) || ($banmask == $address($me,3)) || ($banmask == $address($me,4)) || ($banmask == $address($me,5)) || ($banmask == $address($me,6)) {
    mode $chan -b $banmask
    mode $chan -o $nick
    ban # $address($nick,2)
    kick # $nick Dont ban me
    /cs kick $chan $nick Dont ban me
  }
}


It wil automaticly kick the person who banned you xD

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Originally Posted By: Dracoz
It wil automaticly kick the person who banned you xD
//me sets mode +b $gettok($address(Dracoz,3),1,64) $+ @* and starts to grin wink

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Originally Posted By: Dracoz
I use this

Code:
on *:ban:#:{
  if ($banmask == $address($me,0)) || ($banmask == $address($me,1)) || ($banmask == $address($me,2)) || ($banmask == $address($me,3)) || ($banmask == $address($me,4)) || ($banmask == $address($me,5)) || ($banmask == $address($me,6)) {
    mode $chan -b $banmask
    mode $chan -o $nick
    ban # $address($nick,2)
    kick # $nick Dont ban me
    /cs kick $chan $nick Dont ban me
  }
}


It wil automaticly kick the person who banned you xD


As a side note, you can replace that first if-statement with the following:

if ($banmask iswm $address($me,5)) { ... }

Cleaner and (presumably) faster.


-KingTomato
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
You could also replace lines 3-5 with this.

mode # -bo+b $banmask $nick $address($nick,2)

Joined: Jun 2006
Posts: 508
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
Or
  • mode # -bo+b $banmask $nick $wildsite
  • mode # -bo+b $banmask $nick $site

And
Quote:
if ($banmask iswm $address($me,5))

could be
Code:
if ($banmask iswm $ial($me))



Joined: Sep 2007
Posts: 6
A
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
A
Joined: Sep 2007
Posts: 6
or you could just do this

on wateverlevel:ban:#channelname:/mode # -b $banmask

i have mine set like this on *:ban:#:/mode # -b $banmask

Joined: Sep 2007
Posts: 10
Z
Pikka bird
Offline
Pikka bird
Z
Joined: Sep 2007
Posts: 10
Wouldn't...
Code:
if ($banmask iswm $ial($me)) { .. }


Or any other variation be triggered on someone with a similar host as your own? For example.. If my host was @p2p-59D4DBC9.mc.at.cox.net and someone banned *!*@p2p-G9T48BH6.bl.at.cox.net wouldn't that trigger it since it has the at.cox.net bit in it?

I've actually been trying to figure out a way to determine if the person being banned is you or not for a long time now.

Joined: Jun 2006
Posts: 508
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
Nope, it won't.
Try this...
//echo -ag $iif(*!*@p2p-G9T48BH6.bl.at.cox.net iswm nick!user@p2p-59D4DBC9.mc.at.cox.net,Match!,No match!)

and (if your host is cox.net - and not your example banmask)
//echo -ag $iif(*!*@p2p-G9T48BH6.bl.at.cox.net iswm $ial($me),Match!,No match!)

$ial($me) returns the same as $address($me,5) - your full address (nick!user@host)


Link Copied to Clipboard