mIRC Home    About    Download    Register    News    Help

Print Thread
remove ban by mode, not chanserv #183436 20/08/07 12:28 AM
Joined: Jul 2007
Posts: 34
D
dylaninfd Offline OP
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!

Re: remove ban by mode, not chanserv [Re: dylaninfd] #183440 20/08/07 12:35 AM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
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.
Re: remove ban by mode, not chanserv [Re: Horstl] #183445 20/08/07 01:02 AM
Joined: Jul 2007
Posts: 34
D
dylaninfd Offline OP
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!

Re: remove ban by mode, not chanserv [Re: dylaninfd] #183568 21/08/07 02:17 AM
Joined: May 2005
Posts: 74
D
Dracoz Offline
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

Re: remove ban by mode, not chanserv [Re: Dracoz] #183586 21/08/07 06:47 AM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
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

Re: remove ban by mode, not chanserv [Re: Dracoz] #183676 21/08/07 07:12 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
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
Re: remove ban by mode, not chanserv [Re: Dracoz] #183677 21/08/07 07:16 PM
Joined: Dec 2002
Posts: 2,013
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,013
You could also replace lines 3-5 with this.

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

Re: remove ban by mode, not chanserv [Re: RoCk] #183958 24/08/07 12:05 AM
Joined: Jun 2006
Posts: 508
D
deegee Offline
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))



Re: remove ban by mode, not chanserv [Re: dylaninfd] #185745 13/09/07 12:09 PM
Joined: Sep 2007
Posts: 6
A
ashleyb Offline
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

Re: remove ban by mode, not chanserv [Re: dylaninfd] #185776 13/09/07 08:17 PM
Joined: Sep 2007
Posts: 10
Z
zaqwsxcde Offline
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.

Re: remove ban by mode, not chanserv [Re: zaqwsxcde] #185780 13/09/07 09:52 PM
Joined: Jun 2006
Posts: 508
D
deegee Offline
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)