ErikMinekus / sm-ripext

SourceMod REST in Pawn Extension
https://forums.alliedmods.net/showthread.php?t=298024
GNU General Public License v3.0
136 stars 38 forks source link

RIPExt version convar #38

Closed Bara closed 3 years ago

Bara commented 3 years ago

It would be nice to have a convar like ripext_version or something similar.

Why? By default the User-Agent is sm-ripext/<VERSION>, but I want to add a custom User-Agent with the version of this extension as additional information.

My goal is a User-Agent like MetaMod/<Version> SourceMod/<Version> RIPExt/<Version> [...] which includes some useful informations and for probably better "debugging".

ErikMinekus commented 3 years ago

Exposing the version is a bit scary, because I can see people misusing it to check whether certain functionality exists. I assume this is also why SourceMod does not expose retrieving information about an extension. I'd also rather not add a convar that I then have to support until the end of time.

Assuming you have a custom backend on the web server, it might a better solution to send the MM:S and SM version in custom X-Metamod-Version and X-Sourcemod-Version headers and log those together with the User-Agent header?

Bara commented 3 years ago

The reason was to provide some useful informations directly in the logs. Another reason for having this is to create a command which list of versions of all required extensions/plugins for "better" debuggin and reproducing any bugs/failures.

I wouldn't see this as a negative aspect.

ErikMinekus commented 3 years ago

I don't agree that each extension should add their own version convar for debugging purposes, when that information is already available to SM. There should be a generic way in SM to get that information, but I doubt the SM team wants to implement that.

Here are some messages from asherkin explaining that extensions should not create convars: https://discord.com/channels/335290997317697536/336023718709035020/815995678094393344 https://discord.com/channels/335290997317697536/336023718709035020/815996184413864017 https://discord.com/channels/335290997317697536/335290997317697536/817518306465677313 https://discord.com/channels/335290997317697536/335290997317697536/817518654392500238