mIRC Home    About    Download    Register    News    Help

Print Thread
Help to find error #163883 05/11/06 01:35 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
This script should kick ban the user matching mask already in the channel when I get a #channel spam from outside the channel. Any ideal why it dont work?

on *:text:*:?: {
if (%Relay == off) || !%Relay || ($nick isop #) { return }
var %s.chan = #manila
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 -k %s.chan $nick(%s.chan,%cnt) 2 14Relay Spammer Detected
}
dec %cnt
}
}
}

Re: Help to find error #163884 05/11/06 01:38 PM
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline
Fjord artisan
Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
do you mean if someone pm floods you, you want to ban him from a channel?


Newbie
Re: Help to find error #163885 05/11/06 01:41 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
I mean if they pm me #anychannel then ban the any matching ip in the channel I just join or where am already op on.

Re: Help to find error #163886 05/11/06 01:45 PM
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline
Fjord artisan
Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
how would you know if its a spammer PMING you not some innocent user asking for help?


Newbie
Re: Help to find error #163887 05/11/06 01:51 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
I know because we get a spam #channel usely on login and those advertiser are usely not in any channel but they always have a clone sitting in the channel they send spam to.
They only way to cath them now is to manully find their matching ip and ban them.

Re: Help to find error #163888 05/11/06 02:13 PM
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline
Fjord artisan
Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
if (%Relay == off) || !%Relay || make sure you have a var called relay and make it = on as otherwise it just returns, if it still dosent work lemme know and i will attempt to script it.

Just to clarify. if you are on #spamchannel and get a PM from a bot or whatever you want to ban all the clones on the channels you are op on? if not then please clarify also why join the channel?


Newbie
Re: Help to find error #163889 05/11/06 02:21 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Yes I want to ban all clones and I do have a var name %relay on

Re: Help to find error #163890 05/11/06 03:29 PM
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline
Fjord artisan
Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
i cant help you with the above script as a few things didnt make sense like the ! ison also i dont know what a relay spammer is and why you would join that channel. Anyways here is how i would do it as per your instructions if a user pms you whilst being on a spamchannel it will cycle through your channels and ban clones of the banned address so if there is more then one clone on the channel it would kick that aswell, made this during extra lessons :P so didnt have too much time to test it out. i used ISWM which is a wild match so may sometimes kick innocent users but i find its effective

Code:
 ON *:TEXT:*:?: {
  if ($nick ison #spamchannel) {
    var %c = 1, %i = $chan(0)
    while (%c <= %i) {
      if ($me isop $chan(%c)) {
        relayban $chan(%c) $address($nick,3)
        inc %c
      }
    }
  }
}
alias relayban { 
  var %lol = 1
  mode $1 +b $2
  while ($nick($$1,%lol) != $null) {
    IF ($2 iswm $ial($nick($$1,%lol))) { 
      kick $1 $nick($$1,%lol) 14Relay Spammer Detected
    }
    inc %lol
  }
} 


Newbie
Re: Help to find error #163891 05/11/06 03:32 PM
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline
Fjord artisan
Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
note you hvae to be on the spamchannel or whatever for it to work otherwise the first IF statement cant parse change #spamchannel to whatever channel these spammers live in smile


Newbie
Re: Help to find error #163892 05/11/06 03:38 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Ok cool thx.
Do I replace this with my channe that am op in ??
if ($nick ison #spamchannel) {
to
if ($nick ison #chat) {

Re: Help to find error #163893 05/11/06 03:49 PM
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline
Fjord artisan
Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
no the script auto cycles through all the channels you are op on change it to the channel the spambot is on otherwise it will ban any user that PM's you

ON *:TEXT:*:?: {
if ($nick ison thespamchannel ) {


Newbie
Re: Help to find error #163894 05/11/06 03:57 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
I see ok...the spambot is hidding on my channel so I have to add my channel that am op on.

Re: Help to find error #163895 05/11/06 04:02 PM
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline
Fjord artisan
Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
no you dont the script only exacutes if you are opped, you said the way you know its a spammer is because it resides on a certain channel which for arguments sake is called #spamchannel so you need to change that to the channel the bots reside NOTHING else, when the bot pm's you it will cycle through all channels you are OPPED on automatically and ban the clones


Newbie
Re: Help to find error #163896 05/11/06 04:14 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
I see ok the bots reside on my channel.
Can fix it that it will only ban if there a # in front ?
Because now it kicking any text send to me in pv.

Last edited by Garou; 05/11/06 04:24 PM.
Re: Help to find error #163897 05/11/06 04:23 PM
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline
Fjord artisan
Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
then it will ban any user who pms you who is on your channel! which is a bit stupid.
if you can be a bit more clear on whats happening and what you mean by spamming your channel from outside your channel then when i get back from school ill try and put something together for you


Newbie
Re: Help to find error #163898 05/11/06 05:41 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
HaleyJ
I think what they are describing is a bot who sits in the channel and tracks join/parts. From there, the bot messages another bot (not residing in the channel) that will in turn message you. The point of this obscurity is to "conceal" the spamming bot, and still track those who are on the channel.

What they are trying to accomplish is when they are PMed something, check the user's mask against a list of masks in the room. If they match, kick the "relay bot" (the one messaging the spammer you've entered). I hope I've made sense.

Garou

This should be what you're after. I used the $ialchan of mIRC as I feel it's faster for mIRC to do the searching. Additionally, I made it so you can add new channels to the list. Just add them in the red section seperated by a space, and the script will "potect" those channels as well (as long a you have op).

Code:
on *:TEXT:*:?: {
  var %chanlist = [color:red]#manila[/color]
  var %c = 1, %addr = $address($nick,2)
  while ($gettok(%chanlist,%c,32)) {
    var %chan = $v1, %matches = $ialchan(%addr,%chan,0)
    while (%matches && $me isop %chan) {
      /ban -k %chan $ialchan(%addr,%chan,%matches).nick 2 14Relay Spammer Detected
      /dec %matches
    }
    /inc %c
  }
}


As far as the IAL (which I thought of later as to why your script may/may not work), your listing may not be populated (you join the channel after several users are already on and as long as they don't talk, you won't get their Ial (and bots rarely do chat ;p)). So if you want to solve this as well (but be careful, some networks can be strict on the number of lines it generates) you can add these lines to your remotes:

Code:
on me:*:JOIN:#: {
  /who $chan
}


That will populate your ial with everyone's address. If you find you've added these lines and begin getting kicked off the network for flood, you may want to remove them.


-KingTomato
Re: Help to find error #163899 05/11/06 08:21 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
KingTomato Thats exacly what I meat and neened thank you both I will give it a try.

Re: Help to find error #163900 06/11/06 06:28 AM
Joined: Jun 2006
Posts: 508
D
deegee Offline
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
You might need to change this
Code:
  var %c = 1, %addr = [color:red]$address($nick,2)[/color]

To this
Code:
  var %c = 1, %addr = [color:blue]$wildsite[/color]


The $address() identifier relies on the IAL, if the msg comes from a user not on any common channels it will return $null