mIRC Home    About    Download    Register    News    Help

Print Thread
#220560 18/04/10 03:07 AM
Joined: Jan 2007
Posts: 31
J
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2007
Posts: 31
Im trying to make a script that auto rebans a certain hostmask that gets unbanned.
For example:
I have a hostmask banned called "@****.hsd1.fl.comcast.net"
And someone else in my channel unbans it "Person sets mode: -b *!*@****.hsd1.fl.comcast.net"
I want a script that will automatically reban that same isp.
Code:
on *:UNBAN:#: {
  if ($banmask == @****.hsd1.fl.comcast.net)
  mode $chan  +b $banmask
}

I know something is wrong in the if statement but I can't figure out how to set it up properly.

Also is there a way to ban someone who is on my channel when I join? Say the persons in my channel and I'm not online. Then when I come online it will scan the users find the nickname and ban them?

Thanks alot and in advanced!

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
on *:unban:#:{
  if *.hsd1.fl.comcast.net iswm $banmask {
    .mode $chan +b $banmask
  }
}
on me:*:join:#:{
  var %bancheckchan = $chan
  .enable #bancheck
  .names $chan
}
#bancheck off
raw 366:*:{
  .disable #bancheck
  haltdef
  var %a = 1, %b = $nick(%bancheckchan,0)
  while %a <= %b {
    if *.hsd1.fl.comcast.net iswm $address($nick(%bancheckchan,%a),5) {
      .mode +b %bancheckchan $nick(%bancheckchan,%a)
    }
    inc %a
  }
}
#bancheck end


Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
When oped, it checks to see if address is banned, and if not, ban it.
on Unban, reban it
Code:
on @*:unban:#:{
  if (*!*@*.hsd1.fl.comcast.net iswm $banmask) {
    .mode $chan +b $banmask
  }
}
on *:OP:#:{
  if ($opnick == $Me) && (*!*@*.hsd1.fl.comcast.net !isban $chan) {
    mode $chan +b *!*@*.hsd1.fl.comcast.net
  }
}
  


I am SReject
My Stuff
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Keep in mind that you're banning a LOT of users from Florida using that banmask. Unless you can't make a more specific ban that works against someone causing problems, you shouldn't use that general of a banmask.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #220578 18/04/10 05:37 PM
Joined: Feb 2009
Posts: 133
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2009
Posts: 133
Riamus2 is right


WorldDMT
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
That's a wide-ranging ban you got there, buddy.....many innocent ppl will be affected.


Link Copied to Clipboard