diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-09-23 14:43:17 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-09-23 14:43:17 +0100 |
commit | aa48187ea95581dbe1082b2ffcab7a4dc0345a21 (patch) | |
tree | 0c8265d2379a912b65463d21207be5b15478a8d0 /src/lua | |
parent | ffa32bb64d0fc7bb1bc7f5087927fbc7ccf30651 (diff) | |
download | rspamd-aa48187ea95581dbe1082b2ffcab7a4dc0345a21.tar.gz rspamd-aa48187ea95581dbe1082b2ffcab7a4dc0345a21.zip |
[Feature] More metatokens
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/lua_mimepart.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lua/lua_mimepart.c b/src/lua/lua_mimepart.c index 012520553..28ef57f6a 100644 --- a/src/lua/lua_mimepart.c +++ b/src/lua/lua_mimepart.c @@ -754,7 +754,7 @@ lua_textpart_get_stats (lua_State * L) struct rspamd_mime_text_part *part = lua_check_textpart (L); if (part != NULL) { - lua_createtable (L, 0, 7); + lua_createtable (L, 0, 9); lua_pushstring (L, "lines"); lua_pushnumber (L, part->nlines); @@ -777,6 +777,12 @@ lua_textpart_get_stats (lua_State * L) lua_pushstring (L, "non_ascii_characters"); lua_pushnumber (L, part->non_ascii_chars); lua_settable (L, -3); + lua_pushstring (L, "capital_letters"); + lua_pushnumber (L, part->capital_letters); + lua_settable (L, -3); + lua_pushstring (L, "numeric_characters"); + lua_pushnumber (L, part->numeric_characters); + lua_settable (L, -3); } else { return luaL_error (L, "invalid arguments"); |