]> source.dussan.org Git - rspamd.git/commitdiff
[Feature] Allow plugins to publish their lua API via rspamd_plugins
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 6 Sep 2016 15:14:34 +0000 (16:14 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 6 Sep 2016 15:14:34 +0000 (16:14 +0100)
src/lua/lua_common.c

index 310db5fa9900d0e10a6da249ba36f2ded59b9662..84110d06a3b936de5ae881caaba721f199c04ce6 100644 (file)
@@ -279,6 +279,10 @@ rspamd_lua_init ()
                                lua_tostring (L, -1));
        }
 
+       /* Add plugins global */
+       lua_newtable (L);
+       lua_setglobal (L, "rspamd_plugins");
+
        return L;
 }