Bravo List
Register
Go Back   > Bravo List > P2P > Forum > Community Cafe
Reply
Thread Tools
  #11  
Old 14th October 2008, 23:00
luke luke is offline
Member
 
Join Date: Aug 2008
Posts: 8
Default
Quote:
Originally Posted by clocktower View Post
ok soz m8 this guy doesnt even know his own site id pffft sod that hehehe
id = 1.
Reply With Quote
  #12  
Old 14th October 2008, 23:00
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
well ive added his username admin id=1
Reply With Quote
  #13  
Old 14th October 2008, 23:03
3v0 3v0 is offline
Senior Member
 
Join Date: Feb 2008
Netherlands
Posts: 88
Default
Quote:
Originally Posted by clocktower View Post
well ive added his username admin id=1
It would be $lsysopnames = array("Luke"); I only used admin1 admin2 as an example
Reply With Quote
  #14  
Old 14th October 2008, 23:04
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
well his id =0 username root (dunno why) but on site hes just sysop



this is that guys im trying to help


PHP Code:
//---- Max. Sysops v0.9 by xam
function maxsysop () {
    global 
$CURUSER,$rootpath$lang;
    
$lmaxclass  UC_MODERATOR;
    
$filename $rootpath 'config/STAFFNAMES';    
    
$filename2 $rootpath 'config/STAFFIDS';    
    if (
$CURUSER['class'] >= $lmaxclass) {
        
$fp fopen($filename'r');
        while (!
feof($fp))
            { 
                
$staffnamesfgets($fp);
                
$results explode(' '$staffnames); 
            }
        
$msg 'Fake Account Detected: Username: '.$CURUSER['username'].' - UserID: '.$CURUSER['id'].' - UserIP : '.getip();
        
$subject 'Warning: Fake Account Detected!';
        
$added sqlesc(get_date_time());
        if (!
in_array($CURUSER['username'], $resultstrue)) { // true for strict comparison
            
sql_query('INSERT INTO messages (sender, receiver, added, subject, msg, poster) VALUES(0, 1, '.$added.', '.sqlesc($subject).', '.sqlesc($msg).', 0)');
            
write_log($msg);
            
fclose($fp);
            
stderr($lang->global['error'], $lang->global['fakeaccount']);
        }
        
fclose($fp);
    }

    if (
$CURUSER['class'] >= $lmaxclass) {
        
$fp2 fopen($filename2'r');
        while (!
feof($fp2))
                { 
                    
$staffids fgets($fp2);
                    
$results2 explode(' '$staffids); 
                }
            if (!
in_array($CURUSER['id'], $results2true)) { // true for strict comparison                
                
sql_query('INSERT INTO messages (sender, receiver, added, subject, msg, poster) VALUES(0, 1, '.$added.', '.sqlesc($subject).', '.sqlesc($msg).', 0)');
                
write_log($msg);                
                
fclose($fp2);
                
stderr($lang->global['error'], $lang->global['fakeaccount']);        
            }
            
fclose($fp2);
    }    
    return 
true;

Reply With Quote
  #15  
Old 14th October 2008, 23:08
3v0 3v0 is offline
Senior Member
 
Join Date: Feb 2008
Netherlands
Posts: 88
Default
Just replace the whole maxsyops function with the one I posted. Is that v0.9 one from TemplateShares code?
Reply With Quote
  #16  
Old 14th October 2008, 23:09
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
i did 3vo but he gets a white page
Reply With Quote
  #17  
Old 14th October 2008, 23:11
3v0 3v0 is offline
Senior Member
 
Join Date: Feb 2008
Netherlands
Posts: 88
Default
Which source is being used here TBDEV or TS?
Reply With Quote
  #18  
Old 14th October 2008, 23:12
adry93 adry93 is offline
Member
 
Join Date: Oct 2008
Posts: 7
Default
TS
Reply With Quote
  #19  
Old 14th October 2008, 23:12
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
this italian guy is using ts 3.1 but i aint a clue were to add username or id

PHP Code:
//---- Max. Sysops v0.9 by xam
function maxsysop () {
global 
$CURUSER,$rootpath$lang;
$lmaxclass UC_MODERATOR;
$filename $rootpath 'config/STAFFNAMES';    
$filename2 $rootpath 'config/STAFFIDS';    
if (
$CURUSER['class'] >= $lmaxclass) {
$fp fopen($filename'r');
while (!
feof($fp))

$staffnamesfgets($fp);
$results explode(' '$staffnames); 
}
$msg 'Fake Account Detected: Username: '.$CURUSER['username'].' - UserID: '.$CURUSER['id'].' - UserIP : '.getip();
$subject 'Warning: Fake Account Detected!';
$added sqlesc(get_date_time());
if (!
in_array($CURUSER['username'], $resultstrue)) { // true for strict comparison
sql_query('INSERT INTO messages (sender, receiver, added, subject, msg, poster) VALUES(0, 1, '.$added.', '.sqlesc($subject).', '.sqlesc($msg).', 0)');
write_log($msg);
fclose($fp);
stderr($lang->global['error'], $lang->global['fakeaccount']);
}
fclose($fp);
}

if (
$CURUSER['class'] >= $lmaxclass) {
$fp2 fopen($filename2'r');
while (!
feof($fp2))

$staffids fgets($fp2);
$results2 explode(' '$staffids); 
}
if (!
in_array($CURUSER['id'], $results2true)) { // true for strict comparison    
sql_query('INSERT INTO messages (sender, receiver, added, subject, msg, poster) VALUES(0, 1, '.$added.', '.sqlesc($subject).', '.sqlesc($msg).', 0)');
write_log($msg);    
fclose($fp2);
stderr($lang->global['error'], $lang->global['fakeaccount']);    
}
fclose($fp2);
}    
return 
true;

also this is for lukes site is this right??

PHP Code:
//---------------------------------
//---- Max. Sysops v0.2 by xam
//---------------------------------

function maxsysop () {
global 
$CURUSER;
// Check Staff Names
$lmaxclass  8;
$lsysopnames = array("",); // Case sensitive. Change this (YOUR SYSOP-ADMIN NAMES GOES HERE) (example: array("root","Clock","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);
            
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 (4= UC_MODERATOR)
if ($CURUSER['class'] >= UC_STAFF) {
    
$allowed_ID = array(); // Change this (YOUR SYSOP-ADMIN IDS GOES HERE) (example: array(0,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!");            
        }        
    }
}

//---------------------------------
//---- Max. Sysops v0.2 by xam
//--------------------------------- 

Last edited by wMan; 14th October 2008 at 23:17.
Reply With Quote
  #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
Reply

Tags
maxsysops


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 19:08. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.