Fixed but when no parameter given for /perl and /python options
This commit is contained in:
parent
5a3976d6a5
commit
7bb815a540
@ -531,7 +531,13 @@ weechat_perl_cmd (t_weechat_plugin *plugin,
|
|||||||
(void) handler_args;
|
(void) handler_args;
|
||||||
(void) handler_pointer;
|
(void) handler_pointer;
|
||||||
|
|
||||||
argv = plugin->explode_string (plugin, arguments, " ", 0, &argc);
|
if (arguments)
|
||||||
|
argv = plugin->explode_string (plugin, arguments, " ", 0, &argc);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
argv = NULL;
|
||||||
|
argc = 0;
|
||||||
|
}
|
||||||
|
|
||||||
switch (argc)
|
switch (argc)
|
||||||
{
|
{
|
||||||
@ -639,7 +645,10 @@ weechat_perl_cmd (t_weechat_plugin *plugin,
|
|||||||
plugin->printf_server (plugin,
|
plugin->printf_server (plugin,
|
||||||
"Perl error: wrong argument count for \"perl\" command");
|
"Perl error: wrong argument count for \"perl\" command");
|
||||||
}
|
}
|
||||||
plugin->free_exploded_string (plugin, argv);
|
|
||||||
|
if (argv)
|
||||||
|
plugin->free_exploded_string (plugin, argv);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -670,7 +670,13 @@ weechat_python_cmd (t_weechat_plugin *plugin,
|
|||||||
(void) handler_args;
|
(void) handler_args;
|
||||||
(void) handler_pointer;
|
(void) handler_pointer;
|
||||||
|
|
||||||
argv = plugin->explode_string (plugin, arguments, " ", 0, &argc);
|
if (arguments)
|
||||||
|
argv = plugin->explode_string (plugin, arguments, " ", 0, &argc);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
argv = NULL;
|
||||||
|
argc = 0;
|
||||||
|
}
|
||||||
|
|
||||||
switch (argc)
|
switch (argc)
|
||||||
{
|
{
|
||||||
@ -783,7 +789,10 @@ weechat_python_cmd (t_weechat_plugin *plugin,
|
|||||||
plugin->printf_server (plugin,
|
plugin->printf_server (plugin,
|
||||||
"Python error: wrong argument count for \"python\" command");
|
"Python error: wrong argument count for \"python\" command");
|
||||||
}
|
}
|
||||||
plugin->free_exploded_string (plugin, argv);
|
|
||||||
|
if (argv)
|
||||||
|
plugin->free_exploded_string (plugin, argv);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -531,7 +531,13 @@ weechat_perl_cmd (t_weechat_plugin *plugin,
|
|||||||
(void) handler_args;
|
(void) handler_args;
|
||||||
(void) handler_pointer;
|
(void) handler_pointer;
|
||||||
|
|
||||||
argv = plugin->explode_string (plugin, arguments, " ", 0, &argc);
|
if (arguments)
|
||||||
|
argv = plugin->explode_string (plugin, arguments, " ", 0, &argc);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
argv = NULL;
|
||||||
|
argc = 0;
|
||||||
|
}
|
||||||
|
|
||||||
switch (argc)
|
switch (argc)
|
||||||
{
|
{
|
||||||
@ -639,7 +645,10 @@ weechat_perl_cmd (t_weechat_plugin *plugin,
|
|||||||
plugin->printf_server (plugin,
|
plugin->printf_server (plugin,
|
||||||
"Perl error: wrong argument count for \"perl\" command");
|
"Perl error: wrong argument count for \"perl\" command");
|
||||||
}
|
}
|
||||||
plugin->free_exploded_string (plugin, argv);
|
|
||||||
|
if (argv)
|
||||||
|
plugin->free_exploded_string (plugin, argv);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -670,7 +670,13 @@ weechat_python_cmd (t_weechat_plugin *plugin,
|
|||||||
(void) handler_args;
|
(void) handler_args;
|
||||||
(void) handler_pointer;
|
(void) handler_pointer;
|
||||||
|
|
||||||
argv = plugin->explode_string (plugin, arguments, " ", 0, &argc);
|
if (arguments)
|
||||||
|
argv = plugin->explode_string (plugin, arguments, " ", 0, &argc);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
argv = NULL;
|
||||||
|
argc = 0;
|
||||||
|
}
|
||||||
|
|
||||||
switch (argc)
|
switch (argc)
|
||||||
{
|
{
|
||||||
@ -783,7 +789,10 @@ weechat_python_cmd (t_weechat_plugin *plugin,
|
|||||||
plugin->printf_server (plugin,
|
plugin->printf_server (plugin,
|
||||||
"Python error: wrong argument count for \"python\" command");
|
"Python error: wrong argument count for \"python\" command");
|
||||||
}
|
}
|
||||||
plugin->free_exploded_string (plugin, argv);
|
|
||||||
|
if (argv)
|
||||||
|
plugin->free_exploded_string (plugin, argv);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user