Raised This Month: $37 Target: $400
 9% 

Admin Connect Logs


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management       
alferd
Veteran Member
Join Date: Dec 2019
Old 06-26-2020 , 05:08   Admin Connect Logs
Reply With Quote #1

Admin Connect Logs
Version 1.5

Description:
Using this plugin, you can check the activity of managers (Admins) in your server
All details are stored in the following file, And you can check the specifications in this files
Code:
addons/amxmodx/configs/Connect_log/Connect_log-xxxxxxxx.log
And Disconnect:
Code:
addons/amxmodx/configs/Connect_log/Disconnect_log-xxxxxxxx.log
With the following command, you can watch the list of admins that entered the server in your "console"
  • amx_connect_info
( Show File ( addons/amxmodx/configs/Connect_log/Connect_log-xxxxxxxx.log ) in the console )


File save date code by : +ARUKARI-
PHP Code:
formatex    (szLog,     charsmax(szLog), szLogFileszTime    ); 
File Info code by : fysiks ( Edited By Me: AlferD )
Code:
    new usersfile[64], data[128]     get_configsdir(usersfile, sizeof(usersfile) - 1)     add(usersfile, sizeof(usersfile) - 1, "/users.ini")         new f = fopen(usersfile, "rt")     if(f)     {         while( fgets(f, data, charsmax(data)) )         {             trim(data)             if( !data[0] || data[0] == ';' || data[0] == '/' && data[1] == '/' ) continue;                         console_print(id, data);         }         fclose(f)     }

Requirements:
  • AMX Mod X 1.8.2 and up

  • Non-Steam is not supported.
Attached Files
File Type: sma Get Plugin or Get Source (connect_logs-1.5.sma - 8 views - 2.4 KB)

Last edited by alferd; 07-08-2020 at 09:11.
alferd is offline
Old 06-26-2020, 05:53
thEsp
This message has been deleted by thEsp.
alferd
Veteran Member
Join Date: Dec 2019
Old 06-26-2020 , 09:27   Re: Admin Connect Logs
Reply With Quote #2

VERSION 1.1
  • Change Log File
  • Added Log File Info By Console

Last edited by alferd; 06-26-2020 at 09:28.
alferd is offline
alferd
Veteran Member
Join Date: Dec 2019
Old 07-06-2020 , 05:22   Re: Admin Connect Logs
Reply With Quote #3

VERSION 1.5
  • Added Disconnect Log
__________________
alferd is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-06-2020 , 21:38   Re: Admin Connect Logs
Reply With Quote #4

You don't need to give credit for trivial code and you don't need to include the code in the forum post. If you want to give credit to someone about a section of code, put it as a comment in your plugin and then in your forum post, you can simply mention the names of people that helped you. Having the credit in the source code is the most important. IMO, mentioning it in the forum post in just extra. I know that you're trying to give credit because others told you to give credit but it all really depends on how trivial the code is or how much you transformed it. The code that I gave you should be considered trivial since it doesn't really do anything unique. So, you can remove both credits you have in this plugin (as of right now).

About your code: Stop using tabs everywhere!!! It's terrible for readability and it's extremely annoying. Only use tabs for indentation, tabs are never needed anywhere else in AMX Mod X plugin source code.
__________________

Last edited by fysiks; 07-06-2020 at 21:39.
fysiks is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 07-06-2020 , 22:05   Re: Admin Connect Logs
Reply With Quote #5

I also use Tab a lot, but this is what your code looks like when I write it.
https://f.easyuploader.app/eu-prd/up...4a31335634.png

=>
https://f.easyuploader.app/eu-prd/up...4556706e68.png
__________________
+ARUKARI- is offline
Foxa
Member
Join Date: Nov 2018
Location: Croatia
Old 07-08-2020 , 08:31   Re: Admin Connect Logs
Reply With Quote #6

@+ARUKARI- Yeah but your tabs make sense, unlike his, like what is this??

PHP Code:
new fopen    (    g_LogFile,     "rt"                        ); 
People tried to explain to him that using tabs the way he uses them is not good, still he doesn't want to listen..
Foxa is offline
alferd
Veteran Member
Join Date: Dec 2019
Old 07-08-2020 , 09:12   Re: Admin Connect Logs
Reply With Quote #7

fixed
__________________
alferd is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-08-2020 , 09:32   Re: Admin Connect Logs
Reply With Quote #8

I know you probably think we are picking on you or no matter what you do is still not good, but that's not true. We are just trying to help, so I'll say this: as fysiks already pointed out, you don't need to give credits for individual lines of code or code that has nothing special. Give credit when you take a complex function or a considerable amount of code from someone else.
Anyone could come up with that formatex line and write it just like +ARUKARI- did.
Anyone could come up with the code you took from fysiks.
It's basic file reading code.
__________________

Last edited by HamletEagle; 07-08-2020 at 09:33.
HamletEagle is offline
alferd
Veteran Member
Join Date: Dec 2019
Old 07-08-2020 , 11:11   Re: Admin Connect Logs
Reply With Quote #9

Quote:
Originally Posted by HamletEagle View Post
Give credit when you take a complex function or a considerable amount of code from someone else.
ooo I didn't understand what fysiks meant, Now I understand
__________________
alferd is offline
Reply


Thread Tools
Display Modes

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 -4. The time now is 09:56.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode