mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Will be redoing the event interface for subscriptions, some work for the wi and crash fixes
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#include "event_sub.h"
|
||||
#include <string.h>
|
||||
|
||||
void EventSubscriptionWatcher::Subscribe(const std::string &event_name)
|
||||
{
|
||||
m_subs[event_name] = 1;
|
||||
}
|
||||
|
||||
void EventSubscriptionWatcher::Unsubscribe(const std::string &event_name)
|
||||
{
|
||||
m_subs[event_name] = 0;
|
||||
}
|
||||
|
||||
bool EventSubscriptionWatcher::IsSubscribed(const std::string &event_name) const
|
||||
{
|
||||
auto iter = m_subs.find(event_name);
|
||||
if (iter != m_subs.end()) {
|
||||
return iter->second;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user