diff options
author | Chuck Miller <shadowmil@gmail.com> | 2010-07-18 23:02:25 -0400 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2010-07-18 23:10:02 -0400 |
commit | 41a23cb4511e9ba3985990e2703fb3d680a23d14 (patch) | |
tree | 2bf03217e3c3b0f28aed5649e2e43cf2b965bd1d /src/net/manaserv/guildhandler.cpp | |
parent | 782158dfd719fb6d196f79075f275fb8599d393c (diff) | |
download | mana-41a23cb4511e9ba3985990e2703fb3d680a23d14.tar.gz mana-41a23cb4511e9ba3985990e2703fb3d680a23d14.tar.bz2 mana-41a23cb4511e9ba3985990e2703fb3d680a23d14.tar.xz mana-41a23cb4511e9ba3985990e2703fb3d680a23d14.zip |
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
Diffstat (limited to 'src/net/manaserv/guildhandler.cpp')
-rw-r--r-- | src/net/manaserv/guildhandler.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
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.")) } } |