#by wiebe @ QuakeNet

#when the bot's host change on IRC, sent "whois botnick"
#this updates the global variable 'botname' (among other things, shown in .status)

#raw: 396    RPL_HOSTHIDDEN
#format: <source> 396 <target> [<user>@]<host> :is now your hidden host
#info: returned when: having set usermode +x and are logged in with the network
#info: using the sethost command (setting usermode +h); unsetting usermode +h
#example: irc.quakenet.org 396 woobie woobie.users.quakenet.org :is now your hidden host

bind raw - 396 hosthidden:raw

proc hosthidden:raw { nick numeric rest } {
  if { [string equal $::server ""] } { return 0 }
  putserv "WHOIS $::botnick"
}

