Thread: maxsysops
View Single Post
  #20  
Old 14th October 2008, 23:21
3v0 3v0 is offline
Senior Member
 
Join Date: Feb 2008
Netherlands
Posts: 88
Default
No idea how that source works sorry but looking at that code I'm guessing it's all built in somehow without having to edit the username or id's in a file each time you promote someone to staff class.

As for luke

PHP Code:
function maxsysop () {
    global 
$CURUSER;
    
// Check Staff Names
    
$lmaxclass  8;
    
$lsysopnames = array("root","Clock"); // Case sensitive. Change this (YOUR SYSOP-ADMIN NAMES GOES HERE) (example: array("adminname1","adminname2","adminname3","adminname4","so far")
    
if ($CURUSER["class"] >= $lmaxclass)
    if (!
in_array($CURUSER["username"], $lsysopnamestrue)) { // true for strict comparison
        
$msg "Fake Account Detected: Username: ".$CURUSER["username"]." - UserID: ".$CURUSER["id"]." - UserIP : ".getip();
        
write_log($msg);
        
mysql_query("INSERT INTO messages (poster, sender, receiver, added, msg) VALUES(0, 0, '1', '" get_date_time() . "', " .sqlesc($msg) . ")") or sqlerr(__FILE____LINE__);
        
stderr("Access Denied!","We come to believe you are using a fake account, therefore we've logged this action!");
    }
    
// Check Staff IDS
    
define ('UC_STAFF'8); // Minumum Staff Level (50= UC_MODERATOR)
    
if ($CURUSER['class'] >= UC_STAFF) {
        
$allowed_ID = array(0,1,2,3,4,5); // Change this (YOUR SYSOP-ADMIN IDS GOES HERE) (example: array(1,2,3,4,5))
        
if (!in_array((int)$CURUSER['id'], $allowed_IDtrue)) { // true for strict comparison
            
$msg "Fake Account Detected: Username: ".$CURUSER["username"]." - UserID: ".$CURUSER["id"]." - UserIP : ".getip();
            
write_log($msg);
            
stderr("Access Denied!","We come to believe you are using a fake account, therefore we've logged this action!");
        }
    }


Last edited by 3v0; 14th October 2008 at 23:24.
Reply With Quote