View Single Post
Duckeh
Junior Member
Join Date: Mar 2013
Old 03-15-2013 , 04:26   Re: [TF2] LogUploader (v1.2, 2013-03-13)
Reply With Quote #7

Wow, you did that quick, Nikki!
And I hadn't seen that JSON include, looks awesome.

Get rid of the global variables
So that would be the count variable I need to move, do I also have to get rid of the CURL_DEFAULT_OPTS?

You don't need to tag integers
Alright!

Remove the sm_log command. What's its use?
Yeah, that was a left-over command from testing, will remove it.

use PLATFORM_MAX_PATH for your path variables
Don't know what that is or how it works.
I saw some examples of that being used with BuildPath, but I thought that was just for paths inside "addons/sourcemod/"

use sizeof() instead of hard coded lengths
Alright.

What happens if I end two matches in 60s? This method of getting the last log file is not error-prone at all.
Depends, if you reload the config it'll probably only upload the first match, as the second one will stay in the buffer (most likely). If you do two matches without reloading the config it'll probably only upload on the second one, as the first one then stays buffered.

General lack of error checking (e.g. create a directory in your logs folder).
Yup..

What's being done to prevent uploading non-match logs? E.g. matches that got restarted before anyone could reach mid.
Well, if a match gets restarted the logs won't upload as the events aren't triggered. The next match would more than likely take more than 60 seconds so that it wouldn't upload the log for the non-match.
Also, other non-match-related logs shouldn't get uploaded as they shouldn't get edited during a match and thus their timestamp shouldn't change..
I understand it's a rather crude way to go about grabbing the last log, I just wouldn't know any other way of doing it. Or maybe I could, but my knowledge of SourcePawn is rather limited so I wouldn't have a clue how to do something like checking which log has the highest number.

Last edited by Duckeh; 03-15-2013 at 04:27.
Duckeh is offline