All pastes #131514 Raw Edit

Stuff

public text v1 · immutable
#131514 ·published 2006-08-14 15:19 UTC
rendered paste body
//bot.php
$hostname = $con['buffer']['hostname'];// \/     \/                \/             \/           \/
$pnick = $con['buffer']['username']; //the person who executed the command's username and hostname 
//....
function admin()
{
        global $con, $CONFIG, $hostname, $pnick;
 $i = 0;
 foreach ($CONFIG['owner'] as $owner) {
  if (($owner == $pnick) && ($hostname = $CONFIG['adminhost'][$i]))
    return true;
  $i++;
 }
 return false;
}
//commands.php
        if(strtoupper($all[0]) == $CONFIG['prefix'].'ADMIN') {
                $var = admin();
                if ($var == true) { msg("it's working right"); }
                if ($var == false) { msg("it's not working right"); }
        }
//start.php
$CONFIG['owner'] = array('Edgeman', 'rxvt');
$CONFIG['adminhost'] = array('edgebox.ca', 'i.h4x.se');