mIRC Home    About    Download    Register    News    Help

Print Thread
#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?

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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
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.

Joined: Jan 2003
Posts: 1,063
D
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!
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.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Thx Riamus2.

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 }

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Change $chan to %s.chan ... I forgot to make that change while changing the rest.


Invision Support
#Invision on irc.irchighway.net
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.


Link Copied to Clipboard