core: send command line parameter to plugins only if the name starts with the plugin name followed by a colon
This commit is contained in:
parent
1d6714e428
commit
33ee803609
@ -26,6 +26,7 @@ New features::
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: send command line parameter to plugins only if the name starts with the plugin name followed by a colon
|
||||
* core: auto disable upgrade process (command line option "--upgrade") if the file weechat.upgrade is not found
|
||||
* core: replace newlines by spaces in argument "completion" of function hook_command (issue #538)
|
||||
* core: replace char "," by "~" in color codes to separate foreground from background (issue #1264)
|
||||
|
@ -273,12 +273,14 @@ plugin_get_args (struct t_weechat_plugin *plugin,
|
||||
int argc, char **argv,
|
||||
int *plugin_argc, char ***plugin_argv)
|
||||
{
|
||||
int i, temp_argc;
|
||||
int i, temp_argc, length_plugin_name;
|
||||
char **temp_argv;
|
||||
|
||||
temp_argc = 0;
|
||||
temp_argv = NULL;
|
||||
|
||||
length_plugin_name = strlen (plugin->name);
|
||||
|
||||
if (argc > 0)
|
||||
{
|
||||
temp_argv = malloc ((argc + 1) * sizeof (*temp_argv));
|
||||
@ -290,8 +292,9 @@ plugin_get_args (struct t_weechat_plugin *plugin,
|
||||
|| (strcmp (argv[i], "--no-connect") == 0)
|
||||
|| (strcmp (argv[i], "-s") == 0)
|
||||
|| (strcmp (argv[i], "--no-script") == 0)
|
||||
|| (strncmp (argv[i], plugin->name,
|
||||
strlen (plugin->name)) == 0))
|
||||
|| ((strncmp (argv[i], plugin->name,
|
||||
length_plugin_name) == 0)
|
||||
&& (argv[i][length_plugin_name] == ':')))
|
||||
{
|
||||
temp_argv[temp_argc++] = argv[i];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user