mIRC Home    About    Download    Register    News    Help

Print Thread
#79165 13/04/04 06:01 PM
Joined: Dec 2002
Posts: 51
D
Dingo Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2002
Posts: 51
I'm after a way to grab the exact IP address out of my userlist.

Example:
In my userlist I have this IP:
2:*!*@81.212.* (perm) ;Quill: Too many spammers here
If an IP from that range joins, i can set a ban, but the ban requires me to type the nick and $ipmask. I dont want to do that, I want to set the ban exactly as it is in the userlist. all the Level 2 IP's are different $ipmasks, so I just can't specify the nick and mask. I need to use the address from the userlist.

Is there a way to do this please?
I also need help with the $ulist().info identifier. the reason for the ban is the .info in the userlist. Could someone please show me how to do this, I've done it once but have forgotten.

Thanks.

Joined: Jun 2003
Posts: 994
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
This works for me.
Code:
 
on @2:join:#: {
  var %Reason 2 - $ulist( [ $address($nick,5) ] ,2,1).info
  kick $chan $nick %Reason
  ban -u1180 $chan $nick 3
}
 



I refuse to engage in a battle of wits with an unarmed person. wink
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Code:
on @+2:JOIN:#: {
  var %addy = $fulladdress
  var %i = 1
  while ($ulist(*,0) >= %i) {
    if ($ulist(*,%i) iswm %addy) {
      [color:red]echo 4 -s matched $ulist(*,%i) with %addy[/color]
      ban $chan $ulist(*,%i)
      kick $chan $nick $ulist(*,%i).info
    }
    inc %i
  }
}


This worked with me, lets hope it wasnt a luck strike wink
I used the echo to warn you when an IP matched the user list, but of course its optional smile

Hope it helps!


"All we are saying is give peace a chance" -- John Lennon
Joined: Dec 2002
Posts: 51
D
Dingo Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2002
Posts: 51
your .info help is great, it worked first time I added it.
Now what I need is to take the IP address exactly as it is in my userlist, and add it to the actual ban command, so I'm banning an IP address, and not a nick with a specified ipmask.

The script will monitor the channel for joins, anc check 400+ ip's which are set up as level 2 in my userlist. this is why I can't use a while loop as it will bog me down. If i'm wrong about that please tell me.
Thanks

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
On @+2:join:#:{
ban # $maddress
kick # $nick $ulist($maddress).info
}

Joined: Dec 2002
Posts: 51
D
Dingo Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2002
Posts: 51
I just made the same breakthrough as you posted this reply. Thanks online smile

on +@2:JOIN:%shieldchan:{
ban # $ulist($maddress)
kick # $nick $ulist( [ $maddress ] ,2,1).info
}
I Like your script though its much less messy smile

Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Oh, nice script laugh neat, clean and fast lol

So, what is the sue of $maddress? I tried the mIRC help but nothing helpful :P


"All we are saying is give peace a chance" -- John Lennon
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Already explained, thanks! laugh


"All we are saying is give peace a chance" -- John Lennon

Link Copied to Clipboard