Index: code/branches/tutoriallevel2/src/modules/notifications/Notification.cc
===================================================================
--- code/branches/tutoriallevel2/src/modules/notifications/Notification.cc	(revision 8378)
+++ code/branches/tutoriallevel2/src/modules/notifications/Notification.cc	(revision 8445)
@@ -48,5 +48,5 @@
         The sender of the Notification.
     */
-    Notification::Notification(const std::string& message, const std::string& sender)
+    Notification::Notification(const std::string& message, const std::string& sender, notificationMessageType::Value type)
     {
         RegisterRootObject(Notification);
@@ -54,4 +54,5 @@
         this->message_ = message;
         this->sender_ = sender;
+        this->type_ = type;
     }
 
Index: code/branches/tutoriallevel2/src/modules/notifications/Notification.h
===================================================================
--- code/branches/tutoriallevel2/src/modules/notifications/Notification.h	(revision 8378)
+++ code/branches/tutoriallevel2/src/modules/notifications/Notification.h	(revision 8445)
@@ -40,4 +40,5 @@
 #include <string>
 #include "core/OrxonoxClass.h"
+#include "interfaces/NotificationListener.h"
 
 namespace orxonox
@@ -48,5 +49,5 @@
         A Notification represents a short message used to inform the player about something that just happened. With the @ref orxonox::NotificationManager "NotificationManager" a Notification can be sent from any part of orxonox and is then displayed by the proper @ref orxonox::NotificationQueue "NotificationQueue(s)" (depending on which senders the specific @ref orxonox::NotificationQueue "NotificationQueues" accepts).
 
-        A Notification is just a datastructure that is used internally by the Notifications module.
+        A Notification is just a data structure that is used internally by the Notifications module.
 
     @author
@@ -58,5 +59,5 @@
     {
         public:
-            Notification(const std::string& message, const std::string& sender);
+            Notification(const std::string& message, const std::string& sender, notificationMessageType::Value type);
             virtual ~Notification();
 
@@ -75,7 +76,15 @@
                 { return this->sender_; }
 
+            /**
+            @brief Get the type of the Notification.
+            @return Returns an enum with the type of the Notification.
+            */
+            inline notificationMessageType::Value getType(void) const
+                { return this->type_; }
+
         private:
             std::string message_; //!< The Notification message.
             std::string sender_; //!< The sender of the notification.
+            notificationMessageType::Value type_; //!< The type of the notification.
 
             void initialize(void); //!< Registers the object and sets some default values.
Index: code/branches/tutoriallevel2/src/modules/notifications/NotificationDispatcher.cc
===================================================================
--- code/branches/tutoriallevel2/src/modules/notifications/NotificationDispatcher.cc	(revision 8378)
+++ code/branches/tutoriallevel2/src/modules/notifications/NotificationDispatcher.cc	(revision 8445)
@@ -113,5 +113,6 @@
         {
             const std::string message = this->createNotificationMessage();
-            NotificationListener::sendNotification(message, this->getSender(), notificationMessageMode::message, notificationSendMode::network, clientId);
+            // TODO: Make the type configurable.
+            NotificationListener::sendNotification(message, this->getSender(), notificationMessageType::info, notificationSendMode::network, clientId);
         }
         else if(GameMode::isServer())
Index: code/branches/tutoriallevel2/src/modules/notifications/NotificationManager.cc
===================================================================
--- code/branches/tutoriallevel2/src/modules/notifications/NotificationManager.cc	(revision 8378)
+++ code/branches/tutoriallevel2/src/modules/notifications/NotificationManager.cc	(revision 8445)
@@ -105,11 +105,62 @@
         this->queues_.clear();
     }
