From 535b7733c38c9e4c75a8ff73f231c8b807194124 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Sun, 9 Mar 2014 17:45:14 +0000 Subject: minor cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@8514 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/generic_msghandlers.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'plugins/TabSRMM/src/generic_msghandlers.cpp') diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index decc0c712d..3c5fa197b0 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -1316,17 +1316,13 @@ LRESULT TSAPI DM_ThemeChanged(TWindowData *dat) */ void TSAPI DM_NotifyTyping(TWindowData *dat, int mode) { - DWORD protoStatus; - DWORD protoCaps; - DWORD typeCaps; - const char *szProto = 0; - MCONTACT hContact = 0; - if (!dat || !dat->hContact) return; DeletePopupsForContact(dat->hContact, PU_REMOVE_ON_TYPE); + const char *szProto = 0; + MCONTACT hContact = 0; if (dat->bIsMeta){ szProto = dat->cache->getActiveProto(); hContact = dat->cache->getActiveContact(); @@ -1354,12 +1350,11 @@ void TSAPI DM_NotifyTyping(TWindowData *dat, int mode) /* * check status and capabilities of the protocol */ - protoStatus = CallProtoService(szProto, PS_GETSTATUS, 0, 0); - protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0); - typeCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0); - + DWORD typeCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0); if (!(typeCaps & PF4_SUPPORTTYPING)) return; + + DWORD protoStatus = CallProtoService(szProto, PS_GETSTATUS, 0, 0); if (protoStatus < ID_STATUS_ONLINE) return; @@ -1367,6 +1362,7 @@ void TSAPI DM_NotifyTyping(TWindowData *dat, int mode) * check visibility/invisibility lists to not "accidentially" send MTN to contacts who * should not see them (privacy issue) */ + DWORD protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0); if (protoCaps & PF1_VISLIST && db_get_w(hContact, szProto, "ApparentMode", 0) == ID_STATUS_OFFLINE) return; -- cgit v1.2.3