DescriptionThis plugin automatically uploads your
TF2 match log to logs.tf using your own logs.tf API key.Source can also be
viewed on githubWhen a round ends, it starts looking for a log that has been edited in the last 60 seconds.It uses cURL to do a POST request to logs.tf and prints the response in chat for everyone to see.A response would look (if everything works properly) like this: Code: LogUploader: End of game detected.LogUploader: Searching for log..LogUploader: Found log logs/L0311007.logLogUploader: Attempting to upload logLogUploader: {LogUploader: "log_id": 16138, LogUploader: "url": "/16138", LogUploader: "success": trueLogUploader: }So in this example, the log has been uploaded successfully and can be found at "http://logs.tf/16138".
CVAR/Command list Code: sm_logup_apikey - Set your logs.tf API key to use for uploading of logs
Changelog Code: 2010-01-12 (v1.0)* Initial release.
Installation instructionsFirst and foremost, make sure the cURL extension is installed!Install the plugin to the plugin directory and load it on the server once.This will create the config file in tf/cfg/sourcemod called "LogUpload.cfg".Enter your logs.tf API-Key in that config file and reload the plugin on the server.Now you're all set and good to go.
DependenciescURL extensionKnown bugs/problems Quote: 1. My first SourceMod plugin, code pretty messy-ish2. For really short games where not a lot happens,
TF2 will keep the log in memory instead of writing it to file, in which case the log can't be uploaded. At least I think it's only for really short games, maybe it also happens for proper long games. I dunno for sure..3. The server can occasionally lag somewhat when uploading the log (especially if something's gone wrong and logs.tf throws an internal server error). It may seem like the server has crashed for 2 or 3 seconds while this happens, but it should pick up as normal after those few seconds.4. Haven't really had the chance to do any extensive testing on this, so there could be any number of weird things happen! By all means let me know and I can maybe try to fix it..5. It doesn't seem to compile on this website, added a link to this post for a compiled version
Download compiled plugin here:https://github.com/r....log_upload.smxEdit:Did a bit more testing and it pretty much seems to lag the shit out of the server while uploading, making it look like it crashed.Any ideas/help greatly appreciated. Attached Files
Get Plugin or
Get Source (log_upload.sp - 4.2 KB)
Wyświetl pełny artykuł