summaryrefslogtreecommitdiff
path: root/stopspam_mod/trunk/utilities.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2009-10-01 05:18:46 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2009-10-01 05:18:46 +0300
commit298b3e189486938208a4bf7d15d3aa1b841ef652 (patch)
tree1b8c4873613b181647c29b7efa8002b0c6975c6c /stopspam_mod/trunk/utilities.cpp
parent5f68bd0ddfd9578e00d0dba2b64c6db1f405bbc8 (diff)
+ option to case insensitive answer checking
+ option to disable question in invisible mode small options dialog redesign
Diffstat (limited to 'stopspam_mod/trunk/utilities.cpp')
-rw-r--r--stopspam_mod/trunk/utilities.cpp18
1 files changed, 16 insertions, 2 deletions
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);
+}