1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-22 02:46:38 +02:00

scripts: auto-load scripts with supported extensions only (closes #1698)

This commit is contained in:
Sébastien Helleu
2022-02-20 16:29:31 +01:00
parent 601bd7e0b8
commit 8700e0bb36
9 changed files with 41 additions and 8 deletions
+5 -1
View File
@@ -1053,10 +1053,14 @@ weechat_python_load (const char *filename, const char *code)
void
weechat_python_load_cb (void *data, const char *filename)
{
const char *pos_dot;
/* make C compiler happy */
(void) data;
weechat_python_load (filename, NULL);
pos_dot = strrchr (filename, '.');
if (pos_dot && (strcmp (pos_dot, ".py") == 0))
weechat_python_load (filename, NULL);
}
/*