mirror of
https://github.com/weechat/weechat.git
synced 2026-06-24 20:06:38 +02:00
scripts: auto-load scripts with supported extensions only (closes #1698)
This commit is contained in:
@@ -417,10 +417,14 @@ weechat_js_load (const char *filename, const char *code)
|
||||
void
|
||||
weechat_js_load_cb (void *data, const char *filename)
|
||||
{
|
||||
const char *pos_dot;
|
||||
|
||||
/* make C++ compiler happy */
|
||||
(void) data;
|
||||
|
||||
weechat_js_load (filename, NULL);
|
||||
pos_dot = strrchr (filename, '.');
|
||||
if (pos_dot && (strcmp (pos_dot, ".js") == 0))
|
||||
weechat_js_load (filename, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user