When someone writes a private message to the bot in query, method is called. This is great for private commands such as authentication and things not meant for the public to see.
Example 3-1. A kick function
class MyModule extends Wollabot_Module {
function MyModule () {
$this->bind_query('do_kick');
}
function do_kick ($data) {
if (strtolower($data['message_exploded'][0]) != 'kick') return; // end processing
$this->kick($data['message_exploded'][1],
$data['message_exploded'][2],
$data['message_exploded'][3]);
}
}
$wollabot->register_module("MyModule");