This:

var %nick = $gettok($1,1,40)

is a replacement for this:

var %nick $mid($1,1,$calc($pos($1,$chr(40),1) - 1))

nothing more.

-genius_at_work