-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server cvar message constantly showing up in chat #1632
Comments
I assume you have set |
I know why this happens. I dynamically create the convar AFTER the file loaded, maybe a tenth of a second later or so. It then detects this as a SetConVar instead of a CreateConVar I used this because I thought that it is a nice simplification here. But I have overseen the chat massage. Checking if the convar already exists will resolve this issue |
Are you sure this isn't happening because of the Besides that i think we should not create the |
Setting a global bool doesn't trigger the convar change message
I create this convar dynamically for every prefix, gm, css, ttt, de, etc. By default all of them are enabled and you can disable the maps with that prefix in the UI. If I'd remove that convar, to which group the gm_ maps should be moved? And why should the gm maps be handled differently than the ttt, css etc maps? I'm asking because I'm not sure if you misunderstood the reason of the convar or if we're talking about something completely different here. |
Hmm but what is triggering this then?
My bad for the wording. We do create the _de _cs and _test convars on file load and disable them. Under the assumption that this only happens for convars that are created dynamically only, we could fix the issue at least for the _gm convar by also creating it on file load. |
I have to test this, but my guess is that using
Ah, I get it now. I disable them by default because I assumed no TTT player actually wants to play a GM map. Changing the default might not fix it, if the player then manually sets it to disabled. I have to test this |
I think I have never set this manually. |
Yes, my bad, Gmod is set to false by default as Histalek noted |
okay, aparantly that isn't such an easy fix. Because I do not set this convar when the files are loaded, it is announced to chat. There is no way around it as far as I can see. But this poses the general question: Should convar changes be announced in chat at all? |
I think not. Feels weird if everyone sees it in the chat. |
* Unconditionally create gm, ttt and ttt2 prefixes We can reasonably assume `gm` maps to be present on the server, the same goes for `ttt` and `ttt2` maps. Even if either or both of them are not currently installed on the server creating these unconditionally would allow an admin to configure their behaviour in that case. Creating convars dynamically if we find more map prefixes is still done. * Disable all map prefixes but `ttt` and `ttt2` by default We will assume people only want to run maps intended for ttt(2). Given that the prefix selection can be modified on the same admin settings page that is (currently) the only one using these convars this seems fine. * Drop FCVAR_NOTIFY for all `map_prefix_enabled` convars Given that these are purely used in an admin context there is no need to announce changes to all users on the server. The last changes especially fixes the original Issue #1632
* Unconditionally create gm, ttt and ttt2 prefixes We can reasonably assume `gm` maps to be present on the server, the same goes for `ttt` and `ttt2` maps. Even if either or both of them are not currently installed on the server creating these unconditionally would allow an admin to configure their behaviour in that case. Creating convars dynamically if we find more map prefixes is still done. * Disable all map prefixes but `ttt` and `ttt2` by default We will assume people only want to run maps intended for ttt(2). Given that the prefix selection can be modified on the same admin settings page that is (currently) the only one using these convars this seems fine. * Drop FCVAR_NOTIFY for all `map_prefix_enabled` convars Given that these are purely used in an admin context there is no need to announce changes to all users on the server. The last changes especially fixes the original Issue #1632
* Unconditionally create gm, ttt and ttt2 prefixes We can reasonably assume `gm` maps to be present on the server, the same goes for `ttt` and `ttt2` maps. Creating convars dynamically if we find more map prefixes is still done. Only prefixes for installed maps will be shown anyway. * Disable all map prefixes but `ttt` and `ttt2` by default We will assume people only want to run maps intended for ttt(2). Given that the prefix selection can be modified on the same admin settings page that is (currently) the only one using these convars this seems fine. * Drop FCVAR_NOTIFY for all `map_prefix_enabled` convars Given that these are purely used in an admin context there is no need to announce changes to all users on the server. The last changes especially fixes the original Issue #1632
#1669) * Unconditionally create gm, ttt and ttt2 prefixes We can reasonably assume `gm` maps to be present on the server, the same goes for `ttt` and `ttt2` maps. Creating convars dynamically if we find more map prefixes is still done. And only prefixes for installed maps will be shown anyway. * Disable all map prefixes but `ttt` and `ttt2` by default We will assume people only want to run maps intended for ttt(2). Given that the prefix selection can be modified on the same admin settings page that is (currently) the only one using these convars this seems fine. * Drop FCVAR_NOTIFY for all `map_prefix_enabled` convars Given that these are purely used in an admin context there is no need to announce changes to all users on the server. The last changes especially fixes the original Issue #1632
Your version of TTT2 (mandatory)
Describe the bug (mandatory)
The following message shows up in the chat each map on the first round: "Server cvar 'ttt2_enable_map_prefix_gm' changed to 0".
To reproduce
Steps to reproduce the behaviour:
Expected behaviour
This message shouldn't appear each time in the chat.
Context (please provide as much as you can)
The text was updated successfully, but these errors were encountered: