correct the return type of UserInfoCallback and the values. 0 is for reject,

1 is for accept.
This commit is contained in:
Bill Currie 2001-07-20 16:00:49 +00:00
parent c27d98b058
commit b7c0929c3f
2 changed files with 6 additions and 6 deletions

View file

@ -1,4 +1,4 @@
qwprogs.dat: preprogs.src *.qc
qfpreqcc --warn=error --debug
qfpreqcc --warn=error --debug --no-cpp
clean:
rm -f core *.dat *.pqc *.sym progdefs.h progs.src

View file

@ -647,7 +647,7 @@ void() TeamFortress_CheckTeamCheats =
}
};
void(string key, string value) UserInfoCallback =
float(string key, string value) UserInfoCallback =
{
local string oldval;
local string st;
@ -656,7 +656,7 @@ void(string key, string value) UserInfoCallback =
if(value == oldval) // generic reject
{
bprint(#PRINT_MEDIUM, "[oldval (" + key + ")(" + value + ")(" + oldval + ")]\n");
return 1; // rejected!
return 0; // rejected!
}
if (key == "topcolor" || key == "bottomcolor")
@ -668,7 +668,7 @@ void(string key, string value) UserInfoCallback =
stuffcmd(self, st);
stuffcmd(self, "\n");
bprint(#PRINT_MEDIUM, "[color (" + key + ")(" + value + ")(" + oldval + ")]\n");
return 1;
return 0;
}
else if (key == "skin")
{
@ -676,12 +676,12 @@ void(string key, string value) UserInfoCallback =
stuffcmd(self, oldval);
stuffcmd(self, "\n");
bprint(#PRINT_MEDIUM, "[skin (" + key + ")(" + value + ")(" + oldval + ")]\n");
return 1;
return 0;
}
else
{
bprint(#PRINT_MEDIUM, "[default (" + key + ")(" + value + ")(" + oldval + ")]\n");
return 0; // accept everything else
return 1; // accept everything else
}
};