From 41a23cb4511e9ba3985990e2703fb3d680a23d14 Mon Sep 17 00:00:00 2001 From: Chuck Miller Date: Sun, 18 Jul 2010 23:02:25 -0400 Subject: Move the majority of the netcode's server messages to the event system There is still a good way to go, but this should get us started Reviewed-by: Jared Adams --- src/net/manaserv/guildhandler.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/net/manaserv/guildhandler.cpp') diff --git a/src/net/manaserv/guildhandler.cpp b/src/net/manaserv/guildhandler.cpp index 1fbfdf21..b5d7e7bd 100644 --- a/src/net/manaserv/guildhandler.cpp +++ b/src/net/manaserv/guildhandler.cpp @@ -21,6 +21,8 @@ #include "net/manaserv/guildhandler.h" +#include "event.h" +#include "eventmanager.h" #include "guild.h" #include "log.h" #include "localplayer.h" @@ -78,12 +80,12 @@ void GuildHandler::handleMessage(Net::MessageIn &msg) if (msg.readInt8() == ERRMSG_OK) { // TODO - Acknowledge guild was created - localChatTab->chatLog(_("Guild created.")); + SERVER_NOTICE(_("Guild created.")) joinedGuild(msg); } else { - localChatTab->chatLog(_("Error creating guild.")); + SERVER_NOTICE(_("Error creating guild.")) } } break; @@ -93,7 +95,7 @@ void GuildHandler::handleMessage(Net::MessageIn &msg) if (msg.readInt8() == ERRMSG_OK) { // TODO - Acknowledge invite was sent - localChatTab->chatLog(_("Invite sent.")); + SERVER_NOTICE(_("Invite sent.")) } } break; @@ -200,12 +202,12 @@ void GuildHandler::handleMessage(Net::MessageIn &msg) if (msg.readInt8() == ERRMSG_OK) { // promotion succeeded - localChatTab->chatLog(_("Member was promoted successfully.")); + SERVER_NOTICE(_("Member was promoted successfully.")) } else { // promotion failed - localChatTab->chatLog(_("Failed to promote member.")); + SERVER_NOTICE(_("Failed to promote member.")) } } -- cgit v1.2.3-70-g09d2