summaryrefslogtreecommitdiff
path: root/plugins/StopSpamMod/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 20:31:39 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 20:31:39 +0300
commitcddcd7483a7c472598af098e759e5d309024f606 (patch)
treeb0a227d6e087c41958cc84d27bc323353248aae5 /plugins/StopSpamMod/src
parent1039b2829a264280493ba0fa979214fe024dc70c (diff)
DWORD -> uint32_t
Diffstat (limited to 'plugins/StopSpamMod/src')
-rwxr-xr-xplugins/StopSpamMod/src/init.cpp2
-rwxr-xr-xplugins/StopSpamMod/src/stopspam.cpp2
-rwxr-xr-xplugins/StopSpamMod/src/stopspam.h2
-rwxr-xr-xplugins/StopSpamMod/src/utilities.cpp8
4 files changed, 7 insertions, 7 deletions
diff --git a/plugins/StopSpamMod/src/init.cpp b/plugins/StopSpamMod/src/init.cpp
index 2496667941..45323d770b 100755
--- a/plugins/StopSpamMod/src/init.cpp
+++ b/plugins/StopSpamMod/src/init.cpp
@@ -24,7 +24,7 @@ HANDLE hEventFilter = nullptr, hOptInitialise = nullptr, hSettingChanged = nullp
BOOL gbDosServiceExist = 0;
BOOL gbVarsServiceExist = 0;
-DWORD gbMaxQuestCount = 5;
+uint32_t gbMaxQuestCount = 5;
BOOL gbInfTalkProtection = 0;
BOOL gbAddPermanent = 0;
BOOL gbHandleAuthReq = 1;
diff --git a/plugins/StopSpamMod/src/stopspam.cpp b/plugins/StopSpamMod/src/stopspam.cpp
index 627536d182..a01b18ff76 100755
--- a/plugins/StopSpamMod/src/stopspam.cpp
+++ b/plugins/StopSpamMod/src/stopspam.cpp
@@ -258,7 +258,7 @@ int OnDbEventFilterAdd(WPARAM hContact, LPARAM l)
ProtoChainSend(hContact, PSS_MESSAGE, 0, ptrA(mir_utf8encodeW(q.c_str())));
// increment question count
- DWORD questCount = g_plugin.getDword(hContact, "QuestionCount");
+ uint32_t questCount = g_plugin.getDword(hContact, "QuestionCount");
g_plugin.setDword(hContact, "QuestionCount", questCount + 1);
}
else {
diff --git a/plugins/StopSpamMod/src/stopspam.h b/plugins/StopSpamMod/src/stopspam.h
index e467c4a666..6285433209 100755
--- a/plugins/StopSpamMod/src/stopspam.h
+++ b/plugins/StopSpamMod/src/stopspam.h
@@ -2,7 +2,7 @@
extern BOOL gbDosServiceExist;
extern BOOL gbVarsServiceExist;
-extern DWORD gbMaxQuestCount;
+extern uint32_t gbMaxQuestCount;
extern BOOL gbInfTalkProtection;
extern BOOL gbAddPermanent;
extern BOOL gbHandleAuthReq;
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp
index eba39ebf02..c051761ad6 100755
--- a/plugins/StopSpamMod/src/utilities.cpp
+++ b/plugins/StopSpamMod/src/utilities.cpp
@@ -130,8 +130,8 @@ wchar_t* ReqGetText(DBEVENTINFO* dbei)
if (!dbei->pBlob)
return nullptr;
- char * ptr = (char *)&dbei->pBlob[sizeof(DWORD) * 2];
- int len = dbei->cbBlob - sizeof(DWORD) * 2;
+ char * ptr = (char *)&dbei->pBlob[sizeof(uint32_t) * 2];
+ int len = dbei->cbBlob - sizeof(uint32_t) * 2;
int i = 0;
while (len && (i < 4)) {
@@ -317,8 +317,8 @@ void HistoryLog(MCONTACT hContact, char *data, int event_type, int flags)
Event.szModule = MODULENAME;
Event.eventType = event_type;
Event.flags = flags | DBEF_UTF;
- Event.timestamp = (DWORD)time(0);
- Event.cbBlob = (DWORD)mir_strlen(data) + 1;
+ Event.timestamp = (uint32_t)time(0);
+ Event.cbBlob = (uint32_t)mir_strlen(data) + 1;
Event.pBlob = (uint8_t*)_strdup(data);
db_event_add(hContact, &Event);
}