summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-02-28 15:29:50 +0100
committerHowaner <franzi.moos@googlemail.com>2014-02-28 15:29:50 +0100
commit27b98dec2b62a1fe88130c6a5c2c840dde293a5e (patch)
tree6c92a2e4f8614e74362d2695961a9ffba8d08965 /src/main.cpp
parentFix Double Slabs, fix Slab Meta and add more things to burnable (diff)
parentMerge pull request #709 from Howaner/GlobalFixes (diff)
downloadcuberite-27b98dec2b62a1fe88130c6a5c2c840dde293a5e.tar
cuberite-27b98dec2b62a1fe88130c6a5c2c840dde293a5e.tar.gz
cuberite-27b98dec2b62a1fe88130c6a5c2c840dde293a5e.tar.bz2
cuberite-27b98dec2b62a1fe88130c6a5c2c840dde293a5e.tar.lz
cuberite-27b98dec2b62a1fe88130c6a5c2c840dde293a5e.tar.xz
cuberite-27b98dec2b62a1fe88130c6a5c2c840dde293a5e.tar.zst
cuberite-27b98dec2b62a1fe88130c6a5c2c840dde293a5e.zip
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 4d2801926..2ae8a413b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -243,31 +243,36 @@ int main( int argc, char **argv )
// Check if comm logging is to be enabled:
for (int i = 0; i < argc; i++)
{
+ AString Arg(argv[i]);
if (
- (NoCaseCompare(argv[i], "/commlog") == 0) ||
- (NoCaseCompare(argv[i], "/logcomm") == 0)
+ (NoCaseCompare(Arg, "/commlog") == 0) ||
+ (NoCaseCompare(Arg, "/logcomm") == 0)
)
{
g_ShouldLogCommIn = true;
g_ShouldLogCommOut = true;
}
- if (
- (NoCaseCompare(argv[i], "/commlogin") == 0) ||
- (NoCaseCompare(argv[i], "/comminlog") == 0) ||
- (NoCaseCompare(argv[i], "/logcommin") == 0)
+ else if (
+ (NoCaseCompare(Arg, "/commlogin") == 0) ||
+ (NoCaseCompare(Arg, "/comminlog") == 0) ||
+ (NoCaseCompare(Arg, "/logcommin") == 0)
)
{
g_ShouldLogCommIn = true;
}
- if (
- (NoCaseCompare(argv[i], "/commlogout") == 0) ||
- (NoCaseCompare(argv[i], "/commoutlog") == 0) ||
- (NoCaseCompare(argv[i], "/logcommout") == 0)
+ else if (
+ (NoCaseCompare(Arg, "/commlogout") == 0) ||
+ (NoCaseCompare(Arg, "/commoutlog") == 0) ||
+ (NoCaseCompare(Arg, "/logcommout") == 0)
)
{
g_ShouldLogCommOut = true;
}
- }
+ else if (NoCaseCompare(Arg, "nooutbuf") == 0)
+ {
+ setvbuf(stdout, NULL, _IONBF, 0);
+ }
+ } // for i - argv[]
#if !defined(ANDROID_NDK)
try