mIRC Home    About    Download    Register    News    Help

Print Thread
#179324 21/06/07 08:50 AM
Joined: Jan 2006
Posts: 22
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2006
Posts: 22
Ok well I am back at it again.. no luck.

I have tried on TEXT, on ACTION, and neither seemsto work..

here is what I am trying to do..
we have a bot in channel who bans certain spam bots for 45 minutes. this is all we are allowed.. so after 45 minutes it gets unbanned and the spam bot can rejoin then of course X bans it again for 45 minutes.. what I would like to do is when our bot unbans it is to have my script ban it again right away so it cant join.

when it unbans it it states

prixie sets mode -b *!*cute@*.desi.dial.ser.

is there a way to get my script to see that and reban it right away..

thanks.

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Code:
on *:UNBAN:#chan:{
  if ($banmask == *!*cute@*.desi.dial.ser) {
     mode $chan +b *!*cute@*.desi.dial.ser
  }
}


I assume *!*cute@*.desi.dial.ser isn't the ban mask though. Something (a wildcard?) seems to be missing at the end.
Also, read /help on unban

Last edited by 5618; 21/06/07 10:09 AM.
Joined: Jan 2006
Posts: 22
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2006
Posts: 22
WOOHOO.....

thanks... works great.. and yes I should have went and read help

now to see if I can add hostmasks to it or just keep adding new unban scripts... lol..

off to play

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
In the if statement, you can do multiple comparisons, just remember that for each comparison you need to specify both items that you're comparing.
eg:
Code:
if ($banmask == *!*@do.do.com) || ($banmask == *!*@no.shit.uk) {


The || means OR

Joined: Jan 2006
Posts: 22
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2006
Posts: 22
ok so I can do this.... but how do I get it to ban the second scanned IP
on *:UNBAN:#channel:{
if ($banmask == *!*cute@*.undernet.org) || {*!*PETROS_35@*.dsl.hol.gr} {
mode $chan +b *!*cute@*.undernet.org
}
}

Last edited by LordNight; 01/07/07 09:27 AM.
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
it's not "if aa == bb || cc" it's "if aa == bb || aa == cc"
So concretely:
Code:
if ($banmask == *!*cute@*.undernet.org) || ($banmask == *!*PETROS_35@*.dsl.hol.gr) {

Plus you were using { } instead of ( ) in the second statement.

Joined: Jan 2006
Posts: 22
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2006
Posts: 22
that is the way I have it.. dont know why the banmask didnt get put in there... still not banning teh petros one though after it unbans him.. it will the cute one..... aarrgggggg

this is what it should've read

Code:
on *:UNBAN:#channel:{
  if ($banmask == *!*cute@*.undernet.org) || ($banmask == *!*PETROS_35@*.dsl.hol.gr) {
    mode $chan +b *!*cute@*.undernet.org
  }
}


Originally Posted By: 5618
it's not "if aa == bb || cc" it's "if aa == bb || aa == cc"
So concretely:
Code:
if ($banmask == *!*cute@*.undernet.org) || ($banmask == *!*PETROS_35@*.dsl.hol.gr) {

Plus you were using { } instead of ( ) in the second statement.

Last edited by LordNight; 01/07/07 12:03 PM.
Joined: Jan 2006
Posts: 22
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2006
Posts: 22
Never mind.... I got it figured out....

thanks to everyone who helped me out....

your all the best.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
nah...we're just ahead of whoever's in 2nd place.

Joined: Jan 2006
Posts: 22
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2006
Posts: 22
ok this is what I have, thanks to a few here... and some of my own.
my issue is that it will only do the 2 that I have entered. and wont let me add any more to watch and keep locked out.

Code:
on *:UNBAN:#channel:{
  if ($banmask == *!*cute@*.undernet.org) || ($banmask == *!*asdfg@*.hsd1.ct.comcast.net) {
    mode $chan +b *!*cute@*.undernet.org
    if ($banmask == *!*asdfg@*.hsd1.ct.comcast.net) {
      mode $chan +b *!*asdfg@*.hsd1.ct.comcast.net
    }
  }
}


I need a way to add as many as I wish, that it will watch for our bot to unban then. and then have mine reban then right away..

Thanks again..

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You were nesting your IFs (one inside another), which won't work. Also, I don't know if you were just giving an example, but you *do* know that your first IF checks 2 banmasks and bans only one, right? I'd drop the || part and keep them separate. You can do it as shown below, or else you can just do it the way I show in the second part.

Code:
on *:UNBAN:#channel:{
  if ($banmask == *!*cute@*.undernet.org) || ($banmask == *!*asdfg@*.hsd1.ct.comcast.net) {
    mode $chan +b *!*cute@*.undernet.org
  }
  elseif ($banmask == *!*asdfg@*.hsd1.ct.comcast.net) {
    mode $chan +b *!*asdfg@*.hsd1.ct.comcast.net
  }
}


To make it easier on yourself, add users to your users list (Alt-R > Users) in this format:

StickyBan:*!*cute@*.undernet.org
StickyBan:*!*asdfg@*.hsd1.ct.comcast.net

You can do this manually, or by using the /auser command: /auser StickyBan *!*cute@*.undernet.org

Once added, you can use this script:
Code:
on @StickyBan:unban:#channel: {
  mode $chan +b $banmask
}


That will only try to ban the person if the bot running this script is an op. Then, if the banmask matches one found in your users list, it will automatically ban the person again.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard