Hi,
that's possible, if you just change the following in the alias chans_check:
if $hget(chans,$v1) { ...
to
if $hfind(chans,$v1,1,W) { ...
And then simply add wildcarded strings to the hash table, using /chans_add.
Examples:
/chans_add *sex* --> match with "sex" in any position of the channel name
/chans_add *lol --> match with "lol" at the end of the channel name
/chans_add #lame* --> match any channel that starts with #lame in its name
/chans_add #xteensx -> match the channel named #xteensx
/chans_add #123? -> match the channel named #123 followed by any character
...
Enjoy.