[Orxonox-commit 553] r3095 - trunk/src/network

landauf at orxonox.net landauf at orxonox.net
Wed May 27 22:03:32 CEST 2009


Author: landauf
Date: 2009-05-27 22:03:32 +0200 (Wed, 27 May 2009)
New Revision: 3095

Modified:
   trunk/src/network/Host.cc
Log:
fixed standalone chat

Modified: trunk/src/network/Host.cc
===================================================================
--- trunk/src/network/Host.cc	2009-05-27 19:42:13 UTC (rev 3094)
+++ trunk/src/network/Host.cc	2009-05-27 20:03:32 UTC (rev 3095)
@@ -98,7 +98,11 @@
 
 bool Host::Chat(const std::string& message){
   if(!instance_)
-    return false;
+  {
+    for (ObjectList<ChatListener>::iterator it = ObjectList<ChatListener>::begin(); it != ObjectList<ChatListener>::end(); ++it)
+      it->incomingChat(message, 0);
+    return true;
+  }
   return instance_->chat(message);
 }
 
@@ -106,7 +110,7 @@
   if(!instance_)
   {
     for (ObjectList<ChatListener>::iterator it = ObjectList<ChatListener>::begin(); it != ObjectList<ChatListener>::end(); ++it)
-      it->incomingChat(message, 0);
+      it->incomingChat(message, CLIENTID_UNKNOWN);
     return true;
   }
   else




More information about the Orxonox-commit mailing list