diff options
Diffstat (limited to 'stopspam_mod/trunk/utilities.cpp')
-rw-r--r-- | stopspam_mod/trunk/utilities.cpp | 18 |
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);
+}
|