1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

fix: filtering of the available global plugins

For command /plugins :
Don't print files that do not correspond to the plugins design

Signed-off-by: Viachaslau Khalikin <viachaslau.vinegret@outlook.com>
This commit is contained in:
Viachaslau Khalikin 2022-09-20 01:46:51 +03:00
parent cc7231a43b
commit 0ceb8c53c3
No known key found for this signature in database
GPG Key ID: 7569457AA0318285

View File

@ -7247,6 +7247,7 @@ cmd_plugins(ProfWin* window, const char* const command, gchar** args)
const gchar* filename;
cons_show("The following Python plugins are available globally and can be installed:");
while ((filename = g_dir_read_name(global_pyp_dir))) {
if (g_str_has_suffix(filename, ".py"))
cons_show(" %s", filename);
}
}
@ -7254,6 +7255,7 @@ cmd_plugins(ProfWin* window, const char* const command, gchar** args)
const gchar* filename;
cons_show("The following C plugins are available globally and can be installed:");
while ((filename = g_dir_read_name(global_cp_dir))) {
if (g_str_has_suffix(filename, ".so"))
cons_show(" %s", filename);
}
}