summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-13 22:25:26 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-13 22:25:26 +0300
commit1202cf04c667c72fb30bd01608585283b9cc1914 (patch)
treef48627e3269cbde16d08d8ac37359647141f6e59 /plugins/Scriver
parent25c7aab043ce803362898d211319ebac4474af4e (diff)
chat engine:
- fixes #1174 (Group chat icons became "blank exe" icons if role cound exceeds 10); - unused chat api members removed;
Diffstat (limited to 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/chat_manager.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/plugins/Scriver/src/chat_manager.cpp b/plugins/Scriver/src/chat_manager.cpp
index 0995b28b74..0bfadfeb7e 100644
--- a/plugins/Scriver/src/chat_manager.cpp
+++ b/plugins/Scriver/src/chat_manager.cpp
@@ -52,23 +52,14 @@ char SM_GetStatusIndicator(SESSION_INFO *si, USERINFO *ui)
STATUSINFO *ti = pci->TM_FindStatus(si->pStatuses, pci->TM_WordToString(si->pStatuses, ui->Status));
if (ti) {
- if ((INT_PTR)ti->hIcon < STATUSICONCOUNT) {
- INT_PTR id = si->iStatusCount - (INT_PTR)ti->hIcon - 1;
- if (id == 0)
- return '\0';
- if (id == 1)
- return '+';
- if (id == 2)
- return '%';
- if (id == 3)
- return '@';
- if (id == 4)
- return '!';
- if (id == 5)
- return '*';
+ switch (si->iStatusCount - ti->iIconIndex - 1) {
+ case 0: return '\0';
+ case 1: return '+';
+ case 2: return '%';
+ case 3: return '@';
+ case 4: return '!';
+ case 5: return '*';
}
- else
- return '\0';
}
return '\0';
}