diff options
author | dartraiden <wowemuh@gmail.com> | 2019-07-21 19:59:18 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2019-07-21 19:59:18 +0300 |
commit | b078dfb78c89aea87cd422eae52694738e473cf3 (patch) | |
tree | ca896e82a8a5ce81f80d041f4aee7fdeeb007162 /protocols/IRCG | |
parent | ee7e29d02e94e969c1154515cd0c408c591a2414 (diff) |
Restore "Free for chat" status support (fixes #1963)
Diffstat (limited to 'protocols/IRCG')
-rw-r--r-- | protocols/IRCG/src/commandmonitor.cpp | 1 | ||||
-rw-r--r-- | protocols/IRCG/src/ircproto.cpp | 6 | ||||
-rw-r--r-- | protocols/IRCG/src/options.cpp | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 9f3e6cd526..448336e3c9 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -2349,6 +2349,7 @@ bool CIrcProto::DoOnConnect(const CIrcMessage*) if (IsConnected()) {
DoPerform(_T2A(m_info.sNetwork));
switch (Temp) {
+ case ID_STATUS_FREECHAT: DoPerform("Event: Free for chat"); break;
case ID_STATUS_ONLINE: DoPerform("Event: Available"); break;
}
}
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 4e70654649..d05c5a5027 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -721,12 +721,12 @@ int CIrcProto::SetStatusInternal(int iNewStatus, bool bIsInternal) if (!bIsInternal)
m_iDesiredStatus = iNewStatus;
- if ((iNewStatus == ID_STATUS_ONLINE || iNewStatus == ID_STATUS_AWAY) && !IsConnected()) //go from offline to online
+ if ((iNewStatus == ID_STATUS_ONLINE || iNewStatus == ID_STATUS_AWAY || iNewStatus == ID_STATUS_FREECHAT) && !IsConnected()) //go from offline to online
{
if (!m_bConnectThreadRunning)
ConnectToServer();
}
- else if (iNewStatus == ID_STATUS_ONLINE && IsConnected() && m_iStatus == ID_STATUS_AWAY) //go to online while connected
+ else if ((iNewStatus == ID_STATUS_ONLINE || iNewStatus == ID_STATUS_FREECHAT) && IsConnected() && m_iStatus == ID_STATUS_AWAY) //go to online while connected
{
m_statusMessage = L"";
PostIrcMessage(L"/AWAY");
@@ -784,7 +784,7 @@ HANDLE CIrcProto::GetAwayMsg(MCONTACT hContact) int CIrcProto::SetAwayMsg(int status, const wchar_t* msg)
{
switch (status) {
- case ID_STATUS_ONLINE: case ID_STATUS_INVISIBLE:
+ case ID_STATUS_ONLINE: case ID_STATUS_INVISIBLE: case ID_STATUS_FREECHAT:
case ID_STATUS_CONNECTING: case ID_STATUS_OFFLINE:
break;
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index 74bdeb75bf..e289ccaeb6 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -930,6 +930,7 @@ static char* sttPerformEvents[] = { LPGEN("Event: Not available"),
LPGEN("Event: Occupied"),
LPGEN("Event: Do not disturb"),
+ LPGEN("Event: Free for chat"),
LPGEN("Event: Disconnect"),
LPGEN("ALL NETWORKS")
};
|