####################################################
# 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)
#
####################################################

####################################################
# hosthidden:396
#
# 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:396

proc hosthidden:396 { nick numeric rest } {
  if { [string equal $::server ""] } { return 0 }
  putserv "WHOIS $::botnick"
}


set scriptdb(hosthidden) {
  "updates the bot's record of its own IRC host when it changes"
}

