mIRC offers two efficient ways of matching a full address against a list of wildcards.
  • Suppose you had the following entries in your userlist, you could use $ulist([color:blue]nick!user@host, akill, 1)[/color] to retrieve the first matching wildcard (if any), and $ulist([color:blue]nick!user@host, akill, 1).info[/color] to retrieve the information (akill reason) associated with it.

    Code:
    [color:green]akill:[/color][color:blue]*!*mooscript@*[/color]     [color:purple]insane script[/color]
    [color:green]akill:[/color][color:blue]*!~*@*.verizon.net[/color] [color:purple]botnet[/color]
    [color:green]akill:[/color][color:blue]nicebot!*@*[/color]        [color:purple]harassing bot[/color]
  • Suppose you had a hashtable named "akill" with the following content, you could use $hfind([color:green]akill, nick!user@host, 1, W)[/color] to retrieve the first matching wildcard (if any), and $hget([color:green]akill, $hfind(akill, nick!user@host, 1, W))[/color] to retrieve the data (akill reason) associated with it.

    Code:
    table: [color:green]akill[/color]
    item               data
     
    [color:blue]*!*mooscript@*[/color]     [color:purple]insane script[/color]
    [color:blue]*!~*@*.verizon.net[/color] [color:purple]botnet[/color]
    [color:blue]nicebot!*@*[/color]        [color:purple]harassing bot[/color]