+
+    /**
+    @brief
+        Creates and registers a Notification with the input message from the input sender.
+        This is called by the NotificationListener, whenever a new notification arrives.
+    @param message
+        The message of the new Notification.
+    @param sender
+        The name of the entity (of the collective) that sent the new Notification.
+    @return
+        Returns true if successful.
+    */
+    bool NotificationManager::registerNotification(const std::string& message, const std::string& sender, notificationMessageType::Value type)
+    {
+        // TODO: Do something with the type.
+        Notification* notification = new Notification(message, sender, type);
+        return this->registerNotification(notification);
+    }
+
+    /**
+    @brief
+        Executes the input command from the input sender.
+        This is called by the NotificationListener, whenever a new command arrives.
+    @param command
+        The command to be executed,
+    @param sender
+        The The name of the entity (of the collective) that sent the command.
+    */
+    bool NotificationManager::executeCommand(notificationCommand::Value command, const std::string& sender)
+    {
+        if(command == notificationCommand::clear)
+        {
+            this->commandClear(sender);
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+    @brief
+        The clear command. Clears all NotificationQueues that have its sender as a target.
+    @param sender
+        The sender of the clear command.
+    */
+    void NotificationManager::commandClear(const std::string& sender)
+    {
+        bool all = (sender == NotificationListener::ALL);
+        // Clear all NotificationQueues that have the input sender as target.
+        for(std::map<const std::string, NotificationQueue*>::iterator it = this->queues_.begin(); it != this->queues_.end(); it++) // Iterate through all NotificationQueues.
+        {
+            const std::set<std::string>& set = it->second->getTargetsSet();
+            // If either the sender is 'all', the NotificationQueue has as target all or the NotificationQueue has the input sender as a target.
+            if(all || set.find(NotificationListener::ALL) != set.end() || set.find(sender) != set.end())
+                it->second->tidy();
+        }
+    }
     
-    bool NotificationManager::registerNotification(const std::string& message, const std::string& sender)
-    {
-        Notification* notification = new Notification(message, sender);
-        return this->registerNotification(notification);
-    }
-
     /**
     @brief
@@ -132,7 +183,6 @@
             return true;
 
-        bool all = false;
-        if(notification->getSender() == NotificationListener::ALL) // If all are the sender, then the Notifications is added to every NotificationQueue.
-            all = true;
+        // If all are the sender, then the Notifications is added to every NotificationQueue.
+        bool all = (notification->getSender() == NotificationListener::ALL);
 
         // Insert the Notification in all NotificationQueues that have its sender as target.
@@ -364,5 +414,5 @@
 
         NotificationQueue* infoQueue = new NotificationQueue("info", NotificationListener::ALL, 1, -1);
-        GUIManager::getInstance().getLuaState()->doString("NotificationLayer.changeQueueFont(\"info\", 24, \"FFFFFF00\")");
+        GUIManager::getInstance().getLuaState()->doString("NotificationLayer.changeQueueFont(\"info\", 24, \"CCFFFF00\")");
         GUIManager::getInstance().getLuaState()->doString("NotificationLayer.resizeQueue(\"info\", 0.6, 0, " + multi_cast<std::string>(infoQueue->getMaxSize()) + ")");
         GUIManager::getInstance().getLuaState()->doString("NotificationLayer.moveQueue(\"info\", 0.2, 0, 0.8, 0)");
Index: code/branches/tutoriallevel2/src/modules/notifications/NotificationManager.h
===================================================================
--- code/branches/tutoriallevel2/src/modules/notifications/NotificationManager.h	(revision 8378)
+++ code/branches/tutoriallevel2/src/modules/notifications/NotificationManager.h	(revision 8445)
@@ -67,5 +67,5 @@
             virtual ~NotificationManager();
 
-            virtual void preDestroy(void); //!< Is called before the object is destroyed.
+            virtual void preDestroy(void); // Is called before the object is destroyed.
 
             /**
@@ -75,14 +75,15 @@
             static NotificationManager& getInstance() { return Singleton<NotificationManager>::getInstance(); } // tolua_export
 
-            virtual bool registerNotification(const std::string& message, const std::string& sender);
+            virtual bool registerNotification(const std::string& message, const std::string& sender, notificationMessageType::Value type);
+            virtual bool executeCommand(notificationCommand::Value command, const std::string& sender);
 
-            bool registerNotification(Notification* notification); //!< Registers a Notification within the NotificationManager.
-            void unregisterNotification(Notification* notification, NotificationQueue* queue); //!< Unregisters a Notification within the NotificationManager for a given NotificationQueue.
+            bool registerNotification(Notification* notification); // Registers a Notification within the NotificationManager.
+            void unregisterNotification(Notification* notification, NotificationQueue* queue); // Unregisters a Notification within the NotificationManager for a given NotificationQueue.
 
-            void getNotifications(NotificationQueue* queue, std::multimap<std::time_t, Notification*>* map, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd); //!< Fetches the Notifications for a specific NotificationQueue in a specified timeframe and stores them in the input map.
+            void getNotifications(NotificationQueue* queue, std::multimap<std::time_t, Notification*>* map, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd); // Fetches the Notifications for a specific NotificationQueue in a specified timeframe and stores them in the input map.
 
             /**
-            @brief Fetches the Notifications for a specific NotificationQueue in a timeframe from now-timeDelay to now and stores them in the input map.
-            @param listener The NotificationQueue the Notifications are fetched for.
+            @brief Fetches the Notifications for a specific NotificationQueue in a timeframe from (now-timeDelay) to now and stores them in the input map.
+            @param queue The NotificationQueue the Notifications are fetched for.
             @param map A pointer to a multimap, in which the notifications are stored. The map needs to have been allocated.
             @param timeDelay The timespan.
@@ -92,15 +93,15 @@
                 { this->getNotifications(queue, map, std::time(0)-timeDelay, std::time(0)); }
 
-            void getNewestNotifications(NotificationQueue* queue, std::multimap<std::time_t, Notification*>* map, int numberOfNotifications); //!< Fetches the newest Notifications for a specific NotificationQueue and stores them in the input map.
+            void getNewestNotifications(NotificationQueue* queue, std::multimap<std::time_t, Notification*>* map, int numberOfNotifications); // Fetches the newest Notifications for a specific NotificationQueue and stores them in the input map.
 
-            void enterEditMode(void); //!< Enters the edit mode of the NotificationLayer.
+            void enterEditMode(void); // Enters the edit mode of the NotificationLayer.
 
-            bool registerQueue(NotificationQueue* queue); //!< Registers a NotificationQueue.
-            void unregisterQueue(NotificationQueue* queue); //!< Unregisters a NotificationQueue.
+            bool registerQueue(NotificationQueue* queue); // Registers a NotificationQueue.
+            void unregisterQueue(NotificationQueue* queue); // Unregisters a NotificationQueue.
 
             // tolua_begin
-            void loadQueues(void); //!< Loads all the NotificationQueues that should exist.
-            void createQueue(const std::string& name); //!< Creates a new NotificationQueue.
-            orxonox::NotificationQueue* getQueue(const std::string & name); //!< Get the NotificationQueue with the input name.
+            void loadQueues(void); // Loads all the NotificationQueues that should exist.
+            void createQueue(const std::string& name); // Creates a new NotificationQueue.
+            orxonox::NotificationQueue* getQueue(const std::string & name); // Get the NotificationQueue with the input name.
             // tolua_end
 
@@ -113,5 +114,8 @@
             std::map<const std::string, NotificationQueue*> queues_; //!< The list of NotificationQueues created by the NotificationManager.
 
-            bool removeNotification(Notification* notification, std::multimap<std::time_t, Notification*>& map); //!< Helper method that removes an input Notification form an input map.
+            bool removeNotification(Notification* notification, std::multimap<std::time_t, Notification*>& map); // Helper method that removes an input Notification form an input map.
+            
+            // Commands
+            void commandClear(const std::string& sender); // The clear command. Clears all NotificationQueues that have its sender as a target.
 
     }; // tolua_export
Index: code/branches/tutoriallevel2/src/modules/notifications/NotificationQueue.cc
===================================================================
--- code/branches/tutoriallevel2/src/modules/notifications/NotificationQueue.cc	(revision 8378)
+++ code/branches/tutoriallevel2/src/modules/notifications/NotificationQueue.cc	(revision 8445)
@@ -56,5 +56,5 @@
     @param senders
         The senders that are targets of this NotificationQueue, i.e. the names of senders whose Notifications this NotificationQueue displays.
-        The senders need to be seperated by commas.
+        The senders need to be separated by commas.
     @param size
         The size (the maximum number of displayed Notifications) of this NotificationQueue.
@@ -304,5 +304,5 @@
         Clears the NotificationQueue by removing all NotificationContainers.
     @param noGraphics
-        If this is eset to true the GUI is not informed of the clearing of the NotificationQueue. This is needed only internally.
+        If this is set to true the GUI is not informed of the clearing of the NotificationQueue. This is needed only internally.
     */
     void NotificationQueue::clear(bool noGraphics)
@@ -369,5 +369,5 @@
     /**
     @brief
-        Produces all targets of the NotificationQueue concatinated as string, with commas (',') as seperators.
+        Produces all targets of the NotificationQueue concatenated as string, with commas (',') as separators.
     @return
         Returns the targets as a string.
@@ -395,5 +395,5 @@
         The targets are the senders whose Notifications are displayed in this queue.
     @param targets
-        Accepts a string of targets, each seperated by commas (','), spaces are ignored.
+        Accepts a string of targets, each separated by commas (','), spaces are ignored.
     */
     void NotificationQueue::setTargets(const std::string & targets)
@@ -412,4 +412,10 @@
         }
     }
