diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2005-11-06 22:12:40 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2005-11-06 22:12:40 +0000 |
commit | 78c110ace288496b837bc08580c5cff8b562b7e3 (patch) | |
tree | 48cc0a2e26f61bece41cd72cfdecdbb5b0fe4c49 | |
parent | 83b7741ef2b7178d93dc16b90ce17861370646b4 (diff) | |
download | weechat-78c110ace288496b837bc08580c5cff8b562b7e3.zip |
Check only min number of args in perl plugin for all functions, except register
(if too much args given, they're silently ignored)
-rw-r--r-- | src/plugins/scripts/perl/weechat-perl.c | 20 | ||||
-rw-r--r-- | weechat/src/plugins/scripts/perl/weechat-perl.c | 20 |
2 files changed, 20 insertions, 20 deletions
diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/weechat-perl.c index 4522805d6..c7a5383e2 100644 --- a/src/plugins/scripts/perl/weechat-perl.c +++ b/src/plugins/scripts/perl/weechat-perl.c @@ -268,7 +268,7 @@ static XS (XS_weechat_print) XSRETURN_NO; } - if ((items < 1) || (items > 3)) + if (items < 1) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -315,7 +315,7 @@ static XS (XS_weechat_print_infobar) XSRETURN_NO; } - if (items != 2) + if (items < 2) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -351,7 +351,7 @@ static XS (XS_weechat_command) XSRETURN_NO; } - if ((items < 1) || (items > 3)) + if (items < 1) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -397,7 +397,7 @@ static XS (XS_weechat_add_message_handler) XSRETURN_NO; } - if (items != 2) + if (items < 2) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -485,7 +485,7 @@ static XS (XS_weechat_remove_handler) XSRETURN_NO; } - if (items != 2) + if (items < 2) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -523,7 +523,7 @@ static XS (XS_weechat_get_info) XSRETURN_NO; } - if ((items < 1) || (items > 2)) + if (items < 1) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -629,7 +629,7 @@ static XS (XS_weechat_get_config) XSRETURN_NO; } - if (items != 1) + if (items < 1) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -676,7 +676,7 @@ static XS (XS_weechat_set_config) XSRETURN_NO; } - if (items != 2) + if (items < 2) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -717,7 +717,7 @@ static XS (XS_weechat_get_plugin_config) XSRETURN_NO; } - if (items != 1) + if (items < 1) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -766,7 +766,7 @@ static XS (XS_weechat_set_plugin_config) XSRETURN_NO; } - if (items != 2) + if (items < 2) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " diff --git a/weechat/src/plugins/scripts/perl/weechat-perl.c b/weechat/src/plugins/scripts/perl/weechat-perl.c index 4522805d6..c7a5383e2 100644 --- a/weechat/src/plugins/scripts/perl/weechat-perl.c +++ b/weechat/src/plugins/scripts/perl/weechat-perl.c @@ -268,7 +268,7 @@ static XS (XS_weechat_print) XSRETURN_NO; } - if ((items < 1) || (items > 3)) + if (items < 1) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -315,7 +315,7 @@ static XS (XS_weechat_print_infobar) XSRETURN_NO; } - if (items != 2) + if (items < 2) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -351,7 +351,7 @@ static XS (XS_weechat_command) XSRETURN_NO; } - if ((items < 1) || (items > 3)) + if (items < 1) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -397,7 +397,7 @@ static XS (XS_weechat_add_message_handler) XSRETURN_NO; } - if (items != 2) + if (items < 2) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -485,7 +485,7 @@ static XS (XS_weechat_remove_handler) XSRETURN_NO; } - if (items != 2) + if (items < 2) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -523,7 +523,7 @@ static XS (XS_weechat_get_info) XSRETURN_NO; } - if ((items < 1) || (items > 2)) + if (items < 1) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -629,7 +629,7 @@ static XS (XS_weechat_get_config) XSRETURN_NO; } - if (items != 1) + if (items < 1) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -676,7 +676,7 @@ static XS (XS_weechat_set_config) XSRETURN_NO; } - if (items != 2) + if (items < 2) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -717,7 +717,7 @@ static XS (XS_weechat_get_plugin_config) XSRETURN_NO; } - if (items != 1) + if (items < 1) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " @@ -766,7 +766,7 @@ static XS (XS_weechat_set_plugin_config) XSRETURN_NO; } - if (items != 2) + if (items < 2) { perl_plugin->printf_server (perl_plugin, "Perl error: wrong parameters for " |