summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-06-19 12:57:29 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-06-19 12:57:29 +0300
commit185ebd42c6f6364a615d8fe09d060c713ec10b46 (patch)
tree6d489fb61d3fd43f7ce7f6baad5a89661af0136b /plugins/Scriver/src
parente503f800768d5d794ca033a89f92e5b21d7eeee3 (diff)
useless helper removed
Diffstat (limited to 'plugins/Scriver/src')
-rw-r--r--plugins/Scriver/src/msgdialog.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index c35b779569..ba50c46a25 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -873,7 +873,7 @@ LRESULT CMsgDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam)
if (wParam == VK_RETURN) {
int index = m_nickList.SendMsg(LB_GETCURSEL, 0, 0);
if (index != LB_ERR) {
- USERINFO *ui = g_chatApi.SM_GetUserFromIndex(m_si->ptszID, m_si->pszModule, index);
+ USERINFO *ui = g_chatApi.UM_FindUserFromIndex(m_si, index);
Chat_DoEventHook(m_si, GC_USER_PRIVMESS, ui, nullptr, 0);
}
break;
@@ -912,8 +912,7 @@ LRESULT CMsgDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam)
// string we have
int iItems = m_nickList.SendMsg(LB_GETCOUNT, 0, 0);
for (int i = 0; i < iItems; i++) {
- USERINFO *ui = g_chatApi.UM_FindUserFromIndex(m_si, i);
- if (ui) {
+ if (USERINFO *ui = g_chatApi.UM_FindUserFromIndex(m_si, i)) {
if (!wcsnicmp(ui->pszNick, m_wszSearch, mir_wstrlen(m_wszSearch))) {
m_nickList.SendMsg(LB_SETCURSEL, i, 0);
InvalidateRect(m_nickList.GetHwnd(), nullptr, FALSE);