Bot commands

stBorchert - December 21, 2009 - 11:55
Project:Bot
Version:6.x-1.x-dev
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

I've created a sub-module that allows users to run special bot commands (provided by other modules).
A module (for example "bot_log") can implement hook_bot_commands to add new commands.
Example (see second patch):

<?php
function bot_log_bot_commands() {
return array(
    
'log start' => array(
      
'description' => t('Starts logging messages in the current channel.'),
      
'callback' => 'bot_log_add_channel',
     ),
    
'log stop' => array(
      
'description' => t('Stops logging messages in the current channel.'),
      
'callback' => 'bot_log_remove_channel',
     ),
   );
}
?>

AttachmentSize
bot_commands.patch10.04 KB
bot_log_commands.patch1.99 KB

#1

stBorchert - December 21, 2009 - 15:47

Minor bugfixing.

AttachmentSize
664902-bot_commands-2.patch 10.54 KB
 
 

Drupal is a registered trademark of Dries Buytaert.