caxanga334 / cvreduxmodified

Modified version of ReFlexPoison's custom votes
GNU General Public License v3.0
15 stars 9 forks source link

Remove unnecessary log file creation function calls #28

Closed sneak-it closed 2 years ago

sneak-it commented 2 years ago

This is a slight rollback of commit c4440817ba9e0ab5f53adcbb3d1db8381e96a503

The CreateLogFile function simply builds the path out to the CV logfile. It is unnecessary to call it more than once outside of the start of the plugin - this removes the redundancies.

caxanga334 commented 2 years ago

The CreateLogFile adds a timestamp to the log file. This is why it's called multiple times.

sneak-it commented 2 years ago

The CreateLogFile adds a timestamp to the log file. This is why it's called multiple times.

Good point, I believe it would be appropriate in this case to build the path in OnMapStart - unless you expect some folks have servers that run one map more than 24 hours without changing.

Calling this func every time there is a vote is definitely unnecessary.

caxanga334 commented 2 years ago

Good point, I believe it would be appropriate in this case to build the path in OnMapStart - unless you expect some folks have servers that run one map more than 24 hours without changing.

Servers that never changes map is the reason I call it every time there is a vote.