Mercurial > prosody-modules
comparison mod_anti_spam/trie.lib.lua @ 6090:8338f42d2bc5
mod_anti_spam: Tweak trie method name (fixes traceback)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sat, 28 Dec 2024 18:08:17 +0000 |
| parents | 259ffdbf8906 |
| children | 82a10e21b7f9 |
comparison
equal
deleted
inserted
replaced
| 6089:b4a4f4094337 | 6090:8338f42d2bc5 |
|---|---|
| 118 if #existing == 0 then | 118 if #existing == 0 then |
| 119 self:remove(item); | 119 self:remove(item); |
| 120 end | 120 end |
| 121 end | 121 end |
| 122 | 122 |
| 123 function trie_methods:has_ip(item) | 123 function trie_methods:contains_ip(item) |
| 124 item = item.packed; | 124 item = item.packed; |
| 125 local node = self.root; | 125 local node = self.root; |
| 126 local len = #item; | 126 local len = #item; |
| 127 for i = 1, len do | 127 for i = 1, len do |
| 128 if node.terminal then | 128 if node.terminal then |
