I found this piece of code here on the forum:


alias checknicks {
var %x = 1
while (%x <= $lines($mircdirbadnicks.txt)) {
var %i = 1
while (%i <= $nick($chan,%i)) {
if ($read(badnicks.txt,%x) iswm $nick($chan,%i)) {
ban $chan $nick($chan,%i)
}
inc %i
}
inc %x
}
}


I'm using it in the badnicks script I have, to force bans on command, and it works perfectly, I just want to change the ban:


ban $chan $nick($chan,%i)


Since it comes out like this: nick1!*aRRZLOvFG@ThisNet-3v8s98.xyz.system.com

I wish it were like this: *nick1*!*@*

Every time I try to make a change I get the message "insufficient parameters" and the ban doesn't work anymore. What would be the correct code?