On command

From Botnix

on_command

Called for every command. This function should return an array of lines to be output as the result of the command. The output is sent this way and not via NOTICE to allow modules to use the command handler and redirect the output wherever they wish.

Please note that use of add_command and del_command with handler subroutines is recommended over use of on_command. It is neater and more efficient. Use this command only if you wish to process a strange command format, e.g. right-to-left issued parameters or other weirdness.

Parameters:

  • $self - Module name
  • $nid - Network name where this event occured (case sensitive)
  • $nick - User's nickname
  • $ident - User's ident (username)
  • $host - User's hostname
  • $command - Command name
  • @params - Parameters for the command