Quantcast

fixed missing =

Ben Phelps [05-21-13 - 04:07]
fixed missing =
Filename
SimpleSpam.lua
diff --git a/SimpleSpam.lua b/SimpleSpam.lua
index d64088a..547a581 100755
--- a/SimpleSpam.lua
+++ b/SimpleSpam.lua
@@ -1,7 +1,9 @@
 -- Change this if your language uses a lot of accented letters
 SSAccentScore = 0.5

-SS = {}
+SS = {
+  lastMsg = ''
+}

 SSBlocked = {

@@ -15,7 +17,6 @@ SSLastMessages = {

 }

-
 -- these are always spam, 100% of the time
 SS.blackList = {
 	"$%d+.+%d+g", -- mwatches $9.99
@@ -131,12 +132,18 @@ end

 function SS.SimpleSpam(self, event, msg, ...)

+  if SS.lastMsg == msg then
+    return false
+  end
+
 	local matchCount = 0
   local msgOrig = msg
   local sender = select(4,...)
   local line = select(10,...)
   local reason = false

+  SS.lastMsg = msg
+
   msg = strlower(msg)

   -- no double spam