1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-24 20:06:38 +02:00

Commands allowed when not connected to any server, fixed get_config: now needs exact option name to return value

This commit is contained in:
Sebastien Helleu
2006-02-17 14:59:07 +00:00
parent d69c634d2f
commit ae0e17cfe2
2 changed files with 6 additions and 14 deletions
+3 -7
View File
@@ -330,11 +330,7 @@ weechat_plugin_exec_command (t_weechat_plugin *plugin,
else if (ptr_server && (ptr_server->buffer))
user_command (ptr_server, NULL, command);
else
{
irc_display_prefix (NULL, NULL, PREFIX_ERROR);
gui_printf (NULL, _("%s server not found for plugin exec command\n"),
WEECHAT_ERROR);
}
user_command (NULL, NULL, command);
}
}
@@ -566,7 +562,7 @@ weechat_plugin_get_config (t_weechat_plugin *plugin, char *option)
{
if ((!option) ||
((option) && (option[0])
&& (strstr (weechat_options[i][j].option_name, option) != NULL)))
&& (ascii_strcasecmp (weechat_options[i][j].option_name, option) == 0)))
{
return weechat_plugin_get_config_str_value (&weechat_options[i][j], NULL);
}
@@ -583,7 +579,7 @@ weechat_plugin_get_config (t_weechat_plugin *plugin, char *option)
weechat_options[CONFIG_SECTION_SERVER][i].option_name);
if ((!option) ||
((option) && (option[0])
&& (strstr (option_name, option) != NULL)))
&& (ascii_strcasecmp (option_name, option) == 0)))
{
ptr_option_value = config_get_server_option_ptr (ptr_server,
weechat_options[CONFIG_SECTION_SERVER][i].option_name);
+3 -7
View File
@@ -330,11 +330,7 @@ weechat_plugin_exec_command (t_weechat_plugin *plugin,
else if (ptr_server && (ptr_server->buffer))
user_command (ptr_server, NULL, command);
else
{
irc_display_prefix (NULL, NULL, PREFIX_ERROR);
gui_printf (NULL, _("%s server not found for plugin exec command\n"),
WEECHAT_ERROR);
}
user_command (NULL, NULL, command);
}
}
@@ -566,7 +562,7 @@ weechat_plugin_get_config (t_weechat_plugin *plugin, char *option)
{
if ((!option) ||
((option) && (option[0])
&& (strstr (weechat_options[i][j].option_name, option) != NULL)))
&& (ascii_strcasecmp (weechat_options[i][j].option_name, option) == 0)))
{
return weechat_plugin_get_config_str_value (&weechat_options[i][j], NULL);
}
@@ -583,7 +579,7 @@ weechat_plugin_get_config (t_weechat_plugin *plugin, char *option)
weechat_options[CONFIG_SECTION_SERVER][i].option_name);
if ((!option) ||
((option) && (option[0])
&& (strstr (option_name, option) != NULL)))
&& (ascii_strcasecmp (option_name, option) == 0)))
{
ptr_option_value = config_get_server_option_ptr (ptr_server,
weechat_options[CONFIG_SECTION_SERVER][i].option_name);