summaryrefslogtreecommitdiff
path: root/src/net/manaserv/chathandler.cpp
diff options
context:
space:
mode:
authorChuck Miller <shadowmil@gmail.com>2010-11-11 23:12:29 -0500
committerChuck Miller <shadowmil@gmail.com>2010-11-11 23:12:29 -0500
commita4640305fd0d88c6332112712aa69e496368e01b (patch)
tree0f039b331026ca2b9718a920b24e2344f9e56b25 /src/net/manaserv/chathandler.cpp
parent5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e (diff)
downloadmana-a4640305fd0d88c6332112712aa69e496368e01b.tar.gz
mana-a4640305fd0d88c6332112712aa69e496368e01b.tar.bz2
mana-a4640305fd0d88c6332112712aa69e496368e01b.tar.xz
mana-a4640305fd0d88c6332112712aa69e496368e01b.zip
Replace Event names with enums instead of strings
Diffstat (limited to 'src/net/manaserv/chathandler.cpp')
-rw-r--r--src/net/manaserv/chathandler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net/manaserv/chathandler.cpp b/src/net/manaserv/chathandler.cpp
index 70910cf6..db0e1084 100644
--- a/src/net/manaserv/chathandler.cpp
+++ b/src/net/manaserv/chathandler.cpp
@@ -163,7 +163,7 @@ void ChatHandler::handleGameChatMessage(Net::MessageIn &msg)
else
mes = "Unknown : " + chatMsg;
- Mana::Event event(being == player_node ? "Player" : "Being");
+ Mana::Event event(being == player_node ? EVENT_PLAYER : EVENT_BEING);
event.setString("message", mes);
event.setString("text", chatMsg);
event.setString("nick", being->getName());
@@ -231,7 +231,7 @@ void ChatHandler::handlePrivateMessage(Net::MessageIn &msg)
std::string userNick = msg.readString();
std::string chatMsg = msg.readString();
- Mana::Event event("Whisper");
+ Mana::Event event(EVENT_WHISPER);
event.setString("nick", userNick);
event.setString("message", chatMsg);
event.trigger(CHANNEL_CHAT);
@@ -240,7 +240,7 @@ void ChatHandler::handlePrivateMessage(Net::MessageIn &msg)
void ChatHandler::handleAnnouncement(Net::MessageIn &msg)
{
std::string chatMsg = msg.readString();
- Mana::Event event("Announcement");
+ Mana::Event event(EVENT_ANNOUNCEMENT);
event.setString("message", chatMsg);
event.trigger(CHANNEL_CHAT);
}