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',
),
);
}
?>| Attachment | Size |
|---|---|
| bot_commands.patch | 10.04 KB |
| bot_log_commands.patch | 1.99 KB |

#1
Minor bugfixing.