summaryrefslogtreecommitdiff
path: root/plugins/TipperYM/src/subst.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-12-13 13:35:19 +0000
committerRobert Pösel <robyer@seznam.cz>2013-12-13 13:35:19 +0000
commitab06f83a076ece3aba4a47a107203829b11974db (patch)
tree4d4f53fe0745e78d715f773825d430374f026b90 /plugins/TipperYM/src/subst.cpp
parent7a63748295ddd657ef3fc1e1c17a6f15b424ede3 (diff)
Tipper: new option for items to show only for particular type of contacts (all, contacts, chatrooms); version bump
Useful for not showing last seen or status fields for chatrooms. git-svn-id: http://svn.miranda-ng.org/main/trunk@7174 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TipperYM/src/subst.cpp')
-rw-r--r--plugins/TipperYM/src/subst.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp
index 36dadd8b6d..6fdf551015 100644
--- a/plugins/TipperYM/src/subst.cpp
+++ b/plugins/TipperYM/src/subst.cpp
@@ -63,6 +63,22 @@ bool DBGetContactSettingAsString(HANDLE hContact, const char *szModuleName, cons
return buff[0] ? true : false;
}
+bool CheckContactType(HANDLE hContact, const DISPLAYITEM &di)
+{
+ if (di.type == DIT_ALL)
+ return true;
+
+ char *szProto = GetContactProto(hContact);
+ if (szProto) {
+ if (db_get_b(hContact, szProto, "ChatRoom", 0) != 0)
+ return di.type == DIT_CHATS;
+ else
+ return di.type == DIT_CONTACTS;
+ }
+
+ return false;
+}
+
void StripBBCodesInPlace(TCHAR *swzText)
{
if (!db_get_b(0, MODULE, "StripBBCodes", 1))