From e942db1c8d87b7db286545d72c604e879f7aeab0 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 9 Jul 2011 14:11:44 +0000 Subject: Cleanup of the messaging interface. --- src/core/application.cc | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'src/core/application.cc') diff --git a/src/core/application.cc b/src/core/application.cc index 38c39a1..2455f85 100644 --- a/src/core/application.cc +++ b/src/core/application.cc @@ -452,7 +452,21 @@ void Application::load_commandline(int count, char **arguments) void Application::notify_message(const core::Message::Channel channel, const std::string &message) { - con_print << message << std::endl; + switch (channel) { + case core::Message::Info: // Info message + case core::Message::Local: // Chat message in the local zone + case core::Message::Public: // Public chat message + case core::Message::Private: // Private chat message + case core::Message::RCon: // RCon message + con_print << message << std::endl; + break; + + case core::Message::Sound: // Sound event + break; + + default: + break; + } } void Application::notify_loader(const std::string &message) @@ -461,12 +475,6 @@ void Application::notify_loader(const std::string &message) // used by the client to udpate the loader screen } -void Application::notify_sound(const char *name) -{ - // the default implementation does nothing. - // Dedicated servers don't need sounds -} - void Application::notify_zonechange() { // the default implementation does nothing. -- cgit v1.2.3