mIRC Home    About    Download    Register    News    Help

Print Thread
relay channel advertiser #162534 19/10/06 02:06 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Can someone please make a script that will check when a nick that sends a spam #channel from outside the channel and find a matching ip in the channel I am op in and ban that ip or nick?

Re: relay channel advertiser #162535 19/10/06 08:33 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
How about this?

Code:
on @*:text:*:#: {
  if ($nick !ison $chan) {
    var %nick.addr = $address($nick,2)
    var %cnt = $nick($chan,0)
    while (%cnt) {
      if ($address($nick($chan,%cnt),2) == %nick.addr) {
        ban -ku600 $chan $nick($chan,%cnt) 2 Spammer
     }
     dec %cnt
    }
  }
}


Invision Support
#Invision on irc.irchighway.net
Re: relay channel advertiser #162536 19/10/06 09:20 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Thx Riamus2 I will try it.

Re: relay channel advertiser #162537 20/10/06 07:49 AM
Joined: Jan 2003
Posts: 1,063
D
Doqnach Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
if it's against outside the channel, why not simply put the channel on +n mode? (- no external messages)


If it ain't broken, don't fix it!
Re: relay channel advertiser #162538 20/10/06 02:59 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Doqnach Because the spam is send to the user not to the channel.

Re: relay channel advertiser #162539 20/10/06 04:11 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
If that's the case, you'll need to edit it to look like this:

Code:
on *:text:*:?: {
  var %s.chan = [color:red]#yourchannel[/color]
  if ($nick !ison %s.chan && $me isop %s.chan) {
    var %nick.addr = $address($nick,2)
    var %cnt = $nick(%s.chan,0)
    while (%cnt) {
      if ($address($nick(%s.chan,%cnt),2) == %nick.addr) {
        ban -ku600 $chan $nick(%s.chan,%cnt) 2 Spammer
     }
     dec %cnt
    }
  }
}


Just a note that if you aren't opped, or you have your users also use this and they aren't opped, then this won't do anything. If you want others to use it, who are not ops, then instead of the ban part, you might set it to send you (or an op) an automatic message stating the person is spamming and have the op(s) run another script that will automatically ban based on that message. Just a thought.


Invision Support
#Invision on irc.irchighway.net
Re: relay channel advertiser #162540 20/10/06 05:50 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Thx Riamus2.

Re: relay channel advertiser #162541 22/10/06 02:50 AM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
on *:text:*:?: { var %s.chan = #yourchannel if ($nick !ison %s.chan && $me isop %s.chan) { var %nick.addr = $address($nick,2) var %cnt = $nick(%s.chan,0) while (%cnt) { if ($address($nick(%s.chan,%cnt),2) == %nick.addr) { ban -ku600 $chan $nick(%s.chan,%cnt) 2 Spammer } dec %cnt } }}

/ban invalid parameters on this line -->> ban -ku600 $chan $nick(%s.chan,%cnt) 2 Spammer }

Re: relay channel advertiser #162542 22/10/06 04:07 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
Change $chan to %s.chan ... I forgot to make that change while changing the rest.


Invision Support
#Invision on irc.irchighway.net
Re: relay channel advertiser #162543 22/10/06 04:16 AM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
ok cool thx Riamus2.