pvpgn / pvpgn-server

Next generation of PvPGN server
https://pvpgn.pro
GNU General Public License v2.0
556 stars 155 forks source link

ad.json banner rotation / bugs #447

Open StevenFredette opened 3 years ago

StevenFredette commented 3 years ago

Question: Does the ad.json no longer support the timer argument for the banners? In the older version of PVPGN, we had two arguments that seem to be missing. The banners I have created are 12-second videos with sound .smk.

Older ad.conf "ad000001.smk" init 30 "http://www.yourwebsite.org" 0x000002 "SEXP"

Suggestion: I'm almost certain all clients can't mute, skip, choose the ad. If we could have a LUA hook to send a user a specific banner or some way to exclude certain banners from the main loop. Users can choose to hear banners with sounds, or be excluded from the main banner loop so they are not annoyed with such banners, etc.

Bugs:

  1. The file size is not checked before sending the banner. So bigger files will crash the client. 30MB caused Warcraft 2 to crash. My friend told me to expect 1MB buffers for banners?

  2. The actual banner size 468x60 is not checked before sending so a greater size will cause Warcraft 2 to crash.

  3. A video banner with sound will begin to loop as most likely a smaller video than what pvpgn says to display the banner for. This option has become deprecated in the current pvpgn ad.json?

RElesgoe commented 3 years ago

The file size is not checked before sending the banner. So bigger files will crash the client. 30MB caused Warcraft 2 to crash. My friend told me to expect 1MB buffers for banners?

There's no documentation on ad banner file size limits, so it's impossible to even enforce any limit in PvPGN.

The actual banner size 468x60 is not checked before sending so a greater size will cause Warcraft 2 to crash.

I'm not keen on having PvPGN checking the validity of the file format or something of the files located in the files directory. Those files, including ad banners, should be treated as if they're on a ftp server, because PvPGN serves them like so via the bnftp protocol.