I have a socket connected and commands setup for my socket bot , but everyone in the channel can type them as well and I don't want that. How do I stop this ?

Code:
   if ($2 == PRIVMSG) && ($remove($4,:) == .hop) {
    sockwrite -n $sockname PART $3
    sockwrite -n $sockname JOIN $3
  }  


so whenever someone types ".hop" my bot cycles the channel, I don't want that.