[Orxonox-commit 1982] r6699 - in code/branches/chat/src: libraries/network orxonox

smerkli at orxonox.net smerkli at orxonox.net
Mon Apr 12 17:32:14 CEST 2010


Author: smerkli
Date: 2010-04-12 17:32:12 +0200 (Mon, 12 Apr 2010)
New Revision: 6699

Modified:
   code/branches/chat/src/libraries/network/ChatListener.cc
   code/branches/chat/src/orxonox/ChatHistory.cc
   code/branches/chat/src/orxonox/ChatHistory.h
Log:
shit works xD

Modified: code/branches/chat/src/libraries/network/ChatListener.cc
===================================================================
--- code/branches/chat/src/libraries/network/ChatListener.cc	2010-04-12 15:08:27 UTC (rev 6698)
+++ code/branches/chat/src/libraries/network/ChatListener.cc	2010-04-12 15:32:12 UTC (rev 6699)
@@ -36,13 +36,13 @@
         RegisterRootObject(ChatListener);
     }
 
-    void ChatListener::incomingChat( const std::string& message,
-      unsigned int senderID )
-    {
-      COUT(0) << "Chat: \"" << message << "\"\n";
+    //void ChatListener::incomingChat( const std::string& message,
+      //unsigned int senderID )
+    //{
+      //COUT(0) << "Chat: \"" << message << "\"\n";
 
 
-    }
+    //}
 
 
 }

Modified: code/branches/chat/src/orxonox/ChatHistory.cc
===================================================================
--- code/branches/chat/src/orxonox/ChatHistory.cc	2010-04-12 15:08:27 UTC (rev 6698)
+++ code/branches/chat/src/orxonox/ChatHistory.cc	2010-04-12 15:32:12 UTC (rev 6699)
@@ -27,7 +27,7 @@
  */
 
 #include "ChatHistory.h"
-#include "core/ScopedSingletonManager.h"
+#include <core/ScopedSingletonManager.h>
 
 #ifndef CHATTEST
 namespace orxonox
@@ -38,7 +38,8 @@
 
   /* constructor */
 #ifndef CHATTEST
-  ChatHistory(BaseObject* creator) : BaseObject(creator) 
+  //ChatHistory::ChatHistory( BaseObject* creator ) : BaseObject(creator) 
+  ChatHistory::ChatHistory() 
 #else
   ChatHistory::ChatHistory()
 #endif
@@ -58,8 +59,6 @@
       this->chat_hist_logline( "--- Logfile opened ---" );
     }
 
-    assert(0);
-
     /* Read setting for maximum number of lines and set limit */
     this->hist_maxlines = 200; /* NOTE to be changed, 200 is just for testing */
   }
@@ -141,8 +140,8 @@
      *       and set the this->hist_logfile_path variable to it
      */
 #ifndef CHATTEST
-    this->hist_logfile.open( PathConfig::getInstance().getLogPathString() +
-      "chatlog.log",
+    this->hist_logfile.open( (PathConfig::getInstance().getLogPathString() +
+      "chatlog.log").c_str(),
       std::fstream::out | std::fstream::app );
 #else
     this->hist_logfile.open( "/tmp/chatlog.log",

Modified: code/branches/chat/src/orxonox/ChatHistory.h
===================================================================
--- code/branches/chat/src/orxonox/ChatHistory.h	2010-04-12 15:08:27 UTC (rev 6698)
+++ code/branches/chat/src/orxonox/ChatHistory.h	2010-04-12 15:32:12 UTC (rev 6699)
@@ -33,12 +33,16 @@
 #include <cassert>
 
 /* define this if you're unit testing */
-#define CHATTEST 0
+//#define CHATTEST 
 
 #ifndef CHATTEST
+#include <OrxonoxPrereqs.h>
+#include <PlayerManager.h>
+#include <infos/PlayerInfo.h>
 #include <core/BaseObject.h>
+#include <network/ChatListener.h>
 #include <core/PathConfig.h>
-#include <Singleton.h>
+#include <util/Singleton.h>
 #endif
 
 #ifndef _ChatHistory_H__
@@ -53,7 +57,7 @@
 
   /* constructor */
 #ifndef CHATTEST
-  class _OrxonoxExport ChatHistory : public BaseObject, public ChatListener,
+  class _OrxonoxExport ChatHistory : public ChatListener,
     public Singleton<ChatHistory>
 
 #else
@@ -63,7 +67,7 @@
     public:
       /* constructors, destructors */
 #ifndef CHATTEST
-      ChatHistory(BaseObject* creator);
+      ChatHistory();
       friend class Singleton<ChatHistory>;
 #else
       ChatHistory();




More information about the Orxonox-commit mailing list