bind_prefix
Name
bind_prefix -- Binds a prefix on a IRC message to a given method
Synopsis
void bind_prefix
(string method, string prefix);
Description
When someone writes a message in a channel, notice or query, begginning with
prefix, method is called.
Example 3-1. A greet function
class MyModule extends Wollabot_Module {
function MyModule () {
$this->bind_prefix('say_hello', 'hello');
}
function say_hello ($data) {
$this->send_privmsg($data['channel'], "Hello ".$data['nick']);
}
}
$wollabot->register_module("MyModule");