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:
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user