updated stuff.

This commit is contained in:
Brad Arant committed 2023-02-07 20:07:12 -08:00
commit f1d019e1e0
160 files changed
+1148 -11436

No files matched your search

+18 -3
View File
@@ -1,6 +1,7 @@
#include "SubscriptionManager.h"
#include "Log.h"
#include "Subscription.h"
#include "TCPServer.h"
#include <algorithm>
namespace core
@@ -60,8 +61,8 @@ namespace core
{
if (request[0].equals("publish"))
{
SubscriptionHandler *handler = handlers[request[3].str()];
newSubscription = new Subscription(request[1].str(), session, request[2].str(), handler);
SubscriptionHandler *handler = handlers[request[3].str()];
newSubscription = new Subscription(request[1].str(), session, request[2].str(), handler);
subscriptions.insert(std::make_pair(request[1].str(), newSubscription));
return 1;
@@ -77,7 +78,19 @@ namespace core
session.out << std::endl;
return 1;
}
else if (request[0].equals("invite"))
{
std::stringstream out;
coreutils::Log(coreutils::LOG_DEBUG_1) << request[2];
std::string invitee = request[2].str();
TCPSession *tempSession = session.server.getSessionByAlias(&invitee);
std::stringstream temp;
// We need to utilize invite for different ways, group with people,and to generally invite into anything pertaining interaction////
/// with another player//
temp << "invite:" << request[1] << ":" << *(std::string *)session.alias;
tempSession->write(temp.str());
return 1;
}
auto subscription = subscriptions[request[1].str()];
if (request[1].equals(subscription->id))
@@ -96,6 +109,7 @@ namespace core
subscription->unsubscribe(session);
return 1;
}
else if (request[0].equals("event"))
{
std::stringstream out;
@@ -113,6 +127,7 @@ namespace core
return 1;
}
}
else if (subscription->mode == "*AUTHOR")
{
if (subscription->owner == &session)