summaryrefslogtreecommitdiff
path: root/plugins/StatusManager
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-05-27 18:45:43 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-05-27 18:45:43 +0300
commitef1a349d88912a89a8dd20ca1dcb342b6dc9c2ff (patch)
tree78e6344d923966b7a8f1866763d6bacaf054a9e2 /plugins/StatusManager
parent189f6be24f11066a3c711b783cf98f79f703e3a5 (diff)
fixes #1963 (Remove Free for Chat, On the Phone and Out to Lunch statuses completely)
Diffstat (limited to 'plugins/StatusManager')
-rw-r--r--plugins/StatusManager/src/advancedautoaway.cpp2
-rw-r--r--plugins/StatusManager/src/commonstatus.cpp11
-rw-r--r--plugins/StatusManager/src/ss_options.cpp3
-rw-r--r--plugins/StatusManager/src/startupstatus.cpp6
4 files changed, 2 insertions, 20 deletions
diff --git a/plugins/StatusManager/src/advancedautoaway.cpp b/plugins/StatusManager/src/advancedautoaway.cpp
index aa630ccb36..39c6418a99 100644
--- a/plugins/StatusManager/src/advancedautoaway.cpp
+++ b/plugins/StatusManager/src/advancedautoaway.cpp
@@ -439,7 +439,7 @@ int LoadAutoAwaySetting(SMProto &autoAwaySetting, char *protoName)
mir_snprintf(setting, "%s_NATime", protoName);
autoAwaySetting.naTime = AAAPlugin.getWord(setting, SETTING_NATIME_DEFAULT);
mir_snprintf(setting, "%s_StatusFlags", protoName);
- autoAwaySetting.statusFlags = AAAPlugin.getWord(setting, StatusModeToProtoFlag(ID_STATUS_ONLINE) | StatusModeToProtoFlag(ID_STATUS_FREECHAT));
+ autoAwaySetting.statusFlags = AAAPlugin.getWord(setting, StatusModeToProtoFlag(ID_STATUS_ONLINE));
int flags;
if (g_bAAASettingSame)
diff --git a/plugins/StatusManager/src/commonstatus.cpp b/plugins/StatusManager/src/commonstatus.cpp
index d513d87208..365ce16081 100644
--- a/plugins/StatusManager/src/commonstatus.cpp
+++ b/plugins/StatusManager/src/commonstatus.cpp
@@ -29,10 +29,7 @@ StatusModeMap statusModes[MAX_STATUS_COUNT] =
{ ID_STATUS_NA, PF2_LONGAWAY },
{ ID_STATUS_OCCUPIED, PF2_LIGHTDND },
{ ID_STATUS_DND, PF2_HEAVYDND },
- { ID_STATUS_FREECHAT, PF2_FREECHAT },
{ ID_STATUS_INVISIBLE, PF2_INVISIBLE },
- { ID_STATUS_ONTHEPHONE, PF2_ONTHEPHONE },
- { ID_STATUS_OUTTOLUNCH, PF2_OUTTOLUNCH }
};
// handles for hooks and other Miranda thingies
@@ -90,12 +87,9 @@ char* StatusModeToDbSetting(int status, const char *suffix)
case ID_STATUS_NA: prefix = "Na"; break;
case ID_STATUS_DND: prefix = "Dnd"; break;
case ID_STATUS_OCCUPIED: prefix = "Occupied"; break;
- case ID_STATUS_FREECHAT: prefix = "FreeChat"; break;
case ID_STATUS_ONLINE: prefix = "On"; break;
case ID_STATUS_OFFLINE: prefix = "Off"; break;
case ID_STATUS_INVISIBLE: prefix = "Inv"; break;
- case ID_STATUS_ONTHEPHONE: prefix = "Otp"; break;
- case ID_STATUS_OUTTOLUNCH: prefix = "Otl"; break;
default: return nullptr;
}
mir_strcpy(str, prefix); mir_strcat(str, suffix);
@@ -109,13 +103,10 @@ DWORD StatusModeToProtoFlag(int status)
case ID_STATUS_ONLINE: return PF2_ONLINE;
case ID_STATUS_OFFLINE: return PF2_OFFLINE;
case ID_STATUS_INVISIBLE: return PF2_INVISIBLE;
- case ID_STATUS_OUTTOLUNCH: return PF2_OUTTOLUNCH;
- case ID_STATUS_ONTHEPHONE: return PF2_ONTHEPHONE;
case ID_STATUS_AWAY: return PF2_SHORTAWAY;
case ID_STATUS_NA: return PF2_LONGAWAY;
case ID_STATUS_OCCUPIED: return PF2_LIGHTDND;
case ID_STATUS_DND: return PF2_HEAVYDND;
- case ID_STATUS_FREECHAT: return PF2_FREECHAT;
}
return 0;
}
@@ -132,7 +123,7 @@ int GetActualStatus(PROTOCOLSETTINGEX *protoSetting)
if (protoSetting->m_status == ID_STATUS_CURRENT)
return Proto_GetStatus(protoSetting->m_szName);
- if ((protoSetting->m_status < ID_STATUS_OFFLINE) || (protoSetting->m_status > ID_STATUS_OUTTOLUNCH)) {
+ if ((protoSetting->m_status < ID_STATUS_OFFLINE) || (protoSetting->m_status > ID_STATUS_MAX)) {
log_debug(0, "invalid status detected: %d", protoSetting->m_status);
return 0;
}
diff --git a/plugins/StatusManager/src/ss_options.cpp b/plugins/StatusManager/src/ss_options.cpp
index 2c5cdccd48..b9b903eaf7 100644
--- a/plugins/StatusManager/src/ss_options.cpp
+++ b/plugins/StatusManager/src/ss_options.cpp
@@ -36,12 +36,9 @@ static char* GetStatusDesc(int status)
case ID_STATUS_NA: return "na";
case ID_STATUS_DND: return "dnd";
case ID_STATUS_OCCUPIED: return "occupied";
- case ID_STATUS_FREECHAT: return "freechat";
case ID_STATUS_ONLINE: return "online";
case ID_STATUS_OFFLINE: return "offline";
case ID_STATUS_INVISIBLE: return "invisible";
- case ID_STATUS_ONTHEPHONE: return "onthephone";
- case ID_STATUS_OUTTOLUNCH: return "outtolunch";
case ID_STATUS_LAST: return "last";
}
return "offline";
diff --git a/plugins/StatusManager/src/startupstatus.cpp b/plugins/StatusManager/src/startupstatus.cpp
index 45075ebf3a..bbca4a5843 100644
--- a/plugins/StatusManager/src/startupstatus.cpp
+++ b/plugins/StatusManager/src/startupstatus.cpp
@@ -54,18 +54,12 @@ static int IsValidStatusDesc(char* statusDesc)
return ID_STATUS_DND;
if (!strncmp("occupied", statusDesc, 8))
return ID_STATUS_OCCUPIED;
- if (!strncmp("freechat", statusDesc, 8))
- return ID_STATUS_FREECHAT;
if (!strncmp("online", statusDesc, 6))
return ID_STATUS_ONLINE;
if (!strncmp("offline", statusDesc, 7))
return ID_STATUS_OFFLINE;
if (!strncmp("invisible", statusDesc, 9))
return ID_STATUS_INVISIBLE;
- if (!strncmp("onthephone", statusDesc, 10))
- return ID_STATUS_ONTHEPHONE;
- if (!strncmp("outtolunch", statusDesc, 10))
- return ID_STATUS_OUTTOLUNCH;
if (!strncmp("last", statusDesc, 4))
return ID_STATUS_LAST;