summaryrefslogtreecommitdiffstats
path: root/src/ClonkInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ClonkInterface.cpp')
-rw-r--r--src/ClonkInterface.cpp34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/ClonkInterface.cpp b/src/ClonkInterface.cpp
index 036b931..2642568 100644
--- a/src/ClonkInterface.cpp
+++ b/src/ClonkInterface.cpp
@@ -3,33 +3,34 @@
ClonkOutputInterface::~ClonkOutputInterface() { }
-void ClonkOutputInterface::raw(const QString &msg) { Q_UNUSED(msg); }
+bool ClonkOutputInterface::raw(const QString &msg) { Q_UNUSED(msg); return false; }
-void ClonkOutputInterface::rawTimed(const QString &msg, const QTime &time) { Q_UNUSED(msg); Q_UNUSED(time); }
+bool ClonkOutputInterface::rawTimed(const QString &msg, const QTime &time) { Q_UNUSED(msg); Q_UNUSED(time); return false; }
-void ClonkOutputInterface::lobbyCountdown(unsigned int seconds) { Q_UNUSED(seconds); }
+bool ClonkOutputInterface::lobbyCountdown(unsigned int seconds) { Q_UNUSED(seconds); return false; }
-void ClonkOutputInterface::lobbyCountdownAborted() {}
+bool ClonkOutputInterface::lobbyCountdownAborted() { return false; }
-void ClonkOutputInterface::playerRemoved(const QString &name) { Q_UNUSED(name); }
+bool ClonkOutputInterface::playerRemoved(const QString &name) { Q_UNUSED(name); return false; }
-void ClonkOutputInterface::playerJoined(const ClientInfo &client, const QString &name) { Q_UNUSED(client); Q_UNUSED(name); }
+bool ClonkOutputInterface::playerJoined(const ClientInfo &client, const QString &name) { Q_UNUSED(client); Q_UNUSED(name); return false; }
-void ClonkOutputInterface::watchdog(const QString &id) { Q_UNUSED(id); }
+bool ClonkOutputInterface::watchdog(const QString &id) { Q_UNUSED(id); return false; }
-void ClonkOutputInterface::clientMessage(ClientInfo &client, const QString &message, ClonkOutputInterface::MessageType type, const QTime &time) { Q_UNUSED(client); Q_UNUSED(message); Q_UNUSED(type); Q_UNUSED(time); }
+bool ClonkOutputInterface::clientMessage(ClientInfo &client, const QString &message, ClonkOutputInterface::MessageType type, const QTime &time) { Q_UNUSED(client); Q_UNUSED(message); Q_UNUSED(type); Q_UNUSED(time); return false; }
-void ClonkOutputInterface::clientConnected(const ClientInfo &client) { Q_UNUSED(client); }
+bool ClonkOutputInterface::clientConnected(const ClientInfo &client) { Q_UNUSED(client); return false; }
-void ClonkOutputInterface::clientRemoved(const ClientInfo &client, const QString& reason) { Q_UNUSED(client); Q_UNUSED(reason); }
+bool ClonkOutputInterface::clientRemoved(const ClientInfo &client, const QString& reason) { Q_UNUSED(client); Q_UNUSED(reason); return false; }
-void ClonkOutputInterface::clientStateChanged(const ClientInfo &client, bool activated) { Q_UNUSED(client); Q_UNUSED(activated); }
+bool ClonkOutputInterface::clientStateChanged(const ClientInfo &client, bool activated) { Q_UNUSED(client); Q_UNUSED(activated); return false; }
-void ClonkOutputInterface::gameLoading() {}
+bool ClonkOutputInterface::gameLoading() { return false; }
-void ClonkOutputInterface::gameStarted() {}
+bool ClonkOutputInterface::gameStarted() { return false; }
-void ClonkOutputInterface::masterserverError(const QString &msg) { Q_UNUSED(msg); }
+bool ClonkOutputInterface::masterserverError(const QString& msg)
+{ Q_UNUSED(msg); return false; }
ClonkControlInterface::~ClonkControlInterface() {}
@@ -63,7 +64,10 @@ void ClonkParser::removeTarget(ClonkOutputInterface *target)
#define dispatch(x) for(auto target : targets)\
{\
- target->x;\
+ if(target->x)\
+ {\
+ break;\
+ }\
}
void ClonkParser::raw(const QString &msg) { dispatch(raw(msg)) }