The %server variable isn't really needed in the on connect :/
if (!$did(*) )
There's no then part of this if statement.