This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[TFC] How can I make a separate log file that's just like the hlds log?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wirehead1
Junior Member
Join Date: May 2021
Old 02-21-2022 , 18:18   [TFC] How can I make a separate log file that's just like the hlds log?
Reply With Quote #1

Also I want to upload it automatically to someplace upon map end. How can this be done with amxxmod?

Edit: I found AmxxCurl for file transfers, but need to know about how to generate a log of game activity.

Particularly one in which I can input "status" and log the steam IDs of the players.

Last edited by wirehead1; 02-21-2022 at 20:18.
wirehead1 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-21-2022 , 21:14   Re: [TFC] How can I make a separate log file that's just like the hlds log?
Reply With Quote #2

Why not just grab the actual HLDS logs? You can simply re-create the status output, for the most part, by parsing the logs.

Regarding the actual file transfer, it would probably be better to have your external process connect to the server via FTP and grab the logs as opposed to having the game server trying to push logs out. AFAIK, this is how Psychostats does it.
__________________

Last edited by fysiks; 02-21-2022 at 21:15.
fysiks is online now
wirehead1
Junior Member
Join Date: May 2021
Old 02-22-2022 , 13:07   Re: [TFC] How can I make a separate log file that's just like the hlds log?
Reply With Quote #3

My idea involves a plugin that with low fuss on the server owner's part auto-uploads a log of game events, interspersed with a poll of user steam IDs every 5 minutes.

I don't want to alter the hlds log with that info. Also, they use that hlds info for services like "blarghalyzer" which may have its function altered by that.

The intent is to get the user info for a ratings website, and eventually to reward crypto in a play-to-earn fashion.
wirehead1 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-22-2022 , 23:08   Re: [TFC] How can I make a separate log file that's just like the hlds log?
Reply With Quote #4

I never said to change the HLDS logs because you only ever mentioned things that can be derived from the existing, unmodified logs (i.e you asked about getting the SteamID). Regardless, it's probably best to still do it such that you generate the logs on disk and then have your external process log in and grab the files via FTP if the logs are going to be big.


If you're looking at just sending a little bit of info ("a little" is relative and depends on how much of the HLDS process it takes), you could simply use sockets to send data to a PHP script. I do this before but primarily on user command. The advantage of not using the game server to perform the actual communication is so that it has less of an impact on the game server's own process.

Ultimately, it depends on what exactly you're trying to which you've so far been relatively vague.
__________________

Last edited by fysiks; 02-22-2022 at 23:09.
fysiks is online now
wirehead1
Junior Member
Join Date: May 2021
Old 02-23-2022 , 12:32   Re: [TFC] How can I make a separate log file that's just like the hlds log?
Reply With Quote #5

Okay. This plugin is intended to be the basis for a new type of cryptocurrency wrapper for old GoldSrc and possibly Source FPS games (when re-written in that language.)

Here is the gist of it, a smart contract is used with Polygon to create a token pool on my home server. Just some arbitrary amount of coin, say, 1M. It won't be spent on myself, only administered to people on a play-to-earn basis. Polygon is picked because you can do single and batch transactions for less than a penny.

The way to gauge that play-to-earn activity would be for me to have an AMXX plugin installed on their server, something minimal that they can vet the source of themselves, which makes a separate logfile and gauges player Steam IDs every 5 minutes.

At the end of the round it would upload the log to a URL, which would then re-route to my home server for parsing. Upon parsing it would issue out player ratings and crypto rewards to internal wallets.

Oh, the wallet would only work on whitelisted servers.

To claim the wallet the player would connect to a website and through some Steam-developed means reveal to the webserver that such-and-such Steam ID is connected. Then the server would ping me and I would send him the private keys for said wallet. From that point on, when he earned crypto it would go straight to that wallet.

So after that point it would be a matter of maintaining the ratings website and whitelisting more servers, before branching out to another subcommunity and rinse-repeating the process.

The code would be open-source, so anyone else who wanted to run a parallel crypto with a similar means could do it without conflicting anything by having their own play-and-earn plugin installed. Just maybe change the log name a bit.

Last edited by wirehead1; 02-23-2022 at 12:34.
wirehead1 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-23-2022 , 23:02   Re: [TFC] How can I make a separate log file that's just like the hlds log?
Reply With Quote #6

Well, that is interesting. I still feel it would still be best to have the external process log into the game server via SFTP or something and just grab the logs as needed. I feel like having the data being pushed out by the game server could allow injection of malicious data into your process. I'm sure it's possible but you'll need to make sure you prevent any of these types of malicious injection.

Actually, I think there is a risk for both directions e.g. I could just create false events to trigger more money into my account. I guess if you own and maintain the security of all of the game servers that connect to your system, it would be less of a problem.

I'm no where near an expert on some of security stuff so maybe there are ways to overcome these concerns.
__________________
fysiks is online now
wirehead1
Junior Member
Join Date: May 2021
Old 02-27-2022 , 15:56   Re: [TFC] How can I make a separate log file that's just like the hlds log?
Reply With Quote #7

Yeah, there is a lot of loosey-goosey when it comes to trusting the log file integrity. It is just a text file so I'm not that concerned about malicious code.

I will make the death reporting partly based on the honor system, and allocate a player-specific amount to the server, based on the reported player count as reflected by a server lister, and correlated with the logfile. A mismatch will cause a flag.

Also having me log in to snag log files is too trusting. I can't establish that much trust with new servers. Having a plugin that auto-uploads logs is pretty turnkey.

Last edited by wirehead1; 02-27-2022 at 15:57.
wirehead1 is offline
Reply



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 00:12.


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