qpfiffer / shithouse.tv

shithouse.tv backend
Do What The F*ck You Want To Public License
6 stars 4 forks source link

FIX CONSTANT NEGATION OF EXISTENCE #17

Closed dequis closed 9 years ago

dequis commented 9 years ago

FIX CONSTANT NEGATION OF EXISTENCE

qpfiffer commented 9 years ago

What does this even do, @dequis

dequis commented 9 years ago
yYy unless not var yYy
 function filters_module.unless(text, ctext)    -- text == "not var"
-    local existence = ctext[text] ~= nil       -- ctext["not var"] == nil
     local negation = true
     text = string.gsub(text, "^not ", function() negation = false; return ""; end)
                                                -- text == "var"
+    local existence = ctext[text] ~= nil       -- ctext["var"] == "value"
qpfiffer commented 9 years ago

Thats some kooky lua right there