summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-01-26 17:54:18 +0100
committermadmaxoft <github@xoft.cz>2014-01-26 17:56:12 +0100
commit30c431b479673b2c94b9d642fc7de73679cf3e6f (patch)
tree6057013ed5cce4e6614621df2dfb966abc7a6291 /src/main.cpp
parentcByteBuffer has more self-tests. (diff)
downloadcuberite-30c431b479673b2c94b9d642fc7de73679cf3e6f.tar
cuberite-30c431b479673b2c94b9d642fc7de73679cf3e6f.tar.gz
cuberite-30c431b479673b2c94b9d642fc7de73679cf3e6f.tar.bz2
cuberite-30c431b479673b2c94b9d642fc7de73679cf3e6f.tar.lz
cuberite-30c431b479673b2c94b9d642fc7de73679cf3e6f.tar.xz
cuberite-30c431b479673b2c94b9d642fc7de73679cf3e6f.tar.zst
cuberite-30c431b479673b2c94b9d642fc7de73679cf3e6f.zip
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 0f6895d03..9acc7db3a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -19,8 +19,11 @@ bool g_SERVER_TERMINATED = false; // Set to true when the server terminates, so
-/** If set to true, the protocols will log each player's communication to a separate logfile */
-bool g_ShouldLogComm;
+/** If set to true, the protocols will log each player's incoming (C->S) communication to a per-connection logfile */
+bool g_ShouldLogCommIn;
+
+/** If set to true, the protocols will log each player's outgoing (S->C) communication to a per-connection logfile */
+bool g_ShouldLogCommOut;
@@ -242,7 +245,24 @@ int main( int argc, char **argv )
(NoCaseCompare(argv[i], "/logcomm") == 0)
)
{
- g_ShouldLogComm = true;
+ g_ShouldLogCommIn = true;
+ g_ShouldLogCommOut = true;
+ }
+ if (
+ (NoCaseCompare(argv[i], "/commlogin") == 0) ||
+ (NoCaseCompare(argv[i], "/comminlog") == 0) ||
+ (NoCaseCompare(argv[i], "/logcommin") == 0)
+ )
+ {
+ g_ShouldLogCommIn = true;
+ }
+ if (
+ (NoCaseCompare(argv[i], "/commlogout") == 0) ||
+ (NoCaseCompare(argv[i], "/commoutlog") == 0) ||
+ (NoCaseCompare(argv[i], "/logcommout") == 0)
+ )
+ {
+ g_ShouldLogCommOut = true;
}
}