To restrict it for nicks, use: ON :TEXT:!topic :*:if ($chan) && ($nick == somenick) { topic $chan $2- } for channel message only