From 453c79ee6df48691c5803101b987e27b53ba6543 Mon Sep 17 00:00:00 2001 From: ac-stef Date: Mon, 6 Apr 2015 10:37:13 +0200 Subject: [PATCH] minor fixes to get master to compile again --- source/src/command.cpp | 4 +++- source/src/master.cpp | 2 +- source/src/stream.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/source/src/command.cpp b/source/src/command.cpp index a071e6bb..902e3609 100644 --- a/source/src/command.cpp +++ b/source/src/command.cpp @@ -741,6 +741,7 @@ int execute(const char *p) return i; } +#ifndef STANDALONE bool exechook(int context, const char *ident, const char *body,...) // execute cubescript hook if available and allowed in current context/gamemode { // always use one of HOOK_SP_MP, HOOK_SP or HOOK_MP and then OR them (as needed) with HOOK_TEAM, HOOK_NOTEAM, HOOK_BOTMODE, HOOK_FLAGMODE, HOOK_ARENA if(multiplayer(NULL) && (context & HOOK_FLAGMASK) != HOOK_MP && (context & HOOK_FLAGMASK) != HOOK_SP_MP) return false; // hook is singleplayer-only @@ -759,7 +760,6 @@ bool exechook(int context, const char *ident, const char *body,...) // execute return false; } -#ifndef STANDALONE // tab-completion of all idents // always works at the end of the command line - the cursor position does not matter @@ -1259,6 +1259,7 @@ void colora(char *s) } } +#ifndef STANDALONE // Easily inject a string into various CubeScript punctuations const char *punctnames[] = { "QUOTES", "BRACKETS", "PARENTHESIS", "_$_", "QUOTE", "PERCENT", "" }; @@ -1274,6 +1275,7 @@ void addpunct(char *s, char *type) else result(punct); } COMMAND(addpunct, "ss"); +#endif void toLower(char *s) { result(strcaps(s, false)); } void toUpper(char *s) { result(strcaps(s, true)); } diff --git a/source/src/master.cpp b/source/src/master.cpp index ad0cc490..cc35ceb6 100644 --- a/source/src/master.cpp +++ b/source/src/master.cpp @@ -510,7 +510,7 @@ void reqauth(client &c, uint id, char *name) authreq &a = c.authreqs.add(); a.reqtime = servtime; a.id = id; - uint seed[3] = { starttime, servtime, randomMT() }; + uint seed[3] = { (uint)starttime, (uint)servtime, randomMT() }; static vector buf; buf.setsize(0); a.answer = genchallenge(u->pubkey, seed, sizeof(seed), buf); diff --git a/source/src/stream.cpp b/source/src/stream.cpp index 9df6bff6..cd3c59ca 100644 --- a/source/src/stream.cpp +++ b/source/src/stream.cpp @@ -796,6 +796,7 @@ char *loadfile(const char *fn, int *size, const char *mode) return buf; } +#ifndef STANDALONE void filerotate(const char *basename, const char *ext, int keepold, const char *oldformat) // rotate old logfiles { char fname1[MAXSTRLEN * 2], fname2[MAXSTRLEN] = ""; @@ -811,4 +812,4 @@ void filerotate(const char *basename, const char *ext, int keepold, const char * copystring(fname2, fname1); } } - +#endif