class {$_NAME} extends Bot {
private $uplink;
- private $php, $phpcache;
+ private $php, $phpcache = array();
public function load($uplink, $old = false) {
$this->uplink = $uplink;
}
public function unload($rehash = false) {
- foreach($this->phpcache as $id => &$php) {
+ foreach($this->phpcache as $id => $php) {
fclose($php['pipes'][1]);
fclose($php['pipes'][2]);
proc_terminate($php['proc'],9);
}
public function loop() {
- foreach($this->phpcache as $id => &$php) {
- if(!$this->checkstate(&$php)) {
+ foreach($this->phpcache as $id => $php) {
+ if(!$this->checkstate($php)) {
unset($this->phpcache[$id]);
}
}
$opOnPHPChannel = ($privs & P10_Channel::USERPRIV_OPED);
}
if(!$user->getModes()->hasMode('o') && !$opOnPHPChannel) return 0;
- $exp=explode(" ",$message);
+ $exp=explode(" ", $message, 2);
switch (strtolower($exp[0])) {
case "~php":
if(count($this->phpcache) > 5) {