Source code raw phps
<?php
require_once 'modules/class.Module.php';
class Module_Output extends Module {
public function update(Observed $bot, $raw, $type) {
if (($type & Bot::U_INPUT) == Bot::U_INPUT) {
$prefix = '[<] ';
} else if (($type & Bot::U_OUTPUT) == Bot::U_OUTPUT) {
$prefix = '[>] ';
} else if (($type & Bot::U_ERROR) == Bot::U_ERROR) {
$prefix = '[!] ';
} else if (($type & Bot::U_DEBUG) == Bot::U_DEBUG) {
$prefix = '[*] ';
}
if (empty($prefix)) {
$prefix = '[-] ';
}
echo $prefix.$raw."\n";
flush();
return Bot::E_CONTINUE;
}
}
Comments
There is currently no comment here.