MantisBT - Zandronum
View Issue Details
0002482Zandronum[All Projects] Bugpublic2015-10-07 13:452018-09-30 21:48
Zalewa 
Torr Samaho 
normalminoralways
closedfixed 
MicrosoftWindowsXP/Vista/7
3.0-beta 
3.03.0 
0002482: How can I blank a CVAR from command line?
Fix for a command-line problem that was reported and fixed in ZDoom has created a new problem with command-line parsing. This is the report:
'http://forum.zdoom.org/viewtopic.php?f=7&t=33763 [^]'

Right now I have no idea how to blank a CVAR from command line.

For example, I want to have a blank MOTD. In Zandronum 2.1 and earlier the following worked:

+sv motd "\"\""

This weird syntax actually did what I expected. However, in Zandronum 3.0 it will set MOTD to double double-quotes: "".

The following:

+sv motd ""

also doesn't work. Instead of blanking the variable, the game will load the one that is stored in the config file. If we used MOTD such as "Alice has a cat" in a previous run, with +sv_motd "" the MOTD will still be "Alice has a cat".

I have also discovered that Zandronum will interpret \0 escape sequence as the end of the string:

+sv_motd "\0"

This seemed to work nicely until I discovered that it produces odd behavior when sv_motd is queried in the server console, and at least in builds prior 2015-10-04 it caused clients to print empty MOTD to console and would randomly crash the game.
No tags attached.
related to 0002480closed Zalewa Doomseeker doomseeker adds unnecessary "" to blank commands 
Issue History
2015-10-07 13:45ZalewaNew Issue
2015-10-07 13:46ZalewaRelationship addedrelated to 0002480
2015-10-07 13:47ZalewaDescription Updatedbug_revision_view_page.php?rev_id=8109#r8109
2015-10-07 13:48ZalewaDescription Updatedbug_revision_view_page.php?rev_id=8110#r8110
2016-11-20 21:37Edward-sanNote Added: 0016230
2016-11-20 21:37Edward-sanProduct Version3.0 => 3.0-beta
2016-11-21 07:10Torr SamahoStatusnew => feedback
2016-11-27 21:57ZalewaNote Added: 0016370
2016-11-27 21:57ZalewaStatusfeedback => new
2016-11-28 10:41Edward-sanStatusnew => acknowledged
2016-11-28 10:41Edward-sanResolutionopen => waiting for zdoom
2016-12-24 22:41DuskTarget Version => 3.0
2017-01-05 21:06DuskNote Added: 0016608
2017-01-08 11:11ZalewaNote Added: 0016624
2017-01-08 11:23ZalewaNote Edited: 0016624bug_revision_view_page.php?bugnote_id=16624#r10046
2017-01-08 18:07Edward-sanNote Added: 0016626
2017-01-09 17:28ZalewaNote Added: 0016627
2017-01-09 23:04ZalewaNote Added: 0016630
2017-01-09 23:04ZalewaResolutionwaiting for zdoom => open
2017-01-10 09:58Edward-sanAssigned To => Torr Samaho
2017-01-10 09:58Edward-sanStatusacknowledged => assigned
2017-01-15 10:51Torr SamahoNote Added: 0016641
2017-01-15 10:52Torr SamahoStatusassigned => needs testing
2017-01-15 14:10ZalewaNote Added: 0016645
2017-01-15 14:12ZalewaNote Edited: 0016645bug_revision_view_page.php?bugnote_id=16645#r10054
2017-01-15 14:12ZalewaNote Edited: 0016645bug_revision_view_page.php?bugnote_id=16645#r10055
2017-01-15 14:13ZalewaNote Edited: 0016645bug_revision_view_page.php?bugnote_id=16645#r10056
2017-02-07 18:14DuskStatusneeds testing => resolved
2017-02-07 18:14DuskFixed in Version => 3.0
2017-02-07 18:14DuskResolutionopen => fixed
2018-09-30 21:48Blzut3Statusresolved => closed

Notes
(0016230)
Edward-san   
2016-11-20 21:37   
Why is it reported here and not in ZDoom?
(0016370)
Zalewa   
2016-11-27 21:57   
Quote from Edward-San
Why is it reported here and not in ZDoom?

Bluntly, because I don't care if it gets fixed in ZDoom or not. It can't even be qualified as a bug, it's just the way the command line works. I want this to work in Zandronum.

Nevertheless, I posted the issue in the original thread on the ZDoom forums
'http://forum.zdoom.org/viewtopic.php?f=7&t=33763&p=958043#p958043 [^]'
(0016608)
Dusk   
2017-01-05 21:06   
We need an answer from ZDoom regarding this if this is going to make it to 3.0.
(0016624)
Zalewa   
2017-01-08 11:11   
(edited on: 2017-01-08 11:23)
How should this proceed now when ZDoom is dead?

(0016626)
Edward-san   
2017-01-08 18:07   
GZDoom is still active and we still depend on it. It's better to make a new bug report in the github tracker until the shared mantisbt is ready.
(0016627)
Zalewa   
2017-01-09 17:28   
I've went ahead and created PR into GZDoom repository with your change:'https://github.com/coelckers/gzdoom/pull/210 [^]'
(0016630)
Zalewa   
2017-01-09 23:04   
The PR is merged so I'm changing the "resolution" back to open.
(0016641)
Torr Samaho   
2017-01-15 10:51   
I backported the GZDoom fix.
(0016645)
Zalewa   
2017-01-15 14:10   
(edited on: 2017-01-15 14:13)
I compiled the newest tip and already implemented necessary changes in Doomseeker. So far it looks good - I tried following values both on Linux and Windows:

- empty ("")
- plain (something)
- single word quoted ("something")
- with space ("some thing")
- with quote ("some\"thing")
- with space and quote ("some \" thing")