From 298b3e189486938208a4bf7d15d3aa1b841ef652 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Thu, 1 Oct 2009 05:18:46 +0300 Subject: + option to case insensitive answer checking + option to disable question in invisible mode small options dialog redesign --- stopspam_mod/trunk/utilities.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'stopspam_mod/trunk/utilities.cpp') diff --git a/stopspam_mod/trunk/utilities.cpp b/stopspam_mod/trunk/utilities.cpp index bf00574..7b95337 100644 --- a/stopspam_mod/trunk/utilities.cpp +++ b/stopspam_mod/trunk/utilities.cpp @@ -123,7 +123,7 @@ int RemoveTmp(WPARAM,LPARAM) return 0; } tstring variables_parse(tstring const &tstrFormat, HANDLE hContact){ - if (ServiceExists(MS_VARS_FORMATSTRING)) { + if (gbVarsServiceExist) { FORMATINFO fi; TCHAR *tszParsed; tstring tstrResult; @@ -142,4 +142,18 @@ tstring variables_parse(tstring const &tstrFormat, HANDLE hContact){ } } return tstrFormat; -} \ No newline at end of file +} + +// case-insensitive _tcsstr +//by nullbie as i remember... +#define NEWTSTR_ALLOCA(A) (A==NULL)?NULL:_tcscpy((TCHAR*)alloca(sizeof(TCHAR)*(_tcslen(A)+1)),A) +const int stricmp(const TCHAR *str, const TCHAR *substr) +{ + TCHAR *str_up = NEWTSTR_ALLOCA(str); + TCHAR *substr_up = NEWTSTR_ALLOCA(substr); + + CharUpperBuff(str_up, lstrlen(str_up)); + CharUpperBuff(substr_up, lstrlen(substr_up)); + + return _tcscmp(str_up, substr_up); +} -- cgit v1.2.3