|
|
|
@ -45,9 +45,6 @@ extern CGenericXmlMsgHeaderManager GenericXmlMsgHeaderMngr;
|
|
|
|
|
|
|
|
|
|
extern CVariable<bool> VerboseChatManagement;
|
|
|
|
|
|
|
|
|
|
typedef NLMISC::CTwinMap<TChanID, string> TChanTwinMap;
|
|
|
|
|
extern TChanTwinMap _ChanNames;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------
|
|
|
|
|
// cbImpulsionReadyString :
|
|
|
|
@ -1587,26 +1584,15 @@ void cbDynChatAddChan(CMessage& msgin, const string &serviceName, TServiceId ser
|
|
|
|
|
bool noBroadcast;
|
|
|
|
|
bool forwardInput;
|
|
|
|
|
bool unify;
|
|
|
|
|
string name;
|
|
|
|
|
|
|
|
|
|
msgin.serial(chanID);
|
|
|
|
|
msgin.serial(noBroadcast);
|
|
|
|
|
msgin.serial(forwardInput);
|
|
|
|
|
msgin.serial(unify);
|
|
|
|
|
msgin.serial(name);
|
|
|
|
|
|
|
|
|
|
nlinfo("cbDynChatAddChan: add channel : %s", name.c_str());
|
|
|
|
|
nlinfo("cbDynChatAddChan: add channel");
|
|
|
|
|
bool res = IOS->getChatManager().getDynChat().addChan(chanID, noBroadcast, forwardInput, unify);
|
|
|
|
|
if (!res)
|
|
|
|
|
nlwarning("Couldn't add chan %s", chanID.toString().c_str());
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (_ChanNames.getA(name) == NULL && _ChanNames.getB(chanID) == NULL)
|
|
|
|
|
_ChanNames.add(chanID, name);
|
|
|
|
|
else
|
|
|
|
|
nlwarning("Couldn't add chan %s. already added! %p %p", chanID.toString().c_str(), _ChanNames.getA(name), _ChanNames.getB(chanID));
|
|
|
|
|
nlinfo("cbDynChatAddChan: add channel %s",chanID.toString().c_str());
|
|
|
|
|
}
|
|
|
|
|
if (!res) nlwarning("Couldn't add chan %s", chanID.toString().c_str());
|
|
|
|
|
else nlinfo("cbDynChatAddChan: add channel %s",chanID.toString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------
|
|
|
|
@ -1816,23 +1802,7 @@ void cbDynChatSetHideBubble(CMessage& msgin, const string &serviceName, TService
|
|
|
|
|
chan->HideBubble = hideBubble;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void cbDynChatSetUniversalChannel(CMessage& msgin, const string &serviceName, TServiceId serviceId)
|
|
|
|
|
{
|
|
|
|
|
TChanID chanID;
|
|
|
|
|
bool universalChannel;
|
|
|
|
|
|
|
|
|
|
msgin.serial(chanID);
|
|
|
|
|
msgin.serial(universalChannel);
|
|
|
|
|
|
|
|
|
|
CChatManager &cm = IOS->getChatManager();
|
|
|
|
|
CDynChatChan *chan = cm.getDynChat().getChan(chanID);
|
|
|
|
|
if (!chan)
|
|
|
|
|
{
|
|
|
|
|
nlwarning("Unknown chan");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
chan->UniversalChannel = universalChannel;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void cbDynChatServiceChat(CMessage& msgin, const string &serviceName, TServiceId serviceId)
|
|
|
|
|
{
|
|
|
|
@ -2102,7 +2072,6 @@ TUnifiedCallbackItem CbIOSArray[]=
|
|
|
|
|
{ "DYN_CHAT:SERVICE_CHAT", cbDynChatServiceChat }, // a service send a chat message in the channel without sender id
|
|
|
|
|
{ "DYN_CHAT:SERVICE_TELL", cbDynChatServiceTell }, // a service send a chat message to a specific client in the channel without sender id
|
|
|
|
|
{ "DYN_CHAT:SET_HIDE_BUBBLE", cbDynChatSetHideBubble }, // a service send a chat message to a specific client in the channel without sender id
|
|
|
|
|
{ "DYN_CHAT:SET_UNIVERSAL_CHANNEL", cbDynChatSetUniversalChannel },
|
|
|
|
|
//received from DSS
|
|
|
|
|
{ "REQUEST_DSR", cbRequestDsr},
|
|
|
|
|
// { "ADD_DM", cbAddDM }, // A character enter a ring session that he own
|
|
|
|
|