summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-05-04 18:05:48 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-05-04 18:05:48 +0300
commit9b76086084dcba0ef24ea2b0a94f438127f9eff5 (patch)
treeb5aa37cfe6df27a13367cc9c5dd1b2a1a8a0e3a0 /src/mir_app
parent7e1ecf7d6f1006e6e74c5c726cd873032948a141 (diff)
fixes #4399 (Discord: показывать, кто пригласил или выгнал участника)
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/chat_svc.cpp37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp
index 1d50558150..1368e9761c 100644
--- a/src/mir_app/src/chat_svc.cpp
+++ b/src/mir_app/src/chat_svc.cpp
@@ -538,30 +538,29 @@ static BOOL HandleChatEvent(GCEVENT &gce, int bManyFix)
}
// add to log
- if (gce.dwFlags & GCEF_SILENT)
- return 0;
-
- // fix for IRC's old style mode notifications. Should not affect any other protocol
- if ((gce.iType == GC_EVENT_ADDSTATUS || gce.iType == GC_EVENT_REMOVESTATUS) && !(gce.dwFlags & GCEF_ADDTOLOG))
- return 0;
+ if (!(gce.dwFlags & GCEF_SILENT)) {
+ // fix for IRC's old style mode notifications. Should not affect any other protocol
+ if ((gce.iType == GC_EVENT_ADDSTATUS || gce.iType == GC_EVENT_REMOVESTATUS) && !(gce.dwFlags & GCEF_ADDTOLOG))
+ return 0;
- if (gce.iType == GC_EVENT_JOIN && gce.time == 0)
- return 0;
+ if (gce.iType == GC_EVENT_JOIN && gce.time == 0)
+ return 0;
- if (si && (si->bInitDone || gce.iType == GC_EVENT_TOPIC || (gce.iType == GC_EVENT_JOIN && gce.bIsMe))) {
- if (gce.pszNick.w == nullptr && gce.pszUID.w != nullptr)
- if (USERINFO *ui = g_chatApi.UM_FindUser(si, gce.pszUID.w))
- gce.pszNick.w = ui->pszNick;
+ if (si && (si->bInitDone || gce.iType == GC_EVENT_TOPIC || (gce.iType == GC_EVENT_JOIN && gce.bIsMe))) {
+ if (gce.pszNick.w == nullptr && gce.pszUID.w != nullptr)
+ if (USERINFO *ui = g_chatApi.UM_FindUser(si, gce.pszUID.w))
+ gce.pszNick.w = ui->pszNick;
- if (auto *lin = SM_AddEvent(si, &gce, bIsHighlighted))
- if (si->pDlg)
- si->pDlg->AddLog(*lin);
+ if (auto *lin = SM_AddEvent(si, &gce, bIsHighlighted))
+ if (si->pDlg)
+ si->pDlg->AddLog(*lin);
- if (!(gce.dwFlags & GCEF_NOTNOTIFY))
- g_chatApi.DoSoundsFlashPopupTrayStuff(si, &gce, bIsHighlighted, bManyFix);
+ if (!(gce.dwFlags & GCEF_NOTNOTIFY))
+ g_chatApi.DoSoundsFlashPopupTrayStuff(si, &gce, bIsHighlighted, bManyFix);
- if ((gce.dwFlags & GCEF_ADDTOLOG) && g_Settings->bLoggingEnabled)
- LogToFile(si, &gce);
+ if ((gce.dwFlags & GCEF_ADDTOLOG) && g_Settings->bLoggingEnabled)
+ LogToFile(si, &gce);
+ }
}
if (bRemoveFlag)