mIRC Homepage
Posted By: Dingo Addresses in the Userlist. - 13/04/04 06:01 PM
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.
Posted By: CtrlAltDel Re: Addresses in the Userlist. - 13/04/04 06:29 PM
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
}
 

Posted By: Zyzzyx26 Re: Addresses in the Userlist. - 13/04/04 06:48 PM
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!
Posted By: Dingo Re: Addresses in the Userlist. - 13/04/04 07:21 PM
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
Posted By: Online Re: Addresses in the Userlist. - 13/04/04 07:51 PM
On @+2:join:#:{
ban # $maddress
kick # $nick $ulist($maddress).info
}
Posted By: Dingo Re: Addresses in the Userlist. - 13/04/04 07:58 PM
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
Posted By: Zyzzyx26 Re: Addresses in the Userlist. - 13/04/04 08:07 PM
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
Posted By: Zyzzyx26 Re: Addresses in the Userlist. - 13/04/04 09:53 PM
Already explained, thanks! laugh
© mIRC Discussion Forums