+    
+    void NotificationQueue::tidy(void)
+    {
+        while(this->size_ > 0)
+            this->pop();
+    }
 
 }
Index: code/branches/tutoriallevel2/src/modules/notifications/NotificationQueue.h
===================================================================
--- code/branches/tutoriallevel2/src/modules/notifications/NotificationQueue.h	(revision 8378)
+++ code/branches/tutoriallevel2/src/modules/notifications/NotificationQueue.h	(revision 8445)
@@ -77,5 +77,5 @@
         Displays @ref orxonox::Notification "Notifications" from specific senders.
 
-        There are quite some parameters that influence the behaviour of the NotificationQueue:
+        There are quite some parameters that influence the behavior of the NotificationQueue:
         - @b name The name of the NotificationQueue. It needs to be unique.
         - @b senders The senders that are targets of this NotificationQueue, i.e. the names of senders whose Notifications this NotificationQueue displays.
@@ -145,6 +145,8 @@
             // tolua_begin
             void setTargets(const std::string & targets); //!< Set the targets of this NotificationQueue.
-            const std::string& getTargets(void) const; //!< Returns a string consisting of the concatination of the targets.
+            const std::string& getTargets(void) const; //!< Returns a string consisting of the concatenation of the targets.
             // tolua_end
+
+            void tidy(void);
 
         private:
