summaryrefslogtreecommitdiff
path: root/src/notifymanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-09 00:32:28 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-09 00:32:28 +0300
commit0aca242db52695fa0804ac180fc7961b281b422a (patch)
tree8592405060b32827d0412c25f9c5bd742eb6bd57 /src/notifymanager.cpp
parenta36ef7797d382c62f02be97976d564418029d24c (diff)
downloadmanaverse-0aca242db52695fa0804ac180fc7961b281b422a.tar.gz
manaverse-0aca242db52695fa0804ac180fc7961b281b422a.tar.bz2
manaverse-0aca242db52695fa0804ac180fc7961b281b422a.tar.xz
manaverse-0aca242db52695fa0804ac180fc7961b281b422a.zip
Add new notifications to gamehandler.
Diffstat (limited to 'src/notifymanager.cpp')
-rw-r--r--src/notifymanager.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/notifymanager.cpp b/src/notifymanager.cpp
index 616082b04..2dae7d280 100644
--- a/src/notifymanager.cpp
+++ b/src/notifymanager.cpp
@@ -30,7 +30,23 @@ namespace NotifyManager
{
if (message >= TYPE_END || !localChatTab)
return;
- localChatTab->chatLog(gettext(notifications[message].text),
- BY_SERVER);
+ const NotificationInfo &info = notifications[message];
+ if (info.flags == EMPTY)
+ {
+ localChatTab->chatLog(gettext(info.text),
+ BY_SERVER);
+ }
+ }
+
+ void notify(const unsigned int message, const int num)
+ {
+ if (message >= TYPE_END || !localChatTab)
+ return;
+ const NotificationInfo &info = notifications[message];
+ if (info.flags == INT)
+ {
+ localChatTab->chatLog(strprintf(gettext(info.text),
+ num), BY_SERVER);
+ }
}
}