From d4a245e0fd62c28b02ad8a985dea9d40d1b1de7d Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 18 Feb 2012 18:09:34 +0100 Subject: [PATCH] Drop C_MOD flag from commands that "obviously" don't need it C_MOD prevents print functions from blocking. The common reason for wanting non-blocking prints are "read, print, write back" patterns. There might be other reasons lurking in the code, and that's why messing with C_MOD is scary. Nevertheless, drop it from cutoff, headlines, land, lstat, motd, neweff, payoff, qorder, sorder, and wall. These commands have had C_MOD "forever", even though they clearly don't modify game state. They're all pretty simple. Similar commands such as census, news, ship, plane, nuke, sstat, pstat, flash never had C_MOD. --- src/lib/player/empmod.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lib/player/empmod.c b/src/lib/player/empmod.c index 65976057e..3d5ad25a5 100644 --- a/src/lib/player/empmod.c +++ b/src/lib/player/empmod.c @@ -79,7 +79,7 @@ struct cmndstr player_coms[] = { 1, cons, C_MOD, NORM + CAP}, {"convert [sure?]", 2, conv, C_MOD, NORM + MONEY + CAP}, {"country ", 0, coun, 0, 0}, - {"cutoff ", 0, cuto, C_MOD, NORM}, + {"cutoff ", 0, cuto, 0, NORM}, {"declare ", 2, decl, C_MOD, NORM + CAP}, {"deliver [q|] []", 1, deli, C_MOD, NORM}, @@ -113,12 +113,12 @@ struct cmndstr player_coms[] = { {"give ", 0, give, C_MOD, GOD}, {"grind ", 1, grin, C_MOD, NORM + MONEY + CAP}, {"harden ", 2, hard, C_MOD, NORM + MONEY + CAP}, - {"headlines [days]", 0, head, C_MOD, 0}, + {"headlines [days]", 0, head, 0, 0}, {"help ", 0, info, 0, 0}, {"improve ", 1, improve, C_MOD, NORM + MONEY + CAP}, {"info ", 0, info, 0, 0}, - {"land ", 0, land, C_MOD, NORM}, + {"land ", 0, land, 0, NORM}, {"launch ", 3, laun, C_MOD, NORM + MONEY + CAP}, {"lbmap [s|l|n|p|r|t|*|h]", 0, map, C_MOD, NORM}, {"lboard []", @@ -140,7 +140,7 @@ struct cmndstr player_coms[] = { {"lradar ", 1, lrad, C_MOD, NORM + CAP}, {"lretreat [i|h|b|c]", 1, lretr, C_MOD, NORM + CAP}, - {"lstat ", 0, lsta, C_MOD, NORM}, + {"lstat ", 0, lsta, 0, NORM}, {"ltend ", 1, ltend, C_MOD, NORM + CAP}, {"lunload ", @@ -152,7 +152,7 @@ struct cmndstr player_coms[] = { {"mission []", 2, mission, C_MOD, NORM + CAP}, {"morale ", 1, morale, C_MOD, NORM + CAP}, - {"motd", 0, show_motd, C_MOD, 0}, + {"motd", 0, show_motd, 0, 0}, {"move ", 1, move, C_MOD, NORM + CAP}, {"mquota ", 2, mobq, C_MOD, NORM + CAP}, @@ -162,7 +162,7 @@ struct cmndstr player_coms[] = { {"nbmap [s|l|n|p|r|t|*|h]", 0, map, C_MOD, NORM}, {"ndump ", 0, ndump, 0, NORM}, {"newcap ", 0, new, C_MOD, GOD}, - {"neweff ", 0, newe, C_MOD, NORM}, + {"neweff ", 0, newe, 0, NORM}, {"newspaper [days]", 0, news, 0, 0}, {"nmap [s|l|n|p|*|h]", 0, map, C_MOD, NORM}, {"nuke ", 0, nuke, 0, NORM}, @@ -173,7 +173,7 @@ struct cmndstr player_coms[] = { {"paradrop ", 3, para, C_MOD, NORM + MONEY + CAP}, {"path ", 0, path, C_MOD, NORM}, - {"payoff ", 0, payo, C_MOD, NORM}, + {"payoff ", 0, payo, 0, NORM}, {"pbmap [s|l|n|p|r|t|*|h]", 0, map, C_MOD, NORM}, {"pboard ", 3, pboa, C_MOD, NORM + MONEY + CAP}, {"pdump []", 0, pdump, 0, NORM}, @@ -186,7 +186,7 @@ struct cmndstr player_coms[] = { {"pray", 0, tele, C_MOD, NORM}, {"production ", 0, prod, 0, NORM}, {"pstat ", 0, pstat, 0, NORM}, - {"qorder ", 0, qorde, C_MOD, NORM}, + {"qorder ", 0, qorde, 0, NORM}, {"quit", 0, quit, 0, 0}, {"radar ", 1, rada, C_MOD, NORM + CAP}, {"range ", 1, range, C_MOD, NORM + CAP}, @@ -233,7 +233,7 @@ struct cmndstr player_coms[] = { {"skywatch ", 1, skyw, C_MOD, NORM + CAP}, {"smap [s|l|n|p|*|h]", 0, map, C_MOD, NORM}, {"sonar ", 1, sona, C_MOD, NORM + CAP}, - {"sorder ", 0, sorde, C_MOD, NORM}, + {"sorder ", 0, sorde, 0, NORM}, {"spy ", 1, spy, C_MOD, NORM + CAP}, {"sstat ", 0, sstat, 0, NORM}, {"start ", 1, start, C_MOD, NORM}, @@ -268,7 +268,7 @@ struct cmndstr player_coms[] = { {"upgrade ", 1, upgr, C_MOD, NORM + MONEY + CAP}, {"version", 0, vers, 0, 0}, - {"wall []", 0, wall, C_MOD, NORM}, + {"wall []", 0, wall, 0, NORM}, {"wingadd ", 1, wing, C_MOD, NORM}, {"wipe ", 1, wipe, C_MOD, NORM}, {"wire [yes|no|]", 0, rea, C_MOD, 0}, -- 2.43.0