Hello, im making a small script in tcl, and one part of it needs hostmask comparsion, any ideas how to do this?
Example:
lets assume user comes in irc with host ident@some.cool.vhost.com
Then he messages the bot with some trigger. the bot grabs his host ident@some.cool.vhost.com and checks if it matches hostmask lets say
*@*.vhost.com (this is stored in some variable). If it matches then the script will continue.
That depends on what kind of matching you want. You can use 'string match' to do tcl's kind of glob matching. But if you want matching like the irc server does it you'll need something tailor made for your ircd. (eg: if you were to follow rfc1459, you'd have to do case-insensitive matching based on the upper/lower case chars defined in that spec. (some weird additional upper-/lower-case letters))