AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Admin Activities (Attendance Plugin) (https://forums.alliedmods.net/showthread.php?t=276177)

Alber9091 12-16-2015 14:41

Admin Activities (Attendance Plugin)
 
2 Attachment(s)
Special Thanks:

Well, Before introducing this plugin, I would like to give credit to @HamletEagle because this plugin is made by him, not by me, idea was just mine, he made it for me and now I'm just presenting it to everyone.

Description:

Simply, this plugin allow us, to record the admins activities that on which date and time they joined and what time they left, what was the admin name and what was his steam id, means you will be able to record admins status, even with any nicks he join, but you will be able to record every admins activity, so just you can keep monitoring on your admins team ..!!

Activity Which Will Be Recorded, Will Be In This Manner:

"Format : [ Date ] [ Admin Name ] [ STEAM ID ] [ Join Time ] [ Disconnect Time ]"

All Monitored Stuff Will Be Present In:

Root>cstrike>addons>amxmodx>configs>admin_act ivities.ini

Will Monitor Flag:


ADMIN_KICK

PHP Code:

#include < amxmodx >  
#include < amxmisc >  

#define ADMIN_ACCES ADMIN_KICK  

new g_szName 33 ] , g_iFile 128 ]  
new const 
g_szFileName [ ]  =  "admin_activities.ini"  
new o,m,s,o1,m1,s1  
new g_szAuthId 33 ]  


public 
plugin_init ( ) {  
     
    
register_plugin "Admin Activities" "0.1" "HamletEagle" )  
     
}  

public 
plugin_cfg ( ) {  
     
    new 
Dir 66 ]  
    
get_configsdir Dir sizeof Dir ) -)   
     
    
formatex g_iFile sizeof g_iFile ) -"%s/%s" Dir g_szFileName )  
     
    if ( !
file_exists g_iFile ) ) {  
         
        
write_file g_iFile ";Here you can view your admins online time" )  
        
write_file g_iFile ";Format : [ Date ] [ Admin Name ] [ STEAM ID ]  [ Join Time ] [ Disconnect Time ]" )  
         
    }  
     
}  



public 
client_putinserver id ) {  
     
    if ( 
get_user_flags id ) & ADMIN_ACCES 
        
GetTime id )  
     
     
}  



public 
client_disconnect id ) {  
     
    if ( 
get_user_flags id ) & ADMIN_ACCES ) { 
        
GetTime id )  
        
WriteFile (id )    
    } 
}  

public 
GetTime id value ) {  
     
     
    if ( 
value == )  
        
time ,)  
     
    if ( 
value == )  
        
time o1 m1 s1 )   
     
}  

public  
WriteFile id )  {  
     
    new 
iYeariMonthiDay;  
    
date(iYeariMonthiDay);  
    new 
iLine 256 ]  
    
get_user_name id g_szName sizeof g_szName ) -)  
    
get_user_authid id g_szAuthId sizeof g_szAuthId ) - )  
    
formatex iLine sizeof iLine ) - "[ %i:%i:%i ] [ %s ] [ %s ] [ %i:%i:%i ] [ %i:%i:%i ] " ,iYear,iMonth,iDay g_szName  ,g_szAuthIdo,m,o1,m1,s1 )  
    
write_file g_iFile iLine )  



redivcram 12-16-2015 14:46

Re: Admins Activities (Attendance Plugin)
 
What if admins just connect for the sake of it and do nothing? (be afk)

Alber9091 12-16-2015 14:56

Re: Admins Activities (Attendance Plugin)
 
Obviously, if any admin joined surely he will monitor players in the server as being afk or he will play, who have enough time to waste being afk for no reason??

Other then this surely it will help, that on this this time, we don't have any admins online in the server, so we should either bother them to be online on that time (Any x time) or appoint new admins, which can look after the server at that approximate time ..!!

addons_zz 12-16-2015 17:24

Re: Admin Activities (Attendance Plugin)
 
Is very nice to share it, but Read before posting new plugins. - Updated 9-5-14
and Plugins, quantity, quality.

They are stickies at this sub-forum and describe this section.

Is @EthicalHacker007 = HamletEagle? Because it is the name at the source you provide.

safetymoose 12-16-2015 21:52

Re: Admin Activities (Attendance Plugin)
 
I see that you are using global values o, m, s, o1, m1, s1. These values are updated everytime an admin connects/disconnects, so having them like this will cause false readings and results if multiple admins join the server.

It would be much better and more precise if you would define these values as arrays of MaxPlayers+1, so that you can store precise information for each admin and the values are not overwritten by every new admin that joins.

fysiks 12-16-2015 21:58

Re: Admin Activities (Attendance Plugin)
 
Also, use descriptive variable names. Not doing so is just plain bad coding.

XLN's | [Lo]Phreak^n^c 12-17-2015 02:08

Re: Admin Activities (Attendance Plugin)
 
Quote:

Originally Posted by Alber9091 (Post 2373014)
Special Thanks:
Well, Before introducing this plugin, I would like to give credit to @EthicalHacker007 because this plugin is made by him, not by me, idea was just mine, he made it for me and now I'm just presenting it to everyone.

This was made by HamletEagle

https://forums.alliedmods.net/showthread.php?t=241658

Alber9091 12-17-2015 02:26

Re: Admin Activities (Attendance Plugin)
 
Quote:

Originally Posted by XLN's | [Lo]Phreak^n^c (Post 2373162)

Sorry Man, actually i just confused with, php script in my inbox and php script in, suggestions, well i will edit, thanks for looking up over the real credit owner, my mistake, though i accept :-)

ddhoward 12-17-2015 02:30

Re: Admins Activities (Attendance Plugin)
 
Quote:

Originally Posted by Alber9091 (Post 2373021)
who have enough time to waste being afk for no reason??

When you are "AFK" on the server, you don't need to even be on your computer, or tabbed in.

I have over 17,000 hours logged in TF2, and I can guarantee you that I was ASLEEP for at least 9,000 of those hours.

Alber9091 12-17-2015 02:32

Re: Admin Activities (Attendance Plugin)
 
Quote:

Originally Posted by addons_zz (Post 2373073)
Is very nice to share it, but Read before posting new plugins. - Updated 9-5-14
and Plugins, quantity, quality.

They are stickies at this sub-forum and describe this section.

Is @EthicalHacker007 = HamletEagle? Because it is the name at the source you provide.

Hahaha, well, I will correct those mistakes, thanks for letting me know and as far, HamletEagle's issue, that was a bit confusion to me with inbox message with Ethical Hacker, as he also made this plugin for me, but it had 2 errors while compiling it, so, i asked same to Hamlet Eagle to make it for me and he did ..!! So due to this confusion, as this was old plugin for me, i just mistakenly gave EthicalHacker's name, and i apologise for my mistake from @HamletEagle ..!!


All times are GMT -4. The time now is 23:15.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.