MinutelyWho

From EggWiki
Jump to navigation Jump to search

Sometimes it can be beneficial to send a frequent /who to a channel on a server that supports WHOX queries, in order to obtain additional information that may not be available via an extended server capability (a common use case is retrieving account information for channel users). Here is an example script that performs a /who to obtain account information every minute (and Eggdrop automatically updates its internal list using this information):

bind cron - * updatewho

proc updatewho {args} {
  foreach chan [channels] {
    if {[botonchan $chan]} {
      # The exact same WHO query eggdrop sends on-join
      putserv "WHO $chan c%chnufat,222"
    }
  }
}

Be warned, excessive /who's might piss off opers on smaller servers :)