var %users $nick(%channel,0, -1)

This is wrong.