Resolved a conflict between the Yahoo protocol and MSN that was causing both protocols to do not work, removed some annoying error message notifications that are not valid with Caya. Actually, the idea is to reduce the use of pop-up window in favor of notifications.
This commit is contained in:
parent
5cf285f588
commit
aa93e9ad96
|
@ -307,9 +307,9 @@ MSNP::Process(BMessage* msg)
|
||||||
if (fLogged) {
|
if (fLogged) {
|
||||||
fMainConnection->setState(MSN::STATUS_AVAILABLE, fClientID);
|
fMainConnection->setState(MSN::STATUS_AVAILABLE, fClientID);
|
||||||
} else if (fSettings) {
|
} else if (fSettings) {
|
||||||
if (fMainConnection != NULL) {
|
if (fMainConnection != NULL)
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
if (fUsername == "")
|
if (fUsername == "")
|
||||||
Error("Empty Username!", NULL);
|
Error("Empty Username!", NULL);
|
||||||
if (fPassword == "")
|
if (fPassword == "")
|
||||||
|
@ -333,21 +333,15 @@ MSNP::Process(BMessage* msg)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CAYA_AWAY:
|
case CAYA_AWAY:
|
||||||
if (fLogged) {
|
if (fLogged)
|
||||||
fMainConnection->setState(MSN::STATUS_AWAY, fClientID);
|
fMainConnection->setState(MSN::STATUS_AWAY, fClientID);
|
||||||
} else {
|
|
||||||
Error("MSN Protocol: You are not logged!", NULL);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case CAYA_EXTENDED_AWAY:
|
case CAYA_EXTENDED_AWAY:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case CAYA_DO_NOT_DISTURB:
|
case CAYA_DO_NOT_DISTURB:
|
||||||
if (fLogged) {
|
if (fLogged)
|
||||||
fMainConnection->setState(MSN::STATUS_IDLE, fClientID);
|
fMainConnection->setState(MSN::STATUS_IDLE, fClientID);
|
||||||
} else {
|
|
||||||
Error("MSN Protocol: You are not logged!", NULL);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CAYA_OFFLINE:
|
case CAYA_OFFLINE:
|
||||||
|
@ -397,7 +391,6 @@ MSNP::Process(BMessage* msg)
|
||||||
nouveau = false;
|
nouveau = false;
|
||||||
y = x;
|
y = x;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
delete fSwitchboardList.ItemAt(x)->second;
|
delete fSwitchboardList.ItemAt(x)->second;
|
||||||
fSwitchboardList.RemoveItemAt(x);
|
fSwitchboardList.RemoveItemAt(x);
|
||||||
}
|
}
|
||||||
|
|
|
@ -415,18 +415,23 @@ Yahoo::LoggedOut()
|
||||||
{
|
{
|
||||||
LOG("Yahoo::LoggedOut()\n");
|
LOG("Yahoo::LoggedOut()\n");
|
||||||
|
|
||||||
|
/*
|
||||||
|
That portion was causing conflicts with other protocols
|
||||||
|
don't enable unless you know what you are doing.
|
||||||
|
|
||||||
BMessage msg(IM_MESSAGE);
|
BMessage msg(IM_MESSAGE);
|
||||||
msg.AddInt32("im_what", IM_OWN_STATUS_SET);
|
msg.AddInt32("im_what", IM_OWN_STATUS_SET);
|
||||||
msg.AddString("protocol", kProtocolSignature);
|
msg.AddString("protocol", kProtocolSignature);
|
||||||
msg.AddInt32("status", CAYA_OFFLINE);
|
msg.AddInt32("status", CAYA_OFFLINE);
|
||||||
|
|
||||||
fServerMsgr->SendMessage(&msg);
|
fServerMsgr->SendMessage(&msg);*/
|
||||||
|
|
||||||
if (fYahoo) {
|
if (fYahoo) {
|
||||||
YahooConnection * oldYahoo = fYahoo;
|
YahooConnection * oldYahoo = fYahoo;
|
||||||
fYahoo = NULL;
|
fYahoo = NULL;
|
||||||
delete oldYahoo;
|
delete oldYahoo;
|
||||||
}
|
}
|
||||||
|
|
||||||
BString content(fYahooID);
|
BString content(fYahooID);
|
||||||
content << " has logged out!";
|
content << " has logged out!";
|
||||||
_Notify(B_INFORMATION_NOTIFICATION, "Disconnected",
|
_Notify(B_INFORMATION_NOTIFICATION, "Disconnected",
|
||||||
|
|
|
@ -71,7 +71,7 @@ void
|
||||||
YahooConnection::SetAway(enum yahoo_status state, const char *msg)
|
YahooConnection::SetAway(enum yahoo_status state, const char *msg)
|
||||||
{
|
{
|
||||||
if (fStatus == YAHOO_STATUS_OFFLINE) {
|
if (fStatus == YAHOO_STATUS_OFFLINE) {
|
||||||
fManager->Error("Calling SetAway() when offline", NULL);
|
// fManager->Error("Calling SetAway() when offline", NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
yahoo_set_away(fID, state, msg, 1);
|
yahoo_set_away(fID, state, msg, 1);
|
||||||
|
@ -100,7 +100,7 @@ void
|
||||||
YahooConnection::Message(const char* who, const char* msg)
|
YahooConnection::Message(const char* who, const char* msg)
|
||||||
{
|
{
|
||||||
if (fStatus == YAHOO_STATUS_OFFLINE) {
|
if (fStatus == YAHOO_STATUS_OFFLINE) {
|
||||||
fManager->Error( "Can't send message, not connected", who );
|
fManager->Error("Can't send message, not connected", who );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ŝarĝante…
Reference in New Issue