mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 13:56:37 +02:00
All messages translated to french, fixed bugs/typos in some messages
This commit is contained in:
@@ -90,6 +90,8 @@
|
||||
./src/plugins/irc/irc-color.h
|
||||
./src/plugins/irc/irc-command.c
|
||||
./src/plugins/irc/irc-command.h
|
||||
./src/plugins/irc/irc-completion.c
|
||||
./src/plugins/irc/irc-completion.h
|
||||
./src/plugins/irc/irc-config.c
|
||||
./src/plugins/irc/irc-config.h
|
||||
./src/plugins/irc/irc-dcc.c
|
||||
@@ -110,6 +112,9 @@
|
||||
./src/plugins/logger/logger-buffer.c
|
||||
./src/plugins/logger/logger-buffer.h
|
||||
./src/plugins/logger/logger.c
|
||||
./src/plugins/logger/logger.h
|
||||
./src/plugins/logger/logger-tail.c
|
||||
./src/plugins/logger/logger-tail.h
|
||||
./src/plugins/plugin-api.c
|
||||
./src/plugins/plugin-api.h
|
||||
./src/plugins/plugin.c
|
||||
|
||||
@@ -91,6 +91,8 @@ SET(WEECHAT_SOURCES
|
||||
./src/plugins/irc/irc-color.h
|
||||
./src/plugins/irc/irc-command.c
|
||||
./src/plugins/irc/irc-command.h
|
||||
./src/plugins/irc/irc-completion.c
|
||||
./src/plugins/irc/irc-completion.h
|
||||
./src/plugins/irc/irc-config.c
|
||||
./src/plugins/irc/irc-config.h
|
||||
./src/plugins/irc/irc-dcc.c
|
||||
@@ -111,6 +113,9 @@ SET(WEECHAT_SOURCES
|
||||
./src/plugins/logger/logger-buffer.c
|
||||
./src/plugins/logger/logger-buffer.h
|
||||
./src/plugins/logger/logger.c
|
||||
./src/plugins/logger/logger.h
|
||||
./src/plugins/logger/logger-tail.c
|
||||
./src/plugins/logger/logger-tail.h
|
||||
./src/plugins/plugin-api.c
|
||||
./src/plugins/plugin-api.h
|
||||
./src/plugins/plugin.c
|
||||
|
||||
+893
-845
File diff suppressed because it is too large
Load Diff
+25
-19
@@ -494,7 +494,10 @@ command_help (void *data, struct t_gui_buffer *buffer,
|
||||
{
|
||||
case 1:
|
||||
gui_chat_printf (NULL, "");
|
||||
gui_chat_printf (NULL, _("%s internal commands:"), PACKAGE_NAME);
|
||||
gui_chat_printf (NULL,
|
||||
/* TRANSLATORS: %s is "WeeChat" */
|
||||
_("%s internal commands:"),
|
||||
PACKAGE_NAME);
|
||||
for (ptr_hook = weechat_hooks[HOOK_TYPE_COMMAND]; ptr_hook;
|
||||
ptr_hook = ptr_hook->next_hook)
|
||||
{
|
||||
@@ -563,7 +566,7 @@ command_help (void *data, struct t_gui_buffer *buffer,
|
||||
{
|
||||
gui_chat_printf (NULL, "");
|
||||
gui_chat_printf (NULL,
|
||||
_("[%s%s] %s/%s %s%s"),
|
||||
"[%s%s] %s/%s %s%s",
|
||||
(ptr_hook->plugin) ?
|
||||
_("plugin:") : "weechat",
|
||||
(ptr_hook->plugin) ?
|
||||
@@ -924,12 +927,8 @@ command_plugin_list (char *name, int full)
|
||||
"(%d calls remaining)"),
|
||||
interval,
|
||||
(HOOK_TIMER(ptr_hook, interval) % 1000 == 0) ?
|
||||
((interval > 1) ?
|
||||
_("seconds") :
|
||||
_("second")) :
|
||||
((interval > 1) ?
|
||||
_("milliseconds") :
|
||||
_("millisecond")),
|
||||
(NG_("second", "seconds", interval)) :
|
||||
(NG_("millisecond", "milliseconds", interval)),
|
||||
HOOK_TIMER(ptr_hook, remaining_calls));
|
||||
else
|
||||
gui_chat_printf (NULL,
|
||||
@@ -937,12 +936,8 @@ command_plugin_list (char *name, int full)
|
||||
"(no call limit)"),
|
||||
interval,
|
||||
(HOOK_TIMER(ptr_hook, interval) % 1000 == 0) ?
|
||||
((interval > 1) ?
|
||||
_("seconds") :
|
||||
_("second")) :
|
||||
((interval > 1) ?
|
||||
_("milliseconds") :
|
||||
_("millisecond")));
|
||||
(NG_("second", "seconds", interval)) :
|
||||
(NG_("millisecond", "milliseconds", interval)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1377,15 +1372,20 @@ command_set (void *data, struct t_gui_buffer *buffer,
|
||||
gui_chat_printf (NULL, "");
|
||||
if (argc == 2)
|
||||
gui_chat_printf (NULL,
|
||||
_("%s%d%s configuration option(s) found with "
|
||||
"\"%s\""),
|
||||
NG_("%s%d%s configuration option found with "
|
||||
"\"%s\"",
|
||||
"%s%d%s configuration options found with "
|
||||
"\"%s\"",
|
||||
number_found),
|
||||
GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
|
||||
number_found,
|
||||
GUI_COLOR(GUI_COLOR_CHAT),
|
||||
argv[1]);
|
||||
else
|
||||
gui_chat_printf (NULL,
|
||||
_("%s%d%s configuration option(s) found"),
|
||||
NG_("%s%d%s configuration option found",
|
||||
"%s%d%s configuration options found",
|
||||
number_found),
|
||||
GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
|
||||
number_found,
|
||||
GUI_COLOR(GUI_COLOR_CHAT));
|
||||
@@ -1485,13 +1485,19 @@ command_setp (void *data, struct t_gui_buffer *buffer,
|
||||
{
|
||||
gui_chat_printf (NULL, "");
|
||||
if (argc == 2)
|
||||
gui_chat_printf (NULL, "%s%d%s plugin option(s) found with \"%s\"",
|
||||
gui_chat_printf (NULL,
|
||||
NG_("%s%d%s plugin option found with \"%s\"",
|
||||
"%s%d%s plugin options found with \"%s\"",
|
||||
number_found),
|
||||
GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
|
||||
number_found,
|
||||
GUI_COLOR(GUI_COLOR_CHAT),
|
||||
argv[1]);
|
||||
else
|
||||
gui_chat_printf (NULL, "%s%d%s plugin option(s) found",
|
||||
gui_chat_printf (NULL,
|
||||
NG_("%s%d%s plugin option found",
|
||||
"%s%d%s plugin options found",
|
||||
number_found),
|
||||
GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
|
||||
number_found,
|
||||
GUI_COLOR(GUI_COLOR_CHAT));
|
||||
|
||||
+23
-18
@@ -807,7 +807,8 @@ config_file_write_internal (struct t_config_file *config_file, int default_optio
|
||||
if ((config_file->file = fopen (filename2, "w")) == NULL)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("Error: cannot create file \"%s\"\n"),
|
||||
_("%sError: cannot create file \"%s\""),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
filename2);
|
||||
free (filename);
|
||||
free (filename2);
|
||||
@@ -817,12 +818,9 @@ config_file_write_internal (struct t_config_file *config_file, int default_optio
|
||||
current_time = time (NULL);
|
||||
string_iconv_fprintf (config_file->file,
|
||||
_("#\n# %s configuration file, created by "
|
||||
"%s v%s on %s"),
|
||||
"%s v%s on %s#\n"),
|
||||
PACKAGE_NAME, PACKAGE_NAME, PACKAGE_VERSION,
|
||||
ctime (¤t_time));
|
||||
string_iconv_fprintf (config_file->file,
|
||||
_("# WARNING! Be careful when editing this file, "
|
||||
"WeeChat may write it at any time.\n#\n"));
|
||||
|
||||
for (ptr_section = config_file->sections; ptr_section;
|
||||
ptr_section = ptr_section->next_section)
|
||||
@@ -908,7 +906,8 @@ config_file_read (struct t_config_file *config_file)
|
||||
if ((config_file->file = fopen (filename, "r")) == NULL)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("Warning: config file \"%s\" not found.\n"),
|
||||
_("%sWarning: config file \"%s\" not found"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
filename);
|
||||
free (filename);
|
||||
return -1;
|
||||
@@ -945,8 +944,9 @@ config_file_read (struct t_config_file *config_file)
|
||||
if (pos == NULL)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("Warning: %s, line %d: invalid "
|
||||
"syntax, missing \"]\"\n"),
|
||||
_("%sWarning: %s, line %d: invalid "
|
||||
"syntax, missing \"]\""),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
filename, line_number);
|
||||
}
|
||||
else
|
||||
@@ -966,9 +966,10 @@ config_file_read (struct t_config_file *config_file)
|
||||
else
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("Warning: %s, line %d: unknown "
|
||||
_("%sWarning: %s, line %d: unknown "
|
||||
"section identifier "
|
||||
"(\"%s\")\n"),
|
||||
"(\"%s\")"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
filename, line_number, pos);
|
||||
}
|
||||
}
|
||||
@@ -979,8 +980,9 @@ config_file_read (struct t_config_file *config_file)
|
||||
if (pos == NULL)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("Warning: %s, line %d: invalid "
|
||||
"syntax, missing \"=\"\n"),
|
||||
_("%sWarning: %s, line %d: invalid "
|
||||
"syntax, missing \"=\""),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
filename, line_number);
|
||||
}
|
||||
else
|
||||
@@ -1056,25 +1058,28 @@ config_file_read (struct t_config_file *config_file)
|
||||
case -1:
|
||||
if (ptr_section)
|
||||
gui_chat_printf (NULL,
|
||||
_("Warning: %s, line %d: "
|
||||
_("%sWarning: %s, line %d: "
|
||||
"option \"%s\" "
|
||||
"unknown for "
|
||||
"section \"%s\"\n"),
|
||||
"section \"%s\""),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
filename, line_number,
|
||||
line, ptr_section->name);
|
||||
else
|
||||
gui_chat_printf (NULL,
|
||||
_("Warning: %s, line %d: "
|
||||
_("%sWarning: %s, line %d: "
|
||||
"unknown option \"%s\" "
|
||||
"(outside a section)\n"),
|
||||
"(outside a section)"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
filename, line_number,
|
||||
line);
|
||||
break;
|
||||
case 0:
|
||||
gui_chat_printf (NULL,
|
||||
_("Warning: %s, line %d: "
|
||||
_("%sWarning: %s, line %d: "
|
||||
"invalid value for option "
|
||||
"\"%s\"\n"),
|
||||
"\"%s\""),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
filename, line_number, line);
|
||||
break;
|
||||
}
|
||||
|
||||
+76
-77
@@ -198,10 +198,9 @@ config_change_save_on_exit ()
|
||||
{
|
||||
if (!config_look_save_on_exit)
|
||||
{
|
||||
gui_chat_printf (NULL, "\n");
|
||||
gui_chat_printf (NULL,
|
||||
_("Warning: you should now issue /save to write "
|
||||
"\"save_on_exit\" option in configuration file.\n"));
|
||||
"\"save_on_exit\" option in configuration file"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -550,7 +549,7 @@ config_weechat_init ()
|
||||
NULL, 1, 10, "10", &config_change_nicks_colors);
|
||||
config_look_nicklist = config_file_new_option (
|
||||
ptr_section, "look_nicklist", "boolean",
|
||||
N_("display nicklist (on buffers with nicklist enabled"),
|
||||
N_("display nicklist (on buffers with nicklist enabled)"),
|
||||
NULL, 0, 0, "on", &config_change_buffers);
|
||||
config_look_nicklist_position = config_file_new_option (
|
||||
ptr_section, "look_nicklist_position", "integer",
|
||||
@@ -560,7 +559,7 @@ config_weechat_init ()
|
||||
config_look_nicklist_min_size = config_file_new_option (
|
||||
ptr_section, "look_nicklist_min_size", "integer",
|
||||
N_("min size for nicklist (width or height, depending on "
|
||||
"look_nicklist_position "),
|
||||
"look_nicklist_position (0 = no min size))"),
|
||||
NULL, 0, 100, "0", &config_change_buffers);
|
||||
config_look_nicklist_max_size = config_file_new_option (
|
||||
ptr_section, "look_nicklist_max_size", "integer",
|
||||
@@ -618,7 +617,7 @@ config_weechat_init ()
|
||||
NULL, 0, 0, "|", &config_change_buffers);
|
||||
config_look_nick_completor = config_file_new_option (
|
||||
ptr_section, "look_nick_completor", "string",
|
||||
N_("the string inserted after nick completion"),
|
||||
N_("string inserted after nick completion"),
|
||||
NULL, 0, 0, ":", NULL);
|
||||
config_look_nick_completion_ignore = config_file_new_option (
|
||||
ptr_section, "look_nick_completion_ignore", "string",
|
||||
@@ -710,12 +709,12 @@ config_weechat_init ()
|
||||
/* general color settings */
|
||||
config_color_separator = config_file_new_option (
|
||||
ptr_section, "color_separator", "color",
|
||||
N_("color for window separators (when splited)"),
|
||||
N_("background color for window separators (when splited)"),
|
||||
NULL, GUI_COLOR_SEPARATOR, 0, "blue", &config_change_color);
|
||||
/* title window */
|
||||
config_color_title = config_file_new_option (
|
||||
ptr_section, "color_title", "color",
|
||||
N_("color for title bar"),
|
||||
N_("text color for title bar"),
|
||||
NULL, GUI_COLOR_TITLE, 0, "default", &config_change_color);
|
||||
config_color_title_bg = config_file_new_option (
|
||||
ptr_section, "color_title_bg", "color",
|
||||
@@ -723,136 +722,136 @@ config_weechat_init ()
|
||||
NULL, -1, 0, "blue", &config_change_color);
|
||||
config_color_title_more = config_file_new_option (
|
||||
ptr_section, "color_title_more", "color",
|
||||
N_("color for '+' when scrolling title"),
|
||||
N_("text color for '+' when scrolling title"),
|
||||
NULL, GUI_COLOR_TITLE_MORE, 0, "lightmagenta", &config_change_color);
|
||||
/* chat window */
|
||||
config_color_chat = config_file_new_option (
|
||||
ptr_section, "color_chat", "color",
|
||||
N_("color for chat text"),
|
||||
N_("text color for chat"),
|
||||
NULL, GUI_COLOR_CHAT, 0, "default", &config_change_color);
|
||||
config_color_chat_bg = config_file_new_option (
|
||||
ptr_section, "color_chat_bg", "color",
|
||||
N_("background for chat text"),
|
||||
N_("background color for chat"),
|
||||
NULL, -1, 0, "default", &config_change_color);
|
||||
config_color_chat_time = config_file_new_option (
|
||||
ptr_section, "color_chat_time", "color",
|
||||
N_("color for time in chat window"),
|
||||
N_("text color for time in chat window"),
|
||||
NULL, GUI_COLOR_CHAT_TIME, 0, "default", &config_change_color);
|
||||
config_color_chat_time_delimiters = config_file_new_option (
|
||||
ptr_section, "color_chat_time_delimiters", "color",
|
||||
N_("color for time delimiters)"),
|
||||
N_("text color for time delimiters"),
|
||||
NULL, GUI_COLOR_CHAT_TIME_DELIMITERS, 0, "brown", &config_change_color);
|
||||
config_color_chat_prefix[GUI_CHAT_PREFIX_INFO] = config_file_new_option (
|
||||
ptr_section, "color_chat_prefix_info", "color",
|
||||
N_("color for info prefix"),
|
||||
N_("text color for info prefix"),
|
||||
NULL, GUI_COLOR_CHAT_PREFIX_INFO, 0, "lightcyan", &config_change_color);
|
||||
config_color_chat_prefix[GUI_CHAT_PREFIX_ERROR] = config_file_new_option (
|
||||
ptr_section, "color_chat_prefix_error", "color",
|
||||
N_("color for error prefix"),
|
||||
N_("text color for error prefix"),
|
||||
NULL, GUI_COLOR_CHAT_PREFIX_ERROR, 0, "yellow", &config_change_color);
|
||||
config_color_chat_prefix[GUI_CHAT_PREFIX_NETWORK] = config_file_new_option (
|
||||
ptr_section, "color_chat_prefix_network", "color",
|
||||
N_("color for network prefix"),
|
||||
N_("text color for network prefix"),
|
||||
NULL, GUI_COLOR_CHAT_PREFIX_NETWORK, 0, "lightmagenta", &config_change_color);
|
||||
config_color_chat_prefix[GUI_CHAT_PREFIX_ACTION] = config_file_new_option (
|
||||
ptr_section, "color_chat_prefix_action", "color",
|
||||
N_("color for action prefix"),
|
||||
N_("text color for action prefix"),
|
||||
NULL, GUI_COLOR_CHAT_PREFIX_ACTION, 0, "white", &config_change_color);
|
||||
config_color_chat_prefix[GUI_CHAT_PREFIX_JOIN] = config_file_new_option (
|
||||
ptr_section, "color_chat_prefix_join", "color",
|
||||
N_("color for join prefix"),
|
||||
N_("text color for join prefix"),
|
||||
NULL, GUI_COLOR_CHAT_PREFIX_JOIN, 0, "lightgreen", &config_change_color);
|
||||
config_color_chat_prefix[GUI_CHAT_PREFIX_QUIT] = config_file_new_option (
|
||||
ptr_section, "color_chat_prefix_quit", "color",
|
||||
N_("color for quit prefix"),
|
||||
N_("text color for quit prefix"),
|
||||
NULL, GUI_COLOR_CHAT_PREFIX_QUIT, 0, "lightred", &config_change_color);
|
||||
config_color_chat_prefix_more = config_file_new_option (
|
||||
ptr_section, "color_chat_prefix_more", "color",
|
||||
N_("color for '+' when prefix is too long"),
|
||||
N_("text color for '+' when prefix is too long"),
|
||||
NULL, GUI_COLOR_CHAT_PREFIX_MORE, 0, "lightmagenta", &config_change_color);
|
||||
config_color_chat_prefix_suffix = config_file_new_option (
|
||||
ptr_section, "color_chat_prefix_suffix", "color",
|
||||
N_("color for text after prefix"),
|
||||
N_("text color for suffix (after prefix)"),
|
||||
NULL, GUI_COLOR_CHAT_PREFIX_SUFFIX, 0, "green", &config_change_color);
|
||||
config_color_chat_buffer = config_file_new_option (
|
||||
ptr_section, "color_chat_buffer", "color",
|
||||
N_("color for buffer names"),
|
||||
N_("text color for buffer names"),
|
||||
NULL, GUI_COLOR_CHAT_BUFFER, 0, "white", &config_change_color);
|
||||
config_color_chat_server = config_file_new_option (
|
||||
ptr_section, "color_chat_server", "color",
|
||||
N_("color for server names"),
|
||||
N_("text color for server names"),
|
||||
NULL, GUI_COLOR_CHAT_SERVER, 0, "brown", &config_change_color);
|
||||
config_color_chat_channel = config_file_new_option (
|
||||
ptr_section, "color_chat_channel", "color",
|
||||
N_("color for channel names"),
|
||||
N_("text color for channel names"),
|
||||
NULL, GUI_COLOR_CHAT_CHANNEL, 0, "white", &config_change_color);
|
||||
config_color_chat_nick = config_file_new_option (
|
||||
ptr_section, "color_chat_nick", "color",
|
||||
N_("color for nicks"),
|
||||
N_("text color for nicks in chat window"),
|
||||
NULL, GUI_COLOR_CHAT_NICK, 0, "lightcyan", &config_change_color);
|
||||
config_color_chat_nick_self = config_file_new_option (
|
||||
ptr_section, "color_chat_nick_self", "color",
|
||||
N_("color for local nick"),
|
||||
N_("text color for local nick in chat window"),
|
||||
NULL, GUI_COLOR_CHAT_NICK_SELF, 0, "white", &config_change_color);
|
||||
config_color_chat_nick_other = config_file_new_option (
|
||||
ptr_section, "color_chat_nick_other", "color",
|
||||
N_("color for other nick in private buffer"),
|
||||
N_("text color for other nick in private buffer"),
|
||||
NULL, GUI_COLOR_CHAT_NICK_OTHER, 0, "default", &config_change_color);
|
||||
config_color_chat_nick_colors[0] = config_file_new_option (
|
||||
ptr_section, "color_chat_nick_color1", "color",
|
||||
N_("color #1 for nick"),
|
||||
N_("text color #1 for nick"),
|
||||
NULL, GUI_COLOR_CHAT_NICK1, 0, "cyan", &config_change_color);
|
||||
config_color_chat_nick_colors[1] = config_file_new_option (
|
||||
ptr_section, "color_chat_nick_color2", "color",
|
||||
N_("color #2 for nick"),
|
||||
N_("text color #2 for nick"),
|
||||
NULL, GUI_COLOR_CHAT_NICK2, 0, "magenta", &config_change_color);
|
||||
config_color_chat_nick_colors[2] = config_file_new_option (
|
||||
ptr_section, "color_chat_nick_color3", "color",
|
||||
N_("color #3 for nick"),
|
||||
N_("text color #3 for nick"),
|
||||
NULL, GUI_COLOR_CHAT_NICK3, 0, "green", &config_change_color);
|
||||
config_color_chat_nick_colors[3] = config_file_new_option (
|
||||
ptr_section, "color_chat_nick_color4", "color",
|
||||
N_("color #4 for nick"),
|
||||
N_("text color #4 for nick"),
|
||||
NULL, GUI_COLOR_CHAT_NICK4, 0, "brown", &config_change_color);
|
||||
config_color_chat_nick_colors[4] = config_file_new_option (
|
||||
ptr_section, "color_chat_nick_color5", "color",
|
||||
N_("color #5 for nick"),
|
||||
N_("text color #5 for nick"),
|
||||
NULL, GUI_COLOR_CHAT_NICK5, 0, "lightblue", &config_change_color);
|
||||
config_color_chat_nick_colors[5] = config_file_new_option (
|
||||
ptr_section, "color_chat_nick_color6", "color",
|
||||
N_("color #6 for nick"),
|
||||
N_("text color #6 for nick"),
|
||||
NULL, GUI_COLOR_CHAT_NICK6, 0, "default", &config_change_color);
|
||||
config_color_chat_nick_colors[6] = config_file_new_option (
|
||||
ptr_section, "color_chat_nick_color7", "color",
|
||||
N_("color #7 for nick"),
|
||||
N_("text color #7 for nick"),
|
||||
NULL, GUI_COLOR_CHAT_NICK7, 0, "lightcyan", &config_change_color);
|
||||
config_color_chat_nick_colors[7] = config_file_new_option (
|
||||
ptr_section, "color_chat_nick_color8", "color",
|
||||
N_("color #8 for nick"),
|
||||
N_("text color #8 for nick"),
|
||||
NULL, GUI_COLOR_CHAT_NICK8, 0, "lightmagenta", &config_change_color);
|
||||
config_color_chat_nick_colors[8] = config_file_new_option (
|
||||
ptr_section, "color_chat_nick_color9", "color",
|
||||
N_("color #9 for nick"),
|
||||
N_("text color #9 for nick"),
|
||||
NULL, GUI_COLOR_CHAT_NICK9, 0, "lightgreen", &config_change_color);
|
||||
config_color_chat_nick_colors[9] = config_file_new_option (
|
||||
ptr_section, "color_chat_nick_color10", "color",
|
||||
N_("color #10 for nick"),
|
||||
N_("text color #10 for nick"),
|
||||
NULL, GUI_COLOR_CHAT_NICK10, 0, "blue", &config_change_color);
|
||||
config_color_chat_host = config_file_new_option (
|
||||
ptr_section, "color_chat_host", "color",
|
||||
N_("color for hostnames"),
|
||||
N_("text color for hostnames"),
|
||||
NULL, GUI_COLOR_CHAT_HOST, 0, "cyan", &config_change_color);
|
||||
config_color_chat_delimiters = config_file_new_option (
|
||||
ptr_section, "color_chat_delimiters", "color",
|
||||
N_("color for delimiters"),
|
||||
N_("text color for delimiters"),
|
||||
NULL, GUI_COLOR_CHAT_DELIMITERS, 0, "green", &config_change_color);
|
||||
config_color_chat_highlight = config_file_new_option (
|
||||
ptr_section, "color_chat_highlight", "color",
|
||||
N_("color for highlighted nick"),
|
||||
N_("text color for highlighted nick"),
|
||||
NULL, GUI_COLOR_CHAT_HIGHLIGHT, 0, "yellow", &config_change_color);
|
||||
config_color_chat_read_marker = config_file_new_option (
|
||||
ptr_section, "color_chat_read_marker", "color",
|
||||
N_("color for unread data marker"),
|
||||
N_("text color for unread data marker"),
|
||||
NULL, GUI_COLOR_CHAT_READ_MARKER, 0, "yellow", &config_change_color);
|
||||
config_color_chat_read_marker_bg = config_file_new_option (
|
||||
ptr_section, "color_chat_read_marker_bg", "color",
|
||||
@@ -861,7 +860,7 @@ config_weechat_init ()
|
||||
/* status window */
|
||||
config_color_status = config_file_new_option (
|
||||
ptr_section, "color_status", "color",
|
||||
N_("color for status bar"),
|
||||
N_("text color for status bar"),
|
||||
NULL, GUI_COLOR_STATUS, 0, "default", &config_change_color);
|
||||
config_color_status_bg = config_file_new_option (
|
||||
ptr_section, "color_status_bg", "color",
|
||||
@@ -869,87 +868,87 @@ config_weechat_init ()
|
||||
NULL, -1, 0, "blue", &config_change_color);
|
||||
config_color_status_delimiters = config_file_new_option (
|
||||
ptr_section, "color_status_delimiters", "color",
|
||||
N_("color for status bar delimiters"),
|
||||
N_("text color for status bar delimiters"),
|
||||
NULL, GUI_COLOR_STATUS_DELIMITERS, 0, "cyan", &config_change_color);
|
||||
config_color_status_channel = config_file_new_option (
|
||||
ptr_section, "color_status_channel", "color",
|
||||
N_("color for current channel in status bar"),
|
||||
N_("text color for current channel in status bar"),
|
||||
NULL, GUI_COLOR_STATUS_CHANNEL, 0, "white", &config_change_color);
|
||||
config_color_status_data_msg = config_file_new_option (
|
||||
ptr_section, "color_status_data_msg", "color",
|
||||
N_("color for window with new messages (status bar)"),
|
||||
N_("text color for buffer with new messages (status bar)"),
|
||||
NULL, GUI_COLOR_STATUS_DATA_MSG, 0, "yellow", &config_change_color);
|
||||
config_color_status_data_private = config_file_new_option (
|
||||
ptr_section, "color_status_data_private", "color",
|
||||
N_("color for window with private message (status bar)"),
|
||||
N_("text color for buffer with private message (status bar)"),
|
||||
NULL, GUI_COLOR_STATUS_DATA_PRIVATE, 0, "lightgreen", &config_change_color);
|
||||
config_color_status_data_highlight = config_file_new_option (
|
||||
ptr_section, "color_status_data_highlight", "color",
|
||||
N_("color for window with highlight (status bar)"),
|
||||
N_("text color for buffer with highlight (status bar)"),
|
||||
NULL, GUI_COLOR_STATUS_DATA_HIGHLIGHT, 0, "lightmagenta", &config_change_color);
|
||||
config_color_status_data_other = config_file_new_option (
|
||||
ptr_section, "color_status_data_other", "color",
|
||||
N_("color for window with new data (not messages) "
|
||||
N_("text color for buffer with new data (not messages) "
|
||||
"(status bar)"),
|
||||
NULL, GUI_COLOR_STATUS_DATA_OTHER, 0, "default", &config_change_color);
|
||||
config_color_status_more = config_file_new_option (
|
||||
ptr_section, "color_status_more", "color",
|
||||
N_("color for window with new data (status bar)"),
|
||||
N_("text color for buffer with new data (status bar)"),
|
||||
NULL, GUI_COLOR_STATUS_MORE, 0, "white", &config_change_color);
|
||||
/* infobar window */
|
||||
config_color_infobar = config_file_new_option (
|
||||
ptr_section, "color_infobar", "color",
|
||||
N_("color for infobar text"),
|
||||
N_("text color for infobar"),
|
||||
NULL, GUI_COLOR_INFOBAR, 0, "black", &config_change_color);
|
||||
config_color_infobar_bg = config_file_new_option (
|
||||
ptr_section, "color_infobar_bg", "color",
|
||||
N_("background color for info bar text"),
|
||||
N_("background color for infobar"),
|
||||
NULL, -1, 0, "cyan", &config_change_color);
|
||||
config_color_infobar_delimiters = config_file_new_option (
|
||||
ptr_section, "color_infobar_delimiters", "color",
|
||||
N_("color for infobar delimiters"),
|
||||
N_("text color for infobar delimiters"),
|
||||
NULL, GUI_COLOR_INFOBAR_DELIMITERS, 0, "blue", &config_change_color);
|
||||
config_color_infobar_highlight = config_file_new_option (
|
||||
ptr_section, "color_infobar_highlight", "color",
|
||||
N_("color for infobar highlight notification"),
|
||||
N_("text color for infobar highlight notification"),
|
||||
NULL, GUI_COLOR_INFOBAR_HIGHLIGHT, 0, "white", &config_change_color);
|
||||
/* input window */
|
||||
config_color_input = config_file_new_option (
|
||||
ptr_section, "color_input", "color",
|
||||
N_("color for input text"),
|
||||
N_("text color for input line"),
|
||||
NULL, GUI_COLOR_INPUT, 0, "default", &config_change_color);
|
||||
config_color_input_bg = config_file_new_option (
|
||||
ptr_section, "color_input_bg", "color",
|
||||
N_("background color for input text"),
|
||||
N_("background color for input line"),
|
||||
NULL, -1, 0, "default", &config_change_color);
|
||||
config_color_input_server = config_file_new_option (
|
||||
ptr_section, "color_input_server", "color",
|
||||
N_("color for input text (server name)"),
|
||||
N_("text color for server name in input line"),
|
||||
NULL, GUI_COLOR_INPUT_SERVER, 0, "brown", &config_change_color);
|
||||
config_color_input_channel = config_file_new_option (
|
||||
ptr_section, "color_input_channel", "color",
|
||||
N_("color for input text (channel name)"),
|
||||
N_("text color for channel name in input line"),
|
||||
NULL, GUI_COLOR_INPUT_CHANNEL, 0, "white", &config_change_color);
|
||||
config_color_input_nick = config_file_new_option (
|
||||
ptr_section, "color_input_nick", "color",
|
||||
N_("color for input text (nick name)"),
|
||||
N_("text color for nick name in input line"),
|
||||
NULL, GUI_COLOR_INPUT_NICK, 0, "lightcyan", &config_change_color);
|
||||
config_color_input_delimiters = config_file_new_option (
|
||||
ptr_section, "color_input_delimiters", "color",
|
||||
N_("color for input text (delimiters)"),
|
||||
N_("text color for delimiters in input line"),
|
||||
NULL, GUI_COLOR_INPUT_DELIMITERS, 0, "cyan", &config_change_color);
|
||||
config_color_input_text_not_found = config_file_new_option (
|
||||
ptr_section, "color_input_text_not_found", "color",
|
||||
N_("color for text not found"),
|
||||
N_("text color for unsucessful text search in input line"),
|
||||
NULL, GUI_COLOR_INPUT_TEXT_NOT_FOUND, 0, "red", &config_change_color);
|
||||
config_color_input_actions = config_file_new_option (
|
||||
ptr_section, "color_input_actions", "color",
|
||||
N_("color for actions in input window"),
|
||||
N_("text color for actions in input line"),
|
||||
NULL, GUI_COLOR_INPUT_ACTIONS, 0, "lightgreen", &config_change_color);
|
||||
/* nicklist window */
|
||||
config_color_nicklist = config_file_new_option (
|
||||
ptr_section, "color_nicklist", "color",
|
||||
N_("color for nicklist"),
|
||||
N_("text color for nicklist"),
|
||||
NULL, GUI_COLOR_NICKLIST, 0, "default", &config_change_color);
|
||||
config_color_nicklist_bg = config_file_new_option (
|
||||
ptr_section, "color_nicklist_bg", "color",
|
||||
@@ -957,40 +956,40 @@ config_weechat_init ()
|
||||
NULL, -1, 0, "default", &config_change_color);
|
||||
config_color_nicklist_away = config_file_new_option (
|
||||
ptr_section, "color_nicklist_away", "color",
|
||||
N_("color for away nicknames"),
|
||||
N_("text color for away nicknames"),
|
||||
NULL, GUI_COLOR_NICKLIST_AWAY, 0, "cyan", &config_change_color);
|
||||
config_color_nicklist_prefix1 = config_file_new_option (
|
||||
ptr_section, "color_nicklist_prefix1", "color",
|
||||
N_("color for prefix 1"),
|
||||
N_("text color for prefix #1 in nicklist"),
|
||||
NULL, GUI_COLOR_NICKLIST_PREFIX1, 0, "lightgreen", &config_change_color);
|
||||
config_color_nicklist_prefix2 = config_file_new_option (
|
||||
ptr_section, "color_nicklist_prefix2", "color",
|
||||
N_("color for prefix 2"),
|
||||
N_("text color for prefix #2 in nicklist"),
|
||||
NULL, GUI_COLOR_NICKLIST_PREFIX2, 0, "lightmagenta", &config_change_color);
|
||||
config_color_nicklist_prefix3 = config_file_new_option (
|
||||
ptr_section, "color_nicklist_prefix3", "color",
|
||||
N_("color for prefix 3"),
|
||||
N_("text color for prefix #3 in nicklist"),
|
||||
NULL, GUI_COLOR_NICKLIST_PREFIX3, 0, "yellow", &config_change_color);
|
||||
config_color_nicklist_prefix4 = config_file_new_option (
|
||||
ptr_section, "color_nicklist_prefix4", "color",
|
||||
N_("color for prefix 4"),
|
||||
N_("text color for prefix #4 in nicklist"),
|
||||
NULL, GUI_COLOR_NICKLIST_PREFIX4, 0, "blue", &config_change_color);
|
||||
config_color_nicklist_prefix5 = config_file_new_option (
|
||||
ptr_section, "color_nicklist_prefix5", "color",
|
||||
N_("color for prefix 5"),
|
||||
N_("text color for prefix #5 in nicklist"),
|
||||
NULL, GUI_COLOR_NICKLIST_PREFIX5, 0, "brown", &config_change_color);
|
||||
config_color_nicklist_more = config_file_new_option (
|
||||
ptr_section, "color_nicklist_more", "color",
|
||||
N_("color for '+' when scrolling nicks (nicklist)"),
|
||||
N_("text color for '+' when scrolling nicks in nicklist"),
|
||||
NULL, GUI_COLOR_NICKLIST_MORE, 0, "lightmagenta", &config_change_color);
|
||||
config_color_nicklist_separator = config_file_new_option (
|
||||
ptr_section, "color_nicklist_separator", "color",
|
||||
N_("color for nicklist separator"),
|
||||
N_("text color for nicklist separator"),
|
||||
NULL, GUI_COLOR_NICKLIST_SEPARATOR, 0, "blue", &config_change_color);
|
||||
/* status info */
|
||||
config_color_info = config_file_new_option (
|
||||
ptr_section, "color_info", "color",
|
||||
N_("color for status info"),
|
||||
N_("text color for status info"),
|
||||
NULL, GUI_COLOR_INFO, 0, "default", &config_change_color);
|
||||
config_color_info_bg = config_file_new_option (
|
||||
ptr_section, "color_info_bg", "color",
|
||||
@@ -998,27 +997,27 @@ config_weechat_init ()
|
||||
NULL, -1, 0, "default", &config_change_color);
|
||||
config_color_info_waiting = config_file_new_option (
|
||||
ptr_section, "color_info_waiting", "color",
|
||||
N_("color for \"waiting\" status info"),
|
||||
N_("text color for \"waiting\" status info"),
|
||||
NULL, GUI_COLOR_INFO_WAITING, 0, "lightcyan", &config_change_color);
|
||||
config_color_info_connecting = config_file_new_option (
|
||||
ptr_section, "color_info_connecting", "color",
|
||||
N_("color for \"connecting\" status info"),
|
||||
N_("text color for \"connecting\" status info"),
|
||||
NULL, GUI_COLOR_INFO_CONNECTING, 0, "yellow", &config_change_color);
|
||||
config_color_info_active = config_file_new_option (
|
||||
ptr_section, "color_info_active", "color",
|
||||
N_("color for \"active\" status info"),
|
||||
N_("text color for \"active\" status info"),
|
||||
NULL, GUI_COLOR_INFO_ACTIVE, 0, "lightblue", &config_change_color);
|
||||
config_color_info_done = config_file_new_option (
|
||||
ptr_section, "color_info_done", "color",
|
||||
N_("color for \"done\" status info"),
|
||||
N_("text color for \"done\" status info"),
|
||||
NULL, GUI_COLOR_INFO_DONE, 0, "lightgreen", &config_change_color);
|
||||
config_color_info_failed = config_file_new_option (
|
||||
ptr_section, "color_info_failed", "color",
|
||||
N_("color for \"failed\" status info"),
|
||||
N_("text color for \"failed\" status info"),
|
||||
NULL, GUI_COLOR_INFO_FAILED, 0, "lightred", &config_change_color);
|
||||
config_color_info_aborted = config_file_new_option (
|
||||
ptr_section, "color_info_aborted", "color",
|
||||
N_("color for \"aborted\" status info"),
|
||||
N_("text color for \"aborted\" status info"),
|
||||
NULL, GUI_COLOR_INFO_ABORTED, 0, "lightred", &config_change_color);
|
||||
|
||||
/* history */
|
||||
@@ -1108,7 +1107,7 @@ config_weechat_init ()
|
||||
config_plugins_extension = config_file_new_option (
|
||||
ptr_section, "plugins_extension", "string",
|
||||
N_("standard plugins extension in filename (for example "
|
||||
"\".so\" under Linux or \".dll\" under Windows)"),
|
||||
"\".so\" under Linux or \".dll\" under Microsoft Windows)"),
|
||||
NULL, 0, 0,
|
||||
#ifdef WIN32
|
||||
".dll",
|
||||
|
||||
@@ -153,7 +153,7 @@ input_exec_command (struct t_gui_buffer *buffer, char *string,
|
||||
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError: unknown command \"%s\" (type /help "
|
||||
"for help)."),
|
||||
"for help)"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
command + 1);
|
||||
|
||||
@@ -220,7 +220,7 @@ input_data (struct t_gui_buffer *buffer, char *data, int only_builtin)
|
||||
else
|
||||
gui_chat_printf (buffer,
|
||||
_("%sYou can not write text in this "
|
||||
"buffer!"),
|
||||
"buffer"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
|
||||
}
|
||||
|
||||
|
||||
@@ -54,9 +54,12 @@
|
||||
void
|
||||
gui_main_pre_init (int *argc, char **argv[])
|
||||
{
|
||||
/* nothing for Curses interface */
|
||||
/* make C compiler happy */
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
|
||||
/* build empty prefixes (before reading config) */
|
||||
gui_chat_prefix_build_empty ();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -76,6 +79,8 @@ gui_main_init ()
|
||||
raw ();
|
||||
|
||||
gui_color_init ();
|
||||
|
||||
/* build prefixes according to config */
|
||||
gui_chat_prefix_build ();
|
||||
|
||||
gui_infobar = NULL;
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "../../core/wee-config.h"
|
||||
#include "../../core/wee-utf8.h"
|
||||
#include "../../plugins/plugin.h"
|
||||
#include "../gui-chat.h"
|
||||
#include "../gui-main.h"
|
||||
#include "../gui-buffer.h"
|
||||
#include "../gui-history.h"
|
||||
@@ -62,6 +63,9 @@ GtkWidget *gui_gtk_label1;
|
||||
void
|
||||
gui_main_pre_init (int *argc, char **argv[])
|
||||
{
|
||||
/* build empty prefixes (before reading config) */
|
||||
gui_chat_prefix_build_empty ();
|
||||
|
||||
/* Initialise Gtk */
|
||||
gtk_init (argc, argv);
|
||||
}
|
||||
@@ -82,11 +86,14 @@ gui_main_init ()
|
||||
|
||||
gui_ok = 1;
|
||||
|
||||
/* build prefixes according to config */
|
||||
gui_chat_prefix_build ();
|
||||
|
||||
/* init clipboard buffer */
|
||||
gui_input_clipboard = NULL;
|
||||
|
||||
/* create Gtk widgets */
|
||||
|
||||
|
||||
gdk_color_parse ("white", &color_fg);
|
||||
gdk_color_parse ("black", &color_bg);
|
||||
|
||||
|
||||
@@ -48,8 +48,25 @@ char gui_chat_prefix_empty[] = ""; /* empty prefix */
|
||||
int gui_chat_time_length = 0; /* length of time for each line (in chars) */
|
||||
|
||||
|
||||
/*
|
||||
* gui_chat_prefix_build_empty: build empty prefixes
|
||||
* (called before reading WeeChat config file)
|
||||
*/
|
||||
|
||||
void
|
||||
gui_chat_prefix_build_empty ()
|
||||
{
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_INFO] = gui_chat_prefix_empty;
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR] = gui_chat_prefix_empty;
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_NETWORK] = gui_chat_prefix_empty;
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ACTION] = gui_chat_prefix_empty;
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_JOIN] = gui_chat_prefix_empty;
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_QUIT] = gui_chat_prefix_empty;
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_chat_prefix_build: build prefix with colors
|
||||
* (called after reading WeeChat config file)
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
@@ -45,6 +45,7 @@ extern int gui_chat_time_length;
|
||||
|
||||
/* chat functions */
|
||||
|
||||
extern void gui_chat_prefix_build_empty ();
|
||||
extern void gui_chat_prefix_build ();
|
||||
extern int gui_chat_strlen_screen (char *string);
|
||||
extern int gui_chat_string_real_pos (char *string, int pos);
|
||||
|
||||
+18
-21
@@ -191,9 +191,9 @@ alias_cb (void *data, struct t_gui_buffer *buffer, int argc, char **argv,
|
||||
if (ptr_alias->running)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sAlias: error, circular reference when calling "
|
||||
"alias \"/%s\""),
|
||||
weechat_prefix ("error"),
|
||||
_("%s%s: error, circular reference when calling "
|
||||
"alias \"%s\""),
|
||||
weechat_prefix ("error"), "Alias",
|
||||
ptr_alias->name);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
@@ -349,9 +349,9 @@ alias_get_final_command (struct t_alias *alias)
|
||||
if (alias->running)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sAlias: error, circular reference when calling "
|
||||
"alias \"/%s\""),
|
||||
weechat_prefix ("error"),
|
||||
_("%s%s: error, circular reference when calling "
|
||||
"alias \"%s\""),
|
||||
weechat_prefix ("error"), "Alias",
|
||||
alias->name);
|
||||
return NULL;
|
||||
}
|
||||
@@ -431,8 +431,8 @@ alias_config_read_line (struct t_config_file *config_file, char *option_name,
|
||||
if (!alias_new (option_name, value))
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
"%sAlias: error creating alias \"%s\" => \"%s\"",
|
||||
weechat_prefix ("error"),
|
||||
"%s%s: error creating alias \"%s\" => \"%s\"",
|
||||
weechat_prefix ("error"), "Alias",
|
||||
option_name, value);
|
||||
}
|
||||
}
|
||||
@@ -551,14 +551,13 @@ alias_config_reload_signal_cb (void *data, char *signal, void *signal_data)
|
||||
if (weechat_config_reload (alias_config_file) == 0)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sAlias: configuration file reloaded"),
|
||||
weechat_prefix ("info"));
|
||||
_("%s%s: configuration file reloaded"),
|
||||
weechat_prefix ("info"), "Alias");
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
weechat_printf (NULL,
|
||||
_("%sAlias: failed to reload alias configuration "
|
||||
"file"),
|
||||
weechat_prefix ("error"));
|
||||
_("%s%s: failed to reload configuration file"),
|
||||
weechat_prefix ("error"), "Alias");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -596,9 +595,9 @@ alias_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (!alias_new (alias_name, argv_eol[2]))
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sAlias: error creating alias \"%s\" "
|
||||
"=> \"%\""),
|
||||
weechat_prefix ("error"),
|
||||
_("%s%s: error creating alias \"%s\" "
|
||||
"=> \"%s\""),
|
||||
weechat_prefix ("error"), "Alias",
|
||||
alias_name, argv_eol[2]);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
@@ -646,9 +645,7 @@ alias_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
}
|
||||
}
|
||||
else
|
||||
weechat_printf (NULL,
|
||||
_("%sNo alias defined."),
|
||||
weechat_prefix ("info"));
|
||||
weechat_printf (NULL, _("No alias defined"));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -726,8 +723,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin)
|
||||
if (!alias_config_init ())
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
"%sAlias: error creating configuration file \"%s\"",
|
||||
weechat_prefix("error"),
|
||||
"%s%s: error creating configuration file \"%s\"",
|
||||
weechat_prefix("error"), "Alias",
|
||||
ALIAS_CONFIG_FILENAME);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
+11
-12
@@ -96,7 +96,7 @@ demo_infobar_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
|
||||
weechat_infobar_printf (10, NULL,
|
||||
(argc > 1) ?
|
||||
argv_eol[1] : _("test infobar"));
|
||||
argv_eol[1] : _("test message in infobar"));
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
@@ -238,9 +238,9 @@ demo_infolist_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
}
|
||||
|
||||
weechat_printf (NULL,
|
||||
_("%sDemo: missing argument for /%s command "
|
||||
_("%s%s: missing argument for \"%s\" command "
|
||||
"(try /help %s)"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "Demo",
|
||||
"demo_infolist", "demo_infolist");
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
@@ -266,9 +266,9 @@ demo_info_command_cb (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
weechat_info_get (argv[1]));
|
||||
else
|
||||
weechat_printf (NULL,
|
||||
_("%sDemo: missing argument for /%s command "
|
||||
_("%s%s: missing argument for \"%s\" command "
|
||||
"(try /help %s)"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "Demo",
|
||||
"demo_info", "demo_info");
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
@@ -301,17 +301,16 @@ weechat_plugin_init (struct t_weechat_plugin *plugin)
|
||||
weechat_plugin = plugin;
|
||||
|
||||
weechat_hook_command ("demo_printf",
|
||||
_("demo command: print some messages"),
|
||||
_("print some messages on current ubffer"),
|
||||
_("[text]"),
|
||||
_("text: write some text on current buffer"),
|
||||
_("text: write this text"),
|
||||
"",
|
||||
&demo_printf_command_cb, NULL);
|
||||
|
||||
weechat_hook_command ("demo_infobar",
|
||||
_("demo command: print a message in infobar for 10 "
|
||||
"seconds"),
|
||||
_("print a message in infobar for 10 seconds"),
|
||||
_("[text]"),
|
||||
_("text: write this text on infobar"),
|
||||
_("text: write this text"),
|
||||
"",
|
||||
&demo_infobar_command_cb, NULL);
|
||||
|
||||
@@ -323,7 +322,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin)
|
||||
&demo_buffer_command_cb, NULL);
|
||||
|
||||
weechat_hook_command ("demo_infolist",
|
||||
_("demo command: get and display list"),
|
||||
_("get and display an infolist"),
|
||||
_("infolist"),
|
||||
_("infolist: infolist to display (values: buffer, "
|
||||
"buffer_lines)"),
|
||||
@@ -331,7 +330,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin)
|
||||
&demo_infolist_command_cb, NULL);
|
||||
|
||||
weechat_hook_command ("demo_info",
|
||||
_("demo command: get and display info"),
|
||||
_("get and display an info"),
|
||||
_("info"),
|
||||
_("info: info to display (values: version, "
|
||||
"weechat_dir, weechat_libdir, weechat_sharedir, "
|
||||
|
||||
+16
-16
@@ -96,22 +96,22 @@ fifo_create ()
|
||||
O_RDONLY | O_NONBLOCK)) != -1)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sFifo: pipe is open\n"),
|
||||
weechat_prefix ("info"));
|
||||
_("%s%s: pipe open"),
|
||||
weechat_prefix ("info"), "Fifo"),
|
||||
rc = 1;
|
||||
}
|
||||
else
|
||||
weechat_printf (NULL,
|
||||
_("%sFifo: unable to open pipe (%s) for "
|
||||
_("%s%s: unable to open pipe (%s) for "
|
||||
"reading"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "Fifo",
|
||||
fifo_filename);
|
||||
}
|
||||
else
|
||||
weechat_printf (NULL,
|
||||
_("%sFifo: unable to create pipe for remote "
|
||||
_("%s%s: unable to create pipe for remote "
|
||||
"control (%s)"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "Fifo",
|
||||
fifo_filename);
|
||||
}
|
||||
}
|
||||
@@ -152,8 +152,8 @@ fifo_remove ()
|
||||
}
|
||||
|
||||
weechat_printf (NULL,
|
||||
_("%sFifo: pipe is closed"),
|
||||
weechat_prefix ("info"));
|
||||
_("%s%s: pipe closed"),
|
||||
weechat_prefix ("info"), "Fifo");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -184,8 +184,8 @@ fifo_exec (char *text)
|
||||
if (!pos_msg)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sFifo error: invalid text received on pipe"),
|
||||
weechat_prefix ("error"));
|
||||
_("%s%s: error, invalid text received on pipe"),
|
||||
weechat_prefix ("error"), "Fifo");
|
||||
return;
|
||||
}
|
||||
pos_msg[0] = '\0';
|
||||
@@ -215,8 +215,8 @@ fifo_exec (char *text)
|
||||
if (!ptr_buffer)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sFifo error: buffer not found for pipe data"),
|
||||
weechat_prefix ("error"));
|
||||
_("%s%s: error, buffer not found for pipe data"),
|
||||
weechat_prefix ("error"), "Fifo");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -294,8 +294,8 @@ fifo_read ()
|
||||
if (num_read < 0)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sFifo: error reading pipe, closing it"),
|
||||
weechat_prefix ("error"));
|
||||
_("%s%s: error reading pipe, closing it"),
|
||||
weechat_prefix ("error"), "Fifo");
|
||||
fifo_remove ();
|
||||
}
|
||||
else
|
||||
@@ -306,8 +306,8 @@ fifo_read ()
|
||||
if (fifo_fd < 0)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sFifo: error opening file, closing it"),
|
||||
weechat_prefix ("error"));
|
||||
_("%s%s: error opening file, closing it"),
|
||||
weechat_prefix ("error"), "Fifo");
|
||||
fifo_remove ();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -51,8 +51,8 @@ irc_channel_new (struct t_irc_server *server, int channel_type,
|
||||
if ((new_channel = (struct t_irc_channel *)malloc (sizeof (struct t_irc_channel))) == NULL)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: cannot allocate new channel"),
|
||||
weechat_prefix ("error"));
|
||||
_("%s%s: cannot allocate new channel"),
|
||||
weechat_prefix ("error"), "irc");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
+137
-131
@@ -228,9 +228,9 @@ irc_command_amsg (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: cannot find nick for "
|
||||
_("%s%s: cannot find nick for "
|
||||
"sending message"),
|
||||
weechat_prefix ("error"));
|
||||
weechat_prefix ("error"), "irc");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -304,8 +304,8 @@ irc_command_away_server (struct t_irc_server *server, char *arguments)
|
||||
string = (char *)irc_color_decode ((unsigned char *)arguments,
|
||||
1, 0);
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: future away on %s%s%s: %s"),
|
||||
weechat_prefix ("info"),
|
||||
_("%s%s: future away on %s%s%s: %s"),
|
||||
weechat_prefix ("info"), "irc",
|
||||
IRC_COLOR_CHAT_SERVER,
|
||||
server->name,
|
||||
IRC_COLOR_CHAT,
|
||||
@@ -362,8 +362,8 @@ irc_command_away_server (struct t_irc_server *server, char *arguments)
|
||||
/* server not connected, remove away message but do not send
|
||||
anything */
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: future away on %s%s%s removed"),
|
||||
weechat_prefix ("info"),
|
||||
_("%s%s: future away on %s%s%s removed"),
|
||||
weechat_prefix ("info"), "irc",
|
||||
IRC_COLOR_CHAT_SERVER,
|
||||
server->name,
|
||||
IRC_COLOR_CHAT);
|
||||
@@ -445,9 +445,9 @@ irc_command_ban (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can only be "
|
||||
_("%s%s: \"%s\" command can only be "
|
||||
"executed in a channel buffer"),
|
||||
weechat_prefix ("error"), "ban");
|
||||
weechat_prefix ("error"), "irc", "ban");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -465,9 +465,9 @@ irc_command_ban (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (!ptr_channel)
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can only be "
|
||||
_("%s%s: \"%s\" command can only be "
|
||||
"executed in a channel buffer"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"ban");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
@@ -491,18 +491,18 @@ irc_command_connect_one_server (struct t_irc_server *server, int no_join)
|
||||
if (server->is_connected)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: already connected to server "
|
||||
_("%s%s: already connected to server "
|
||||
"\"%s\"!"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
server->name);
|
||||
return 0;
|
||||
}
|
||||
if (server->child_pid > 0)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: currently connecting to server "
|
||||
_("%s%s: currently connecting to server "
|
||||
"\"%s\"!"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
server->name);
|
||||
return 0;
|
||||
}
|
||||
@@ -559,9 +559,9 @@ irc_command_connect (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (i == (argc - 1))
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: missing argument for \"%s\" "
|
||||
_("%s%s: missing argument for \"%s\" "
|
||||
"option"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"-port");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
@@ -630,10 +630,10 @@ irc_command_connect (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (ptr_server)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: server %s%s%s created "
|
||||
_("%s%s: server %s%s%s created "
|
||||
"(temporary server, "
|
||||
"NOT SAVED!)"),
|
||||
weechat_prefix ("info"),
|
||||
weechat_prefix ("info"), "irc",
|
||||
IRC_COLOR_CHAT_SERVER,
|
||||
server_tmp.name,
|
||||
IRC_COLOR_CHAT);
|
||||
@@ -643,9 +643,9 @@ irc_command_connect (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: unable to create server "
|
||||
_("%s%s: unable to create server "
|
||||
"\"%s\""),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
argv[i]);
|
||||
}
|
||||
}
|
||||
@@ -801,9 +801,9 @@ irc_command_cycle (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (!ptr_channel)
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can not be executed "
|
||||
_("%s%s: \"%s\" command can not be executed "
|
||||
"on a server buffer"),
|
||||
weechat_prefix ("error"), "cycle");
|
||||
weechat_prefix ("error"), "irc", "cycle");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -821,9 +821,9 @@ irc_command_cycle (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (!ptr_channel)
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can not be executed on "
|
||||
_("%s%s: \"%s\" command can not be executed on "
|
||||
"a server buffer"),
|
||||
weechat_prefix ("error"), "part");
|
||||
weechat_prefix ("error"), "irc", "part");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -911,8 +911,8 @@ irc_command_dcc (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: wrong arguments for \"%s\" command"),
|
||||
weechat_prefix ("error"), "dcc");
|
||||
_("%s%s: wrong arguments for \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "dcc");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -953,9 +953,9 @@ irc_command_dehalfop (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can only be executed in "
|
||||
_("%s%s: \"%s\" command can only be executed in "
|
||||
"a channel buffer"),
|
||||
weechat_prefix ("error"), "dehalfop");
|
||||
weechat_prefix ("error"), "irc", "dehalfop");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
return WEECHAT_RC_OK;
|
||||
@@ -990,9 +990,9 @@ irc_command_deop (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can only be executed in "
|
||||
_("%s%s: \"%s\" command can only be executed in "
|
||||
"a channel buffer"),
|
||||
weechat_prefix ("error"), "deop");
|
||||
weechat_prefix ("error"), "irc", "deop");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
return WEECHAT_RC_OK;
|
||||
@@ -1027,9 +1027,9 @@ irc_command_devoice (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can only be "
|
||||
_("%s%s: \"%s\" command can only be "
|
||||
"executed in a channel buffer"),
|
||||
weechat_prefix ("error"), "devoice");
|
||||
weechat_prefix ("error"), "irc", "devoice");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
return WEECHAT_RC_OK;
|
||||
@@ -1108,14 +1108,15 @@ irc_command_disconnect_one_server (struct t_irc_server *server)
|
||||
&& (server->reconnect_start == 0))
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: not connected to server \"%s\"!"),
|
||||
weechat_prefix ("error"), server->name);
|
||||
_("%s%s: not connected to server \"%s\"!"),
|
||||
weechat_prefix ("error"), "irc", server->name);
|
||||
return 0;
|
||||
}
|
||||
if (server->reconnect_start > 0)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("irc: auto-reconnection is cancelled"));
|
||||
_("%s%s: auto-reconnection is cancelled"),
|
||||
weechat_prefix ("info"), "irc");
|
||||
}
|
||||
irc_command_quit_server (server, NULL);
|
||||
irc_server_disconnect (server, 0);
|
||||
@@ -1173,8 +1174,8 @@ irc_command_disconnect (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: server \"%s\" not found"),
|
||||
weechat_prefix ("error"), argv[i]);
|
||||
_("%s%s: server \"%s\" not found"),
|
||||
weechat_prefix ("error"), "irc", argv[i]);
|
||||
disconnect_ok = 0;
|
||||
}
|
||||
}
|
||||
@@ -1216,9 +1217,9 @@ irc_command_halfop (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can only be "
|
||||
_("%s%s: \"%s\" command can only be "
|
||||
"executed in a channel buffer"),
|
||||
weechat_prefix ("error"), "halfop");
|
||||
weechat_prefix ("error"), "irc", "halfop");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
return WEECHAT_RC_OK;
|
||||
@@ -1273,9 +1274,9 @@ irc_command_invite (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can only be "
|
||||
_("%s%s: \"%s\" command can only be "
|
||||
"executed in a channel buffer"),
|
||||
weechat_prefix ("error"), "invite");
|
||||
weechat_prefix ("error"), "irc", "invite");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -1372,9 +1373,9 @@ irc_command_kick (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (argc < 3)
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: wrong arguments for \"%s\" "
|
||||
_("%s%s: wrong arguments for \"%s\" "
|
||||
"command"),
|
||||
weechat_prefix ("error"), "kick");
|
||||
weechat_prefix ("error"), "irc", "kick");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos_channel = argv[1];
|
||||
@@ -1392,9 +1393,9 @@ irc_command_kick (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can only be "
|
||||
_("%s%s: \"%s\" command can only be "
|
||||
"executed in a channel buffer"),
|
||||
weechat_prefix ("error"), "kick");
|
||||
weechat_prefix ("error"), "irc", "kick");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -1438,9 +1439,9 @@ irc_command_kickban (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (argc < 3)
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: wrong arguments for \"%s\" "
|
||||
_("%s%s: wrong arguments for \"%s\" "
|
||||
"command"),
|
||||
weechat_prefix ("error"), "kickban");
|
||||
weechat_prefix ("error"), "irc", "kickban");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos_channel = argv[1];
|
||||
@@ -1458,9 +1459,9 @@ irc_command_kickban (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can only be "
|
||||
_("%s%s: \"%s\" command can only be "
|
||||
"executed in a channel buffer"),
|
||||
weechat_prefix ("error"), "kickban");
|
||||
weechat_prefix ("error"), "irc", "kickban");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -1573,9 +1574,9 @@ irc_command_list (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
regerror (ret, ptr_server->cmd_list_regexp,
|
||||
buf, sizeof(buf));
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" is not a valid regular "
|
||||
_("%s%s: \"%s\" is not a valid regular "
|
||||
"expression (%s)"),
|
||||
weechat_prefix ("error"), argv_eol, buf);
|
||||
weechat_prefix ("error"), "irc", argv_eol, buf);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
else
|
||||
@@ -1584,9 +1585,9 @@ irc_command_list (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: not enough memory for regular "
|
||||
_("%s%s: not enough memory for regular "
|
||||
"expression"),
|
||||
weechat_prefix ("error"));
|
||||
weechat_prefix ("error"), "irc");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -1641,9 +1642,9 @@ irc_command_me (void *data, struct t_gui_buffer *buffer, int argc, char **argv,
|
||||
if (!ptr_channel)
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can not be executed "
|
||||
_("%s%s: \"%s\" command can not be executed "
|
||||
"on a server buffer"),
|
||||
weechat_prefix ("error"), "me");
|
||||
weechat_prefix ("error"), "irc", "me");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
irc_command_me_channel (ptr_server, ptr_channel, argv_eol[1]);
|
||||
@@ -1753,10 +1754,10 @@ irc_command_msg (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
&& (ptr_channel->type != IRC_CHANNEL_TYPE_PRIVATE)))
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can only be "
|
||||
_("%s%s: \"%s\" command can only be "
|
||||
"executed in a channel or private "
|
||||
"buffer"),
|
||||
weechat_prefix ("error"), "msg *");
|
||||
weechat_prefix ("error"), "irc", "msg *");
|
||||
}
|
||||
if (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL)
|
||||
ptr_nick = irc_nick_search (ptr_channel, ptr_server->nick);
|
||||
@@ -1803,10 +1804,10 @@ irc_command_msg (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: nick \"%s\" not "
|
||||
_("%s%s: nick \"%s\" not "
|
||||
"found for \"%s\" command"),
|
||||
weechat_prefix ("error"),
|
||||
ptr_server->nick,
|
||||
"irc", ptr_server->nick,
|
||||
"msg");
|
||||
}
|
||||
}
|
||||
@@ -1917,9 +1918,9 @@ irc_command_names (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can only be "
|
||||
_("%s%s: \"%s\" command can only be "
|
||||
"executed in a channel buffer"),
|
||||
weechat_prefix ("error"), "names");
|
||||
weechat_prefix ("error"), "irc", "names");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -1976,8 +1977,8 @@ irc_command_nick (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (weechat_strcasecmp (argv[1], "-all") != 0)
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: wrong arguments for \"%s\" command"),
|
||||
weechat_prefix ("error"), "nick");
|
||||
_("%s%s: wrong arguments for \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "nick");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
for (ptr_server = irc_servers; ptr_server;
|
||||
@@ -2070,9 +2071,9 @@ irc_command_op (void *data, struct t_gui_buffer *buffer, int argc, char **argv,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can only be "
|
||||
_("%s%s: \"%s\" command can only be "
|
||||
"executed in a channel buffer"),
|
||||
weechat_prefix ("error"), "op");
|
||||
weechat_prefix ("error"), "irc", "op");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
return WEECHAT_RC_OK;
|
||||
@@ -2133,10 +2134,10 @@ irc_command_part (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (!ptr_channel)
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can only be "
|
||||
_("%s%s: \"%s\" command can only be "
|
||||
"executed in a channel or "
|
||||
"private buffer"),
|
||||
weechat_prefix ("error"), "part");
|
||||
weechat_prefix ("error"), "irc", "part");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
channel_name = ptr_channel->name;
|
||||
@@ -2148,10 +2149,10 @@ irc_command_part (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (!ptr_channel)
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can only be "
|
||||
_("%s%s: \"%s\" command can only be "
|
||||
"executed in a channel or private "
|
||||
"buffer"),
|
||||
weechat_prefix ("error"), "part");
|
||||
weechat_prefix ("error"), "irc", "part");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
if (!ptr_channel->nicks)
|
||||
@@ -2272,9 +2273,9 @@ irc_command_query (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (!ptr_channel)
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: cannot create new private "
|
||||
_("%s%s: cannot create new private "
|
||||
"buffer \"%s\""),
|
||||
weechat_prefix ("error"), argv[1]);
|
||||
weechat_prefix ("error"), "irc", argv[1]);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -2346,8 +2347,8 @@ irc_command_reconnect_one_server (struct t_irc_server *server, int no_join)
|
||||
if ((!server->is_connected) && (server->child_pid == 0))
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: not connected to server \"%s\"!"),
|
||||
weechat_prefix ("error"), server->name);
|
||||
_("%s%s: not connected to server \"%s\"!"),
|
||||
weechat_prefix ("error"), "irc", server->name);
|
||||
return 0;
|
||||
}
|
||||
irc_command_quit_server (server, NULL);
|
||||
@@ -2421,8 +2422,8 @@ irc_command_reconnect (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: server \"%s\" not found"),
|
||||
weechat_prefix ("error"), argv[i]);
|
||||
_("%s%s: server \"%s\" not found"),
|
||||
weechat_prefix ("error"), "irc", argv[i]);
|
||||
reconnect_ok = 0;
|
||||
}
|
||||
}
|
||||
@@ -2557,7 +2558,7 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
}
|
||||
if (!one_server_found)
|
||||
weechat_printf (NULL,
|
||||
_("No server with '%s' found"),
|
||||
_("No server found with \"%s\""),
|
||||
server_name);
|
||||
}
|
||||
}
|
||||
@@ -2572,9 +2573,9 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (irc_server_search (argv[2]))
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: server \"%s\" already exists, "
|
||||
_("%s%s: server \"%s\" already exists, "
|
||||
"can't create it!"),
|
||||
weechat_prefix ("error"), argv[2]);
|
||||
weechat_prefix ("error"), "irc", argv[2]);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -2605,9 +2606,10 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (i == (argc - 1))
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: missing argument for "
|
||||
_("%s%s: missing argument for "
|
||||
"\"%s\" option"),
|
||||
weechat_prefix ("error"), "-port");
|
||||
weechat_prefix ("error"), "irc",
|
||||
"-port");
|
||||
irc_server_free_data (&server_tmp);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
@@ -2621,9 +2623,10 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (i == (argc - 1))
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: missing argument for "
|
||||
_("%s%s: missing argument for "
|
||||
"\"%s\" option"),
|
||||
weechat_prefix ("error"), "-pwd");
|
||||
weechat_prefix ("error"), "irc",
|
||||
"-pwd");
|
||||
irc_server_free_data (&server_tmp);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
@@ -2634,9 +2637,9 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (i >= (argc - 3))
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: missing argument for "
|
||||
_("%s%s: missing argument for "
|
||||
"\"%s\" option"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"-nicks");
|
||||
irc_server_free_data (&server_tmp);
|
||||
return WEECHAT_RC_ERROR;
|
||||
@@ -2650,9 +2653,9 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (i == (argc - 1))
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: missing argument for "
|
||||
_("%s%s: missing argument for "
|
||||
"\"%s\" option"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"-username");
|
||||
irc_server_free_data (&server_tmp);
|
||||
return WEECHAT_RC_ERROR;
|
||||
@@ -2664,9 +2667,9 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (i == (argc - 1))
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: missing argument for "
|
||||
_("%s%s: missing argument for "
|
||||
"\"%s\" option"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"-realname");
|
||||
irc_server_free_data (&server_tmp);
|
||||
return WEECHAT_RC_ERROR;
|
||||
@@ -2678,9 +2681,9 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (i == (argc - 1))
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: missing argument for "
|
||||
_("%s%s: missing argument for "
|
||||
"\"%s\" option"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"-command");
|
||||
irc_server_free_data (&server_tmp);
|
||||
return WEECHAT_RC_ERROR;
|
||||
@@ -2692,9 +2695,9 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (i == (argc - 1))
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: missing argument for "
|
||||
_("%s%s: missing argument for "
|
||||
"\"%s\" option"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"-autojoin");
|
||||
irc_server_free_data (&server_tmp);
|
||||
return WEECHAT_RC_ERROR;
|
||||
@@ -2729,8 +2732,8 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (new_server)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: server %s%s%s created"),
|
||||
weechat_prefix ("info"),
|
||||
_("%s%s: server %s%s%s created"),
|
||||
weechat_prefix ("info"), "irc",
|
||||
IRC_COLOR_CHAT_SERVER,
|
||||
server_tmp.name,
|
||||
IRC_COLOR_CHAT);
|
||||
@@ -2738,8 +2741,8 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: unable to create server"),
|
||||
weechat_prefix ("error"));
|
||||
_("%s%s: unable to create server"),
|
||||
weechat_prefix ("error"), "irc");
|
||||
irc_server_free_data (&server_tmp);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
@@ -2761,9 +2764,9 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (!server_found)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: server \"%s\" not found for "
|
||||
_("%s%s: server \"%s\" not found for "
|
||||
"\"%s\" command"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
argv[2], "server copy");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
@@ -2772,9 +2775,9 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (irc_server_search (argv[3]))
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: server \"%s\" already exists for "
|
||||
_("%s%s: server \"%s\" already exists for "
|
||||
"\"%s\" command"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
argv[3], "server copy");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
@@ -2784,8 +2787,9 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (new_server)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: Server %s%s%s has been copied to "
|
||||
_("%s%s: Server %s%s%s has been copied to "
|
||||
"%s%s"),
|
||||
weechat_prefix ("info"), "irc",
|
||||
IRC_COLOR_CHAT_SERVER,
|
||||
argv[2],
|
||||
IRC_COLOR_CHAT,
|
||||
@@ -2809,9 +2813,9 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (!server_found)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: server \"%s\" not found for "
|
||||
_("%s%s: server \"%s\" not found for "
|
||||
"\"%s\" command"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
argv[2], "server rename");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
@@ -2820,9 +2824,9 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (irc_server_search (argv[3]))
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: server \"%s\" already exists for "
|
||||
_("%s%s: server \"%s\" already exists for "
|
||||
"\"%s\" command"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
argv[3], "server rename");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
@@ -2831,9 +2835,9 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (irc_server_rename (server_found, argv[3]))
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: server %s%s%s has been renamed to "
|
||||
_("%s%s: server %s%s%s has been renamed to "
|
||||
"%s%s"),
|
||||
weechat_prefix ("info"),
|
||||
weechat_prefix ("info"), "irc",
|
||||
IRC_COLOR_CHAT_SERVER,
|
||||
argv[2],
|
||||
IRC_COLOR_CHAT,
|
||||
@@ -2857,9 +2861,9 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (!server_found)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: server \"%s\" not found for "
|
||||
_("%s%s: server \"%s\" not found for "
|
||||
"\"%s\" command"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
argv[2], "server keep");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
@@ -2868,9 +2872,9 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (!server_found->temp_server)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: server \"%s\" is not a temporary "
|
||||
_("%s%s: server \"%s\" is not a temporary "
|
||||
"server"),
|
||||
weechat_prefix ("error"), argv[2]);
|
||||
weechat_prefix ("error"), "irc", argv[2]);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -2878,9 +2882,9 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
server_found->temp_server = 0;
|
||||
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: server %s%s%s is not temporary any "
|
||||
_("%s%s: server %s%s%s is not temporary any "
|
||||
"more"),
|
||||
weechat_prefix ("info"),
|
||||
weechat_prefix ("info"), "irc",
|
||||
IRC_COLOR_CHAT_SERVER,
|
||||
argv[2],
|
||||
IRC_COLOR_CHAT);
|
||||
@@ -2899,19 +2903,20 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
if (!server_found)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: server \"%s\" not found for "
|
||||
_("%s%s: server \"%s\" not found for "
|
||||
"\"%s\" command"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
argv[2], "server del");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
if (server_found->is_connected)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: you can not delete server \"%s\" "
|
||||
_("%s%s: you can not delete server \"%s\" "
|
||||
"because you are connected to. "
|
||||
"Try \"/disconnect %s\" before."),
|
||||
weechat_prefix ("error"), argv[2], argv[2]);
|
||||
weechat_prefix ("error"), "irc",
|
||||
argv[2], argv[2]);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -2933,8 +2938,8 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
irc_server_free (server_found);
|
||||
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: Server %s%s%s has been deleted"),
|
||||
weechat_prefix ("info"),
|
||||
_("%s%s: Server %s%s%s has been deleted"),
|
||||
weechat_prefix ("info"), "irc",
|
||||
IRC_COLOR_CHAT_SERVER,
|
||||
(server_name) ? server_name : "???",
|
||||
IRC_COLOR_CHAT);
|
||||
@@ -2953,16 +2958,17 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
irc_server_outqueue_free_all (ptr_server);
|
||||
}
|
||||
weechat_printf (NULL,
|
||||
_("irc: messages outqueue DELETED for all "
|
||||
_("%s%s: messages outqueue DELETED for all "
|
||||
"servers. Some messages from you or "
|
||||
"WeeChat may have been lost!"));
|
||||
"WeeChat may have been lost!"),
|
||||
weechat_prefix ("info"), "irc");
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: unknown option for \"%s\" command"),
|
||||
weechat_prefix ("error"), "server");
|
||||
_("%s%s: unknown option for \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "server");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -3192,9 +3198,9 @@ irc_command_topic (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can only be "
|
||||
_("%s%s: \"%s\" command can only be "
|
||||
"executed in a channel buffer"),
|
||||
weechat_prefix ("error"), "topic");
|
||||
weechat_prefix ("error"), "irc", "topic");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -3279,9 +3285,9 @@ irc_command_unban (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can only be "
|
||||
_("%s%s: \"%s\" command can only be "
|
||||
"executed in a channel buffer"),
|
||||
weechat_prefix ("error"), "unban");
|
||||
weechat_prefix ("error"), "irc", "unban");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -3297,8 +3303,8 @@ irc_command_unban (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: wrong argument count for \"%s\" command"),
|
||||
weechat_prefix ("error"), "unban");
|
||||
_("%s%s: wrong argument count for \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "unban");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -3416,9 +3422,9 @@ irc_command_voice (void *data, struct t_gui_buffer *buffer, int argc,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: \"%s\" command can only be "
|
||||
_("%s%s: \"%s\" command can only be "
|
||||
"executed in a channel buffer"),
|
||||
weechat_prefix ("error"), "voice");
|
||||
weechat_prefix ("error"), "irc", "voice");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
return WEECHAT_RC_OK;
|
||||
|
||||
@@ -238,19 +238,18 @@ irc_config_read_server_line (struct t_config_file *config_file,
|
||||
break;
|
||||
case 0:
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: warning, failed to set option "
|
||||
"\"%s\" with value \"%s\""),
|
||||
weechat_prefix ("error"),
|
||||
option_name, value);
|
||||
_("%s%s: value \"%s\" is invalid "
|
||||
"for option \"%s\""),
|
||||
weechat_prefix ("error"), "irc",
|
||||
value, option_name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: warning, option not found in config "
|
||||
"file: \"%s\""),
|
||||
weechat_prefix ("error"),
|
||||
_("%s%s: option \"%s\" not found"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
option_name);
|
||||
}
|
||||
}
|
||||
@@ -269,8 +268,8 @@ irc_config_read_server_line (struct t_config_file *config_file,
|
||||
if (!irc_config_server)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: error creating server for reading "
|
||||
"config file"),
|
||||
_("%s%s: error creating server for reading "
|
||||
"configuration file"), "irc",
|
||||
weechat_prefix ("error"));
|
||||
}
|
||||
}
|
||||
@@ -769,10 +768,10 @@ irc_config_reload_cb (void *data, char *event, void *pointer)
|
||||
if (ptr_server->is_connected)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: warning: server \"%s\" not found in "
|
||||
"configuration file, but was not deleted "
|
||||
"(currently used)"),
|
||||
weechat_prefix ("info"),
|
||||
_("%s%s: warning: server \"%s\" not found "
|
||||
"in configuration file. It has not been "
|
||||
"deleted because it's used now."),
|
||||
weechat_prefix ("info"), "irc",
|
||||
ptr_server->name);
|
||||
}
|
||||
else
|
||||
@@ -783,15 +782,14 @@ irc_config_reload_cb (void *data, char *event, void *pointer)
|
||||
}
|
||||
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: configuration file reloaded"),
|
||||
weechat_prefix ("info"));
|
||||
_("%s%s: configuration file reloaded"),
|
||||
weechat_prefix ("info"), "irc");
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: failed to reload alias configuration "
|
||||
"file"),
|
||||
weechat_prefix ("error"));
|
||||
_("%s%s: failed to reload configuration file"),
|
||||
weechat_prefix ("error"), "irc");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
|
||||
@@ -354,7 +354,7 @@ irc_display_server (struct t_irc_server *server, int with_detail)
|
||||
(server->autoreconnect) ? _("on") : _("off"));
|
||||
weechat_printf (NULL, " server_autoreconnect_delay : %d %s",
|
||||
server->autoreconnect_delay,
|
||||
_("seconds"));
|
||||
NG_("second", "seconds", server->autoreconnect_delay));
|
||||
weechat_printf (NULL, " server_address . . . . . . : %s",
|
||||
server->address);
|
||||
weechat_printf (NULL, " server_port . . . . . . . : %d",
|
||||
@@ -399,7 +399,7 @@ irc_display_server (struct t_irc_server *server, int with_detail)
|
||||
server->command : "");
|
||||
weechat_printf (NULL, " server_command_delay . . . : %d %s",
|
||||
server->command_delay,
|
||||
_("seconds"));
|
||||
NG_("second", "seconds", server->command_delay));
|
||||
weechat_printf (NULL, " server_autojoin . . . . . : %s",
|
||||
(server->autojoin && server->autojoin[0]) ?
|
||||
server->autojoin : "");
|
||||
|
||||
+214
-182
@@ -577,7 +577,7 @@ irc_protocol_cmd_error (struct t_irc_server *server, char *irc_message, char *ho
|
||||
pos = strchr (arguments, ' ');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
if (strcasecmp (arguments, server->nick) != 0)
|
||||
if (weechat_strcasecmp (arguments, server->nick) != 0)
|
||||
{
|
||||
if (first)
|
||||
{
|
||||
@@ -658,9 +658,9 @@ irc_protocol_cmd_invite (struct t_irc_server *server, char *irc_message, char *h
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: channel \"%s\" not found for "
|
||||
_("%s%s: channel \"%s\" not found for "
|
||||
"\"%s\" command"),
|
||||
weechat_prefix ("error"), "", "invite");
|
||||
weechat_prefix ("error"), "irc", "", "invite");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -688,8 +688,8 @@ irc_protocol_cmd_join (struct t_irc_server *server, char *irc_message, char *hos
|
||||
if (!host)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: \"%s\" command received without host"),
|
||||
weechat_prefix ("error"), "join");
|
||||
_("%s%s: \"%s\" command received without host"),
|
||||
weechat_prefix ("error"), "irc", "join");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -704,8 +704,8 @@ irc_protocol_cmd_join (struct t_irc_server *server, char *irc_message, char *hos
|
||||
if (!ptr_channel)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot create new channel \"%s\""),
|
||||
weechat_prefix ("error"), arguments);
|
||||
_("%s%s: cannot create new channel \"%s\""),
|
||||
weechat_prefix ("error"), "irc", arguments);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -791,9 +791,10 @@ irc_protocol_cmd_kick (struct t_irc_server *server, char *irc_message, char *hos
|
||||
if (!ptr_channel)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: channel \"%s\" not found for "
|
||||
_("%s%s: channel \"%s\" not found for "
|
||||
"\"%s\" command"),
|
||||
weechat_prefix ("error"), arguments, "kick");
|
||||
weechat_prefix ("error"), "irc", arguments,
|
||||
"kick");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -836,9 +837,9 @@ irc_protocol_cmd_kick (struct t_irc_server *server, char *irc_message, char *hos
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: nick \"%s\" not found for \"%s\" "
|
||||
_("%s%s: nick \"%s\" not found for \"%s\" "
|
||||
"command"),
|
||||
weechat_prefix ("error"), "", "kick");
|
||||
weechat_prefix ("error"), "irc", "", "kick");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
if (strcmp (pos_nick, server->nick) == 0)
|
||||
@@ -916,8 +917,9 @@ irc_protocol_cmd_kill (struct t_irc_server *server, char *irc_message,
|
||||
if (pos_comment)
|
||||
{
|
||||
weechat_printf (ptr_channel->buffer,
|
||||
_("%s%s%s has killed %s%s%s from "
|
||||
_("%s%s%s%s has killed %s%s%s from "
|
||||
"server %s(%s%s%s)"),
|
||||
weechat_prefix ("quit"),
|
||||
IRC_COLOR_CHAT_NICK,
|
||||
nick,
|
||||
IRC_COLOR_CHAT,
|
||||
@@ -932,8 +934,9 @@ irc_protocol_cmd_kill (struct t_irc_server *server, char *irc_message,
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_channel->buffer,
|
||||
_("%s%s%s has killed %s%s%s from "
|
||||
_("%s%s%s%s has killed %s%s%s from "
|
||||
"server"),
|
||||
weechat_prefix ("quit"),
|
||||
IRC_COLOR_CHAT_NICK,
|
||||
nick,
|
||||
IRC_COLOR_CHAT,
|
||||
@@ -947,9 +950,8 @@ irc_protocol_cmd_kill (struct t_irc_server *server, char *irc_message,
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%s host not found for \"%s\" "
|
||||
"command\n"),
|
||||
weechat_prefix ("error"), "kill");
|
||||
_("%s%s: host not found for \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "kill");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -975,9 +977,9 @@ irc_protocol_cmd_mode (struct t_irc_server *server, char *irc_message, char *hos
|
||||
if (!host)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: \"%s\" command received without "
|
||||
_("%s%s: \"%s\" command received without "
|
||||
"host"),
|
||||
weechat_prefix ("error"), "mode");
|
||||
weechat_prefix ("error"), "irc", "mode");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -985,9 +987,9 @@ irc_protocol_cmd_mode (struct t_irc_server *server, char *irc_message, char *hos
|
||||
if (!pos_modes)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: \"%s\" command received without "
|
||||
_("%s%s: \"%s\" command received without "
|
||||
"channel or nickname"),
|
||||
weechat_prefix ("error"), "mode");
|
||||
weechat_prefix ("error"), "irc", "mode");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos_modes[0] = '\0';
|
||||
@@ -1031,9 +1033,10 @@ irc_protocol_cmd_mode (struct t_irc_server *server, char *irc_message, char *hos
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%s channel \"%s\" not found for \"%s\" "
|
||||
_("%s%s: channel \"%s\" not found for \"%s\" "
|
||||
"command"),
|
||||
weechat_prefix ("error"), arguments, "mode");
|
||||
weechat_prefix ("error"), "irc", arguments,
|
||||
"mode");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -1079,8 +1082,8 @@ irc_protocol_cmd_nick (struct t_irc_server *server, char *irc_message, char *hos
|
||||
if (!host)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: \"%s\" command received without host"),
|
||||
weechat_prefix ("error"), "nick");
|
||||
_("%s%s: \"%s\" command received without host"),
|
||||
weechat_prefix ("error"), "irc", "nick");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -1200,8 +1203,8 @@ irc_protocol_cmd_notice (struct t_irc_server *server, char *irc_message, char *h
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%s nickname not found for \"%s\" command"),
|
||||
weechat_prefix ("error"), "notice");
|
||||
_("%s%s: nickname not found for \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "notice");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -1250,14 +1253,16 @@ irc_protocol_cmd_notice (struct t_irc_server *server, char *irc_message, char *h
|
||||
|
||||
weechat_printf (server->buffer,
|
||||
_("CTCP %sPING%s reply from "
|
||||
"%s%s%s: %ld.%ld seconds\n"),
|
||||
"%s%s%s: %ld.%ld %s"),
|
||||
IRC_COLOR_CHAT_CHANNEL,
|
||||
IRC_COLOR_CHAT,
|
||||
IRC_COLOR_CHAT_NICK,
|
||||
nick,
|
||||
IRC_COLOR_CHAT,
|
||||
difftime / 1000000,
|
||||
(difftime % 1000000) / 1000);
|
||||
(difftime % 1000000) / 1000,
|
||||
(NG_("second", "seconds",
|
||||
(difftime / 1000000))));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1275,9 +1280,10 @@ irc_protocol_cmd_notice (struct t_irc_server *server, char *irc_message, char *h
|
||||
if (!ptr_channel)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot create new "
|
||||
_("%s%s: cannot create new "
|
||||
"private buffer \"%s\""),
|
||||
weechat_prefix ("error"), nick);
|
||||
weechat_prefix ("error"), "irc",
|
||||
nick);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -1391,9 +1397,9 @@ irc_protocol_cmd_part (struct t_irc_server *server, char *irc_message, char *hos
|
||||
if (!host || !arguments)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: \"%s\" command received without host or "
|
||||
_("%s%s: \"%s\" command received without host or "
|
||||
"channel"),
|
||||
weechat_prefix ("error"), "part");
|
||||
weechat_prefix ("error"), "irc", "part");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -1505,9 +1511,9 @@ irc_protocol_cmd_part (struct t_irc_server *server, char *irc_message, char *hos
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: channel \"%s\" not found for \"%s\" "
|
||||
_("%s%s: channel \"%s\" not found for \"%s\" "
|
||||
"command"),
|
||||
weechat_prefix ("error"), arguments, "part");
|
||||
weechat_prefix ("error"), "irc", arguments, "part");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -1589,7 +1595,7 @@ void
|
||||
irc_protocol_reply_version (struct t_irc_server *server, struct t_irc_channel *channel,
|
||||
char *nick, char *message, int ignore)
|
||||
{
|
||||
char *pos;
|
||||
char *pos, *version, *date;
|
||||
struct utsname *buf;
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
|
||||
@@ -1607,45 +1613,54 @@ irc_protocol_reply_version (struct t_irc_server *server, struct t_irc_channel *c
|
||||
else if (!pos[0])
|
||||
pos = NULL;
|
||||
}
|
||||
|
||||
buf = (struct utsname *)malloc (sizeof (struct utsname));
|
||||
if (buf && (uname (buf) >= 0))
|
||||
|
||||
version = weechat_info_get ("version");
|
||||
date = weechat_info_get ("date");
|
||||
if (version && date)
|
||||
{
|
||||
irc_server_sendf (server,
|
||||
"NOTICE %s :%sVERSION %s v%s"
|
||||
" compiled on %s, running "
|
||||
"%s %s / %s%s",
|
||||
nick, "\01", PACKAGE_NAME, PACKAGE_VERSION, __DATE__,
|
||||
&buf->sysname,
|
||||
&buf->release, &buf->machine, "\01");
|
||||
free (buf);
|
||||
}
|
||||
else
|
||||
irc_server_sendf (server,
|
||||
"NOTICE %s :%sVERSION %s v%s"
|
||||
" compiled on %s%s",
|
||||
nick, "\01", PACKAGE_NAME, PACKAGE_VERSION, __DATE__,
|
||||
"\01");
|
||||
if (pos)
|
||||
{
|
||||
weechat_printf (ptr_buffer,
|
||||
_("CTCP %sVERSION%s received from %s%s%s: %s"),
|
||||
IRC_COLOR_CHAT_CHANNEL,
|
||||
IRC_COLOR_CHAT,
|
||||
IRC_COLOR_CHAT_NICK,
|
||||
nick,
|
||||
IRC_COLOR_CHAT,
|
||||
pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_buffer,
|
||||
_("CTCP %sVERSION%s received from %s%s"),
|
||||
IRC_COLOR_CHAT_CHANNEL,
|
||||
IRC_COLOR_CHAT,
|
||||
IRC_COLOR_CHAT_NICK,
|
||||
nick);
|
||||
buf = (struct utsname *)malloc (sizeof (struct utsname));
|
||||
if (buf && (uname (buf) >= 0))
|
||||
{
|
||||
irc_server_sendf (server,
|
||||
"NOTICE %s :%sVERSION %s v%s"
|
||||
" compiled on %s, running "
|
||||
"%s %s / %s%s",
|
||||
nick, "\01", "WeeChat", version, date,
|
||||
&buf->sysname,
|
||||
&buf->release, &buf->machine, "\01");
|
||||
free (buf);
|
||||
}
|
||||
else
|
||||
irc_server_sendf (server,
|
||||
"NOTICE %s :%sVERSION %s v%s"
|
||||
" compiled on %s%s",
|
||||
nick, "\01", "WeeChat", version, date,
|
||||
"\01");
|
||||
if (pos)
|
||||
{
|
||||
weechat_printf (ptr_buffer,
|
||||
_("CTCP %sVERSION%s received from %s%s%s: %s"),
|
||||
IRC_COLOR_CHAT_CHANNEL,
|
||||
IRC_COLOR_CHAT,
|
||||
IRC_COLOR_CHAT_NICK,
|
||||
nick,
|
||||
IRC_COLOR_CHAT,
|
||||
pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
weechat_printf (ptr_buffer,
|
||||
_("CTCP %sVERSION%s received from %s%s"),
|
||||
IRC_COLOR_CHAT_CHANNEL,
|
||||
IRC_COLOR_CHAT,
|
||||
IRC_COLOR_CHAT_NICK,
|
||||
nick);
|
||||
}
|
||||
}
|
||||
if (version)
|
||||
free (version);
|
||||
if (date)
|
||||
free (date);
|
||||
//(void) plugin_msg_handler_exec (server->name,
|
||||
// "weechat_ctcp",
|
||||
// irc_message);
|
||||
@@ -1673,8 +1688,8 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
if (!host)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: \"%s\" command received without host"),
|
||||
weechat_prefix ("error"), "privmsg");
|
||||
_("%s%s: \"%s\" command received without host"),
|
||||
weechat_prefix ("error"), "irc", "privmsg");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -1884,9 +1899,9 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: channel \"%s\" not found for \"%s\" "
|
||||
_("%s%s: channel \"%s\" not found for \"%s\" "
|
||||
"command"),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
arguments, "privmsg");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
@@ -1953,8 +1968,9 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
if (!pos2)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "privmsg");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"privmsg");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos2[0] = '\0';
|
||||
@@ -1971,8 +1987,9 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
if (!pos_size)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "privmsg");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"privmsg");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos2 = pos_size;
|
||||
@@ -1986,8 +2003,9 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
if (!pos_port)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "privmsg");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"privmsg");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos2 = pos_port;
|
||||
@@ -2001,8 +2019,9 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
if (!pos_addr)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "privmsg");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"privmsg");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos2 = pos_addr;
|
||||
@@ -2030,8 +2049,9 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
if (!pos2)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "privmsg");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"privmsg");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos2[0] = '\0';
|
||||
@@ -2048,8 +2068,9 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
if (!pos_start_resume)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "privmsg");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"privmsg");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos2 = pos_start_resume;
|
||||
@@ -2063,8 +2084,9 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
if (!pos_port)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "privmsg");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"privmsg");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos2 = pos_port;
|
||||
@@ -2090,8 +2112,9 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
if (!pos2)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "privmsg");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"privmsg");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos2[0] = '\0';
|
||||
@@ -2108,8 +2131,9 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
if (!pos_start_resume)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "privmsg");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"privmsg");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos2 = pos_start_resume;
|
||||
@@ -2123,8 +2147,9 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
if (!pos_port)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "privmsg");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"privmsg");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos2 = pos_port;
|
||||
@@ -2150,8 +2175,9 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
if (!pos2)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "privmsg");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"privmsg");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos2[0] = '\0';
|
||||
@@ -2168,8 +2194,9 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
if (!pos_addr)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "privmsg");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"privmsg");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos_addr[0] = '\0';
|
||||
@@ -2182,8 +2209,9 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
if (!pos_port)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "privmsg");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
"privmsg");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos_port[0] = '\0';
|
||||
@@ -2194,9 +2222,9 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
if (weechat_strcasecmp (pos_file, "chat") != 0)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: unknown DCC CHAT type "
|
||||
_("%s%s: unknown DCC CHAT type "
|
||||
"received from %s%s%s: \"%s\""),
|
||||
weechat_prefix ("error"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
IRC_COLOR_CHAT_NICK,
|
||||
nick,
|
||||
IRC_COLOR_CHAT,
|
||||
@@ -2229,9 +2257,10 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
if (!ptr_channel)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot create new "
|
||||
_("%s%s: cannot create new "
|
||||
"private buffer \"%s\""),
|
||||
weechat_prefix ("error"), nick);
|
||||
weechat_prefix ("error"), "irc",
|
||||
nick);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -2342,10 +2371,10 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
if (!ptr_channel)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%s cannot create new "
|
||||
_("%s%s: cannot create new "
|
||||
"private buffer \"%s\""),
|
||||
weechat_prefix ("error"),
|
||||
nick);
|
||||
"irc", nick);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -2395,8 +2424,8 @@ irc_protocol_cmd_privmsg (struct t_irc_server *server, char *irc_message, char *
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "privmsg");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "privmsg");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -2424,8 +2453,8 @@ irc_protocol_cmd_quit (struct t_irc_server *server, char *irc_message, char *hos
|
||||
if (!host)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("irc:%s \"%s\" command received without host"),
|
||||
weechat_prefix ("error"), "quit");
|
||||
_("%s%s: \"%s\" command received without host"),
|
||||
weechat_prefix ("error"), "irc", "quit");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -2540,7 +2569,7 @@ irc_protocol_cmd_server_msg (struct t_irc_server *server, char *irc_message,
|
||||
arguments++;
|
||||
|
||||
/* skip nickname if at beginning of server message */
|
||||
if (strncasecmp (server->nick, arguments, strlen (server->nick)) == 0)
|
||||
if (weechat_strncasecmp (server->nick, arguments, strlen (server->nick)) == 0)
|
||||
{
|
||||
arguments += strlen (server->nick) + 1;
|
||||
while (arguments[0] == ' ')
|
||||
@@ -2578,8 +2607,8 @@ irc_protocol_cmd_topic (struct t_irc_server *server, char *irc_message, char *ho
|
||||
if (!irc_channel_is_channel (arguments))
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: \"%s\" command received without channel"),
|
||||
weechat_prefix ("error"), "topic");
|
||||
_("%s%s: \"%s\" command received without channel"),
|
||||
weechat_prefix ("error"), "irc", "topic");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -2819,8 +2848,8 @@ irc_protocol_cmd_221 (struct t_irc_server *server, char *irc_message, char *host
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "221");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "221");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -3509,19 +3538,19 @@ irc_protocol_cmd_317 (struct t_irc_server *server, char *irc_message, char *host
|
||||
IRC_COLOR_CHAT_CHANNEL,
|
||||
day,
|
||||
IRC_COLOR_CHAT,
|
||||
(day > 1) ? _("days") : _("day"),
|
||||
NG_("day", "days", day),
|
||||
IRC_COLOR_CHAT_CHANNEL,
|
||||
hour,
|
||||
IRC_COLOR_CHAT,
|
||||
(hour > 1) ? _("hours") : _("hour"),
|
||||
NG_("hour", "hours", hour),
|
||||
IRC_COLOR_CHAT_CHANNEL,
|
||||
min,
|
||||
IRC_COLOR_CHAT,
|
||||
(min > 1) ? _("minutes") : _("minute"),
|
||||
NG_("minute", "minutes", min),
|
||||
IRC_COLOR_CHAT_CHANNEL,
|
||||
sec,
|
||||
IRC_COLOR_CHAT,
|
||||
(sec > 1) ? _("seconds") : _("second"),
|
||||
NG_("second", "seconds", sec),
|
||||
IRC_COLOR_CHAT_CHANNEL,
|
||||
ctime (&datetime));
|
||||
}
|
||||
@@ -3539,15 +3568,15 @@ irc_protocol_cmd_317 (struct t_irc_server *server, char *irc_message, char *host
|
||||
IRC_COLOR_CHAT_CHANNEL,
|
||||
hour,
|
||||
IRC_COLOR_CHAT,
|
||||
(hour > 1) ? _("hours") : _("hour"),
|
||||
NG_("hour", "hours", hour),
|
||||
IRC_COLOR_CHAT_CHANNEL,
|
||||
min,
|
||||
IRC_COLOR_CHAT,
|
||||
(min > 1) ? _("minutes") : _("minute"),
|
||||
NG_("minute", "minutes", min),
|
||||
IRC_COLOR_CHAT_CHANNEL,
|
||||
sec,
|
||||
IRC_COLOR_CHAT,
|
||||
(sec > 1) ? _("seconds") : _("second"),
|
||||
NG_("second", "seconds", sec),
|
||||
IRC_COLOR_CHAT_CHANNEL,
|
||||
ctime (&datetime));
|
||||
}
|
||||
@@ -3945,9 +3974,10 @@ irc_protocol_cmd_329 (struct t_irc_server *server, char *irc_message, char *host
|
||||
if (!ptr_channel)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: channel \"%s\" not found for "
|
||||
_("%s%s: channel \"%s\" not found for "
|
||||
"\"%s\" command"),
|
||||
weechat_prefix ("error"), pos_channel, "329");
|
||||
weechat_prefix ("error"), "irc", pos_channel,
|
||||
"329");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -3964,18 +3994,18 @@ irc_protocol_cmd_329 (struct t_irc_server *server, char *irc_message, char *host
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot identify date/time for \"%s\" "
|
||||
_("%s%s: cannot identify date/time for \"%s\" "
|
||||
"command"),
|
||||
weechat_prefix ("error"), "329");
|
||||
weechat_prefix ("error"), "irc", "329");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot identify channel for \"%s\" "
|
||||
_("%s%s: cannot identify channel for \"%s\" "
|
||||
"command"),
|
||||
weechat_prefix ("error"), "329");
|
||||
weechat_prefix ("error"), "irc", "329");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -4015,9 +4045,9 @@ irc_protocol_cmd_331 (struct t_irc_server *server, char *irc_message, char *host
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: channel \"%s\" not found for \"%s\" "
|
||||
_("%s%s: channel \"%s\" not found for \"%s\" "
|
||||
"command"),
|
||||
weechat_prefix ("error"), "", "331");
|
||||
weechat_prefix ("error"), "irc", "", "331");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -4097,9 +4127,9 @@ irc_protocol_cmd_332 (struct t_irc_server *server, char *irc_message, char *host
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot identify channel for \"%s\" "
|
||||
_("%s%s: cannot identify channel for \"%s\" "
|
||||
"command"),
|
||||
weechat_prefix ("error"), "332");
|
||||
weechat_prefix ("error"), "irc", "332");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -4170,9 +4200,9 @@ irc_protocol_cmd_333 (struct t_irc_server *server, char *irc_message, char *host
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot identify channel for \"%s\" "
|
||||
_("%s%s: cannot identify channel for \"%s\" "
|
||||
"command"),
|
||||
weechat_prefix ("error"), "333");
|
||||
weechat_prefix ("error"), "irc", "333");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -4220,7 +4250,7 @@ irc_protocol_cmd_338 (struct t_irc_server *server, char *irc_message, char *host
|
||||
pos_message++;
|
||||
|
||||
weechat_printf (server->buffer,
|
||||
"%s[%s%s%s] %s%s %s%s %s%s\n",
|
||||
"%s[%s%s%s] %s%s %s%s %s%s",
|
||||
IRC_COLOR_CHAT_DELIMITERS,
|
||||
IRC_COLOR_CHAT_NICK,
|
||||
pos_nick,
|
||||
@@ -4291,18 +4321,18 @@ irc_protocol_cmd_341 (struct t_irc_server *server, char *irc_message, char *host
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot identify channel for \"%s\" "
|
||||
_("%s%s: cannot identify channel for \"%s\" "
|
||||
"command"),
|
||||
weechat_prefix ("error"), "341");
|
||||
weechat_prefix ("error"), "irc", "341");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot identify nickname for \"%s\" "
|
||||
_("%s%s: cannot identify nickname for \"%s\" "
|
||||
"command"),
|
||||
weechat_prefix ("error"), "341");
|
||||
weechat_prefix ("error"), "irc", "341");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -4426,8 +4456,8 @@ irc_protocol_cmd_348 (struct t_irc_server *server, char *irc_message, char *host
|
||||
if (!pos_channel)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "348");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "348");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos_channel[0] = '\0';
|
||||
@@ -4440,8 +4470,8 @@ irc_protocol_cmd_348 (struct t_irc_server *server, char *irc_message, char *host
|
||||
if (!pos_exception)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "348");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "348");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos_exception[0] = '\0';
|
||||
@@ -4543,8 +4573,8 @@ irc_protocol_cmd_349 (struct t_irc_server *server, char *irc_message, char *host
|
||||
if (!pos_channel)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "349");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "349");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos_channel[0] = '\0';
|
||||
@@ -4556,8 +4586,8 @@ irc_protocol_cmd_349 (struct t_irc_server *server, char *irc_message, char *host
|
||||
if (!pos_msg)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "349");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "349");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos_msg[0] = '\0';
|
||||
@@ -4811,8 +4841,8 @@ irc_protocol_cmd_353 (struct t_irc_server *server, char *irc_message, char *host
|
||||
if (pos[0] != ':')
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "353");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "353");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -4904,10 +4934,10 @@ irc_protocol_cmd_353 (struct t_irc_server *server, char *irc_message, char *host
|
||||
is_op, is_halfop, has_voice, is_chanuser))
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot create nick \"%s\" "
|
||||
_("%s%s: cannot create nick \"%s\" "
|
||||
"for channel \"%s\""),
|
||||
weechat_prefix ("error"), pos_nick,
|
||||
ptr_channel->name);
|
||||
weechat_prefix ("error"), "irc",
|
||||
pos_nick, ptr_channel->name);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4936,8 +4966,8 @@ irc_protocol_cmd_353 (struct t_irc_server *server, char *irc_message, char *host
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "353");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "353");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
|
||||
@@ -5009,7 +5039,7 @@ irc_protocol_cmd_366 (struct t_irc_server *server, char *irc_message, char *host
|
||||
&num_normal);
|
||||
weechat_printf (ptr_channel->buffer,
|
||||
_("%sChannel %s%s%s: %s%d%s %s %s(%s%d%s %s, "
|
||||
"%s%d%s %s, %s%d%s %s, %s%d%s %s%s)\n"),
|
||||
"%s%d%s %s, %s%d%s %s, %s%d%s %s%s)"),
|
||||
weechat_prefix ("info"),
|
||||
IRC_COLOR_CHAT_CHANNEL,
|
||||
ptr_channel->name,
|
||||
@@ -5083,8 +5113,8 @@ irc_protocol_cmd_367 (struct t_irc_server *server, char *irc_message, char *host
|
||||
if (!pos_channel)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "367");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "367");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos_channel[0] = '\0';
|
||||
@@ -5097,8 +5127,8 @@ irc_protocol_cmd_367 (struct t_irc_server *server, char *irc_message, char *host
|
||||
if (!pos_ban)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "367");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "367");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos_ban[0] = '\0';
|
||||
@@ -5208,8 +5238,8 @@ irc_protocol_cmd_368 (struct t_irc_server *server, char *irc_message, char *host
|
||||
if (!pos_channel)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "368");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "368");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos_channel[0] = '\0';
|
||||
@@ -5221,8 +5251,8 @@ irc_protocol_cmd_368 (struct t_irc_server *server, char *irc_message, char *host
|
||||
if (!pos_msg)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "368");
|
||||
_("%s%s: cannot parse \"%s\" command"),
|
||||
weechat_prefix ("error"), "irc", "368");
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
pos_msg[0] = '\0';
|
||||
@@ -5269,9 +5299,9 @@ irc_protocol_cmd_432 (struct t_irc_server *server, char *irc_message, char *host
|
||||
if (strcmp (server->nick, server->nick1) == 0)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: nickname \"%s\" is invalid, "
|
||||
_("%s%s: nickname \"%s\" is invalid, "
|
||||
"trying 2nd nickname \"%s\""),
|
||||
weechat_prefix ("info"), server->nick,
|
||||
weechat_prefix ("info"), "irc", server->nick,
|
||||
server->nick2);
|
||||
free (server->nick);
|
||||
server->nick = strdup (server->nick2);
|
||||
@@ -5281,9 +5311,9 @@ irc_protocol_cmd_432 (struct t_irc_server *server, char *irc_message, char *host
|
||||
if (strcmp (server->nick, server->nick2) == 0)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: nickname \"%s\" is invalid, "
|
||||
_("%s%s: nickname \"%s\" is invalid, "
|
||||
"trying 3rd nickname \"%s\""),
|
||||
weechat_prefix ("info"), server->nick,
|
||||
weechat_prefix ("info"), "irc", server->nick,
|
||||
server->nick3);
|
||||
free (server->nick);
|
||||
server->nick = strdup (server->nick3);
|
||||
@@ -5293,20 +5323,20 @@ irc_protocol_cmd_432 (struct t_irc_server *server, char *irc_message, char *host
|
||||
if (strcmp (server->nick, server->nick3) == 0)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: all declared nicknames are "
|
||||
_("%s%s: all declared nicknames are "
|
||||
"already in use or invalid, closing "
|
||||
"connection with server!"),
|
||||
weechat_prefix ("error"));
|
||||
weechat_prefix ("error"), "irc");
|
||||
irc_server_disconnect (server, 1);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: nickname \"%s\" is invalid, "
|
||||
_("%s%s: nickname \"%s\" is invalid, "
|
||||
"trying 1st nickname \"%s\""),
|
||||
weechat_prefix ("info"), server->nick,
|
||||
server->nick1);
|
||||
weechat_prefix ("info"), "irc",
|
||||
server->nick, server->nick1);
|
||||
free (server->nick);
|
||||
server->nick = strdup (server->nick1);
|
||||
}
|
||||
@@ -5333,9 +5363,9 @@ irc_protocol_cmd_433 (struct t_irc_server *server, char *irc_message, char *host
|
||||
if (strcmp (server->nick, server->nick1) == 0)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: nickname \"%s\" is already in use, "
|
||||
_("%s%s: nickname \"%s\" is already in use, "
|
||||
"trying 2nd nickname \"%s\""),
|
||||
weechat_prefix ("info"), server->nick,
|
||||
weechat_prefix ("info"), "irc", server->nick,
|
||||
server->nick2);
|
||||
free (server->nick);
|
||||
server->nick = strdup (server->nick2);
|
||||
@@ -5345,9 +5375,10 @@ irc_protocol_cmd_433 (struct t_irc_server *server, char *irc_message, char *host
|
||||
if (strcmp (server->nick, server->nick2) == 0)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: nickname \"%s\" is already in use, "
|
||||
_("%s%s: nickname \"%s\" is already in use, "
|
||||
"trying 3rd nickname \"%s\""),
|
||||
PACKAGE_NAME, server->nick, server->nick3);
|
||||
weechat_prefix ("info"), "irc", server->nick,
|
||||
server->nick3);
|
||||
free (server->nick);
|
||||
server->nick = strdup (server->nick3);
|
||||
}
|
||||
@@ -5356,19 +5387,20 @@ irc_protocol_cmd_433 (struct t_irc_server *server, char *irc_message, char *host
|
||||
if (strcmp (server->nick, server->nick3) == 0)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: all declared nicknames are "
|
||||
_("%s%s: all declared nicknames are "
|
||||
"already in use, closing connection "
|
||||
"with server!"),
|
||||
weechat_prefix ("error"));
|
||||
weechat_prefix ("error"), "irc");
|
||||
irc_server_disconnect (server, 1);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: nickname \"%s\" is already in use, "
|
||||
_("%s%s: nickname \"%s\" is already in use, "
|
||||
"trying 1st nickname \"%s\""),
|
||||
PACKAGE_NAME, server->nick, server->nick1);
|
||||
weechat_prefix ("info"), "irc",
|
||||
server->nick, server->nick1);
|
||||
free (server->nick);
|
||||
server->nick = strdup (server->nick1);
|
||||
}
|
||||
|
||||
@@ -152,24 +152,24 @@ irc_server_init_with_url (struct t_irc_server *server, char *irc_url)
|
||||
irc_server_init (server);
|
||||
ipv6 = 0;
|
||||
ssl = 0;
|
||||
if (strncasecmp (irc_url, "irc6://", 7) == 0)
|
||||
if (weechat_strncasecmp (irc_url, "irc6://", 7) == 0)
|
||||
{
|
||||
pos = irc_url + 7;
|
||||
ipv6 = 1;
|
||||
}
|
||||
else if (strncasecmp (irc_url, "ircs://", 7) == 0)
|
||||
else if (weechat_strncasecmp (irc_url, "ircs://", 7) == 0)
|
||||
{
|
||||
pos = irc_url + 7;
|
||||
ssl = 1;
|
||||
}
|
||||
else if ((strncasecmp (irc_url, "irc6s://", 8) == 0)
|
||||
|| (strncasecmp (irc_url, "ircs6://", 8) == 0))
|
||||
else if ((weechat_strncasecmp (irc_url, "irc6s://", 8) == 0)
|
||||
|| (weechat_strncasecmp (irc_url, "ircs6://", 8) == 0))
|
||||
{
|
||||
pos = irc_url + 8;
|
||||
ipv6 = 1;
|
||||
ssl = 1;
|
||||
}
|
||||
else if (strncasecmp (irc_url, "irc://", 6) == 0)
|
||||
else if (weechat_strncasecmp (irc_url, "irc://", 6) == 0)
|
||||
{
|
||||
pos = irc_url + 6;
|
||||
}
|
||||
@@ -202,8 +202,8 @@ irc_server_init_with_url (struct t_irc_server *server, char *irc_url)
|
||||
else
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: error retrieving user's name: %s"),
|
||||
weechat_prefix ("error"),
|
||||
_("%s%s: error retrieving user's name: %s"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
strerror (errno));
|
||||
free (url);
|
||||
return -1;
|
||||
@@ -426,8 +426,8 @@ irc_server_alloc ()
|
||||
if ((new_server = (struct t_irc_server *)malloc (sizeof (struct t_irc_server))) == NULL)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: error when allocating new server"),
|
||||
weechat_prefix ("error"));
|
||||
_("%s%s: error when allocating new server"),
|
||||
weechat_prefix ("error"), "irc");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -759,19 +759,19 @@ irc_server_send (struct t_irc_server *server, char *buffer, int size_buf)
|
||||
if (!server)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sirc: error sending data to IRC server: null "
|
||||
_("%s%s: error sending data to IRC server: null "
|
||||
"pointer (please report problem to developers)"),
|
||||
weechat_prefix ("error"));
|
||||
weechat_prefix ("error"), "irc");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (size_buf <= 0)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: error sending data to IRC server: empty "
|
||||
_("%s%s: error sending data to IRC server: empty "
|
||||
"buffer (please report problem to "
|
||||
"developers)"),
|
||||
weechat_prefix ("error"));
|
||||
weechat_prefix ("error"), "irc");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -785,8 +785,8 @@ irc_server_send (struct t_irc_server *server, char *buffer, int size_buf)
|
||||
if (rc < 0)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: error sending data to IRC server (%s)"),
|
||||
weechat_prefix ("error"),
|
||||
_("%s%s: error sending data to IRC server (%s)"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
strerror (errno));
|
||||
}
|
||||
|
||||
@@ -829,14 +829,8 @@ irc_server_outqueue_send (struct t_irc_server *server)
|
||||
if (pos)
|
||||
pos[0] = '\r';
|
||||
}
|
||||
if (irc_server_send (server, server->outqueue->message_after_mod,
|
||||
strlen (server->outqueue->message_after_mod)) < 0)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: error sending data to IRC "
|
||||
"server"),
|
||||
weechat_prefix ("error"));
|
||||
}
|
||||
irc_server_send (server, server->outqueue->message_after_mod,
|
||||
strlen (server->outqueue->message_after_mod));
|
||||
server->last_user_message = time_now;
|
||||
irc_server_outqueue_free (server, server->outqueue);
|
||||
}
|
||||
@@ -914,13 +908,7 @@ irc_server_send_one_msg (struct t_irc_server *server, char *message)
|
||||
//if (new_msg)
|
||||
// gui_chat_printf_raw_data (server, 1, 1, ptr_msg);
|
||||
if (irc_server_send (server, buffer, strlen (buffer)) <= 0)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: error sending data to IRC "
|
||||
"server"),
|
||||
weechat_prefix ("error"));
|
||||
rc = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (server->queue_msg)
|
||||
@@ -1048,9 +1036,9 @@ irc_server_msgq_add_msg (struct t_irc_server *server, char *msg)
|
||||
if (!message)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: not enough memory for received IRC "
|
||||
_("%s%s: not enough memory for received IRC "
|
||||
"message"),
|
||||
weechat_prefix ("error"));
|
||||
weechat_prefix ("error"), "irc");
|
||||
return;
|
||||
}
|
||||
message->server = server;
|
||||
@@ -1061,9 +1049,9 @@ irc_server_msgq_add_msg (struct t_irc_server *server, char *msg)
|
||||
if (!message->data)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: not enough memory for received IRC "
|
||||
_("%s%s: not enough memory for received IRC "
|
||||
"message"),
|
||||
weechat_prefix ("error"));
|
||||
weechat_prefix ("error"), "irc");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1108,9 +1096,9 @@ irc_server_msgq_add_unterminated (struct t_irc_server *server, char *string)
|
||||
if (!server->unterminated_message)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: not enough memory for received IRC "
|
||||
_("%s%s: not enough memory for received IRC "
|
||||
"message"),
|
||||
weechat_prefix ("error"));
|
||||
weechat_prefix ("error"), "irc");
|
||||
}
|
||||
else
|
||||
strcat (server->unterminated_message, string);
|
||||
@@ -1121,9 +1109,9 @@ irc_server_msgq_add_unterminated (struct t_irc_server *server, char *string)
|
||||
if (!server->unterminated_message)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: not enough memory for received IRC "
|
||||
_("%s%s: not enough memory for received IRC "
|
||||
"message"),
|
||||
weechat_prefix ("error"));
|
||||
weechat_prefix ("error"), "irc");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1236,25 +1224,26 @@ irc_server_msgq_flush ()
|
||||
{
|
||||
case -1:
|
||||
weechat_printf (irc_recv_msgq->server->buffer,
|
||||
_("%sirc: command \"%s\" "
|
||||
"failed!"),
|
||||
_("%s%s: command \"%s\" "
|
||||
"failed"),
|
||||
weechat_prefix ("error"),
|
||||
command);
|
||||
"irc", command);
|
||||
break;
|
||||
case -2:
|
||||
weechat_printf (irc_recv_msgq->server->buffer,
|
||||
_("%sirc: no command to "
|
||||
"execute!"),
|
||||
weechat_prefix ("error"));
|
||||
_("%s%s: no command to "
|
||||
"execute"),
|
||||
weechat_prefix ("error"),
|
||||
"irc");
|
||||
break;
|
||||
case -3:
|
||||
weechat_printf (irc_recv_msgq->server->buffer,
|
||||
_("%sirc: unknown command: "
|
||||
_("%s%s: unknown command: "
|
||||
"cmd=\"%s\", "
|
||||
"host=\"%s\", "
|
||||
"args=\"%s\""),
|
||||
weechat_prefix ("error"),
|
||||
command, host, args);
|
||||
"irc", command, host, args);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1325,9 +1314,9 @@ irc_server_recv_cb (void *arg_server)
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot read data from socket, "
|
||||
_("%s%s: cannot read data from socket, "
|
||||
"disconnecting from server..."),
|
||||
weechat_prefix ("error"));
|
||||
weechat_prefix ("error"), "irc");
|
||||
irc_server_disconnect (server, 1);
|
||||
}
|
||||
|
||||
@@ -1392,10 +1381,10 @@ irc_server_timer_cb (void *empty)
|
||||
if (diff / 1000 > weechat_config_integer (irc_config_irc_lag_disconnect) * 60)
|
||||
{
|
||||
weechat_printf (ptr_server->buffer,
|
||||
_("%sirc: lag is high, "
|
||||
_("%s%s: lag is high, "
|
||||
"disconnecting from "
|
||||
"server..."),
|
||||
weechat_prefix ("info"));
|
||||
weechat_prefix ("info"), "irc");
|
||||
irc_server_disconnect (ptr_server, 1);
|
||||
}
|
||||
}
|
||||
@@ -1495,9 +1484,11 @@ irc_server_reconnect_schedule (struct t_irc_server *server)
|
||||
{
|
||||
server->reconnect_start = time (NULL);
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: reconnecting to server in %d seconds"),
|
||||
weechat_prefix ("info"),
|
||||
server->autoreconnect_delay);
|
||||
_("%s%s: reconnecting to server in %d %s"),
|
||||
weechat_prefix ("info"), "irc",
|
||||
server->autoreconnect_delay,
|
||||
NG_("second", "seconds",
|
||||
server->autoreconnect_delay));
|
||||
}
|
||||
else
|
||||
server->reconnect_start = 0;
|
||||
@@ -1555,8 +1546,8 @@ irc_server_child_read (void *arg_server)
|
||||
if (gnutls_handshake (server->gnutls_sess) < 0)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: GnuTLS handshake failed"),
|
||||
weechat_prefix ("error"));
|
||||
_("%s%s: GnuTLS handshake failed"),
|
||||
weechat_prefix ("error"), "irc");
|
||||
irc_server_close_connection (server);
|
||||
irc_server_reconnect_schedule (server);
|
||||
return WEECHAT_RC_OK;
|
||||
@@ -1576,9 +1567,9 @@ irc_server_child_read (void *arg_server)
|
||||
case '1':
|
||||
weechat_printf (server->buffer,
|
||||
(config_proxy_use) ?
|
||||
_("%sirc: proxy address \"%s\" not found") :
|
||||
_("%sirc: address \"%s\" not found"),
|
||||
weechat_prefix ("error"),
|
||||
_("%s%s: proxy address \"%s\" not found") :
|
||||
_("%s%s: address \"%s\" not found"),
|
||||
weechat_prefix ("error"), "irc",
|
||||
server->address);
|
||||
irc_server_close_connection (server);
|
||||
irc_server_reconnect_schedule (server);
|
||||
@@ -1587,9 +1578,9 @@ irc_server_child_read (void *arg_server)
|
||||
case '2':
|
||||
weechat_printf (server->buffer,
|
||||
(config_proxy_use) ?
|
||||
_("%sirc: proxy IP address not found") :
|
||||
_("%sirc: IP address not found"),
|
||||
weechat_prefix ("error"));
|
||||
_("%s%s: proxy IP address not found") :
|
||||
_("%s%s: IP address not found"),
|
||||
weechat_prefix ("error"), "irc");
|
||||
irc_server_close_connection (server);
|
||||
irc_server_reconnect_schedule (server);
|
||||
break;
|
||||
@@ -1597,27 +1588,27 @@ irc_server_child_read (void *arg_server)
|
||||
case '3':
|
||||
weechat_printf (server->buffer,
|
||||
(config_proxy_use) ?
|
||||
_("%sirc: proxy connection refused") :
|
||||
_("%sirc: connection refused"),
|
||||
weechat_prefix ("error"));
|
||||
_("%s%s: proxy connection refused") :
|
||||
_("%s%s: connection refused"),
|
||||
weechat_prefix ("error"), "irc");
|
||||
irc_server_close_connection (server);
|
||||
irc_server_reconnect_schedule (server);
|
||||
break;
|
||||
/* proxy fails to connect to server */
|
||||
case '4':
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: proxy fails to establish "
|
||||
_("%s%s: proxy fails to establish "
|
||||
"connection to server "
|
||||
"(check username/password if used)"),
|
||||
weechat_prefix ("error"));
|
||||
weechat_prefix ("error"), "irc");
|
||||
irc_server_close_connection (server);
|
||||
irc_server_reconnect_schedule (server);
|
||||
break;
|
||||
/* fails to set local hostname/IP */
|
||||
case '5':
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: unable to set local hostname/IP"),
|
||||
weechat_prefix ("error"));
|
||||
_("%s%s: unable to set local hostname/IP"),
|
||||
weechat_prefix ("error"), "irc");
|
||||
irc_server_close_connection (server);
|
||||
irc_server_reconnect_schedule (server);
|
||||
break;
|
||||
@@ -2189,18 +2180,18 @@ irc_server_connect (struct t_irc_server *server, int disable_autojoin)
|
||||
if (server->ssl)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot connect with SSL since WeeChat "
|
||||
_("%s%s: cannot connect with SSL since WeeChat "
|
||||
"was not built with GnuTLS support"),
|
||||
weechat_prefix ("error"));
|
||||
weechat_prefix ("error"), "irc");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
if (config_proxy_use)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: connecting to server %s:%d%s%s via %s "
|
||||
_("%s%s: connecting to server %s:%d%s%s via %s "
|
||||
"proxy %s:%d%s..."),
|
||||
weechat_prefix ("info"),
|
||||
weechat_prefix ("info"), "irc",
|
||||
server->address, server->port,
|
||||
(server->ipv6) ? " (IPv6)" : "",
|
||||
(server->ssl) ? " (SSL)" : "",
|
||||
@@ -2219,12 +2210,13 @@ irc_server_connect (struct t_irc_server *server, int disable_autojoin)
|
||||
else
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: connecting to server %s:%d%s%s..."),
|
||||
weechat_prefix ("info"),
|
||||
_("%s%s: connecting to server %s:%d%s%s..."),
|
||||
weechat_prefix ("info"), "irc",
|
||||
server->address, server->port,
|
||||
(server->ipv6) ? " (IPv6)" : "",
|
||||
(server->ssl) ? " (SSL)" : "");
|
||||
weechat_log_printf (_("irc: connecting to server %s:%d%s%s..."),
|
||||
weechat_log_printf (_("%s: connecting to server %s:%d%s%s..."),
|
||||
"irc",
|
||||
server->address, server->port,
|
||||
(server->ipv6) ? " (IPv6)" : "",
|
||||
(server->ssl) ? " (SSL)" : "");
|
||||
@@ -2241,8 +2233,8 @@ irc_server_connect (struct t_irc_server *server, int disable_autojoin)
|
||||
if (gnutls_init (&server->gnutls_sess, GNUTLS_CLIENT) != 0)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: GnuTLS init error"),
|
||||
weechat_prefix ("error"));
|
||||
_("%s%s: GnuTLS init error"),
|
||||
weechat_prefix ("error"), "irc");
|
||||
return 0;
|
||||
}
|
||||
gnutls_set_default_priority (server->gnutls_sess);
|
||||
@@ -2259,8 +2251,8 @@ irc_server_connect (struct t_irc_server *server, int disable_autojoin)
|
||||
if (pipe (child_pipe) < 0)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot create pipe"),
|
||||
weechat_prefix ("error"));
|
||||
_("%s%s: cannot create pipe"),
|
||||
weechat_prefix ("error"), "irc");
|
||||
return 0;
|
||||
}
|
||||
server->child_read = child_pipe[0];
|
||||
@@ -2274,8 +2266,8 @@ irc_server_connect (struct t_irc_server *server, int disable_autojoin)
|
||||
if (server->sock == -1)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot create socket"),
|
||||
weechat_prefix ("error"));
|
||||
_("%s%s: cannot create socket"),
|
||||
weechat_prefix ("error"), "irc");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2285,9 +2277,9 @@ irc_server_connect (struct t_irc_server *server, int disable_autojoin)
|
||||
(void *) &set, sizeof (set)) == -1)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot set socket option "
|
||||
_("%s%s: cannot set socket option "
|
||||
"\"SO_REUSEADDR\""),
|
||||
weechat_prefix ("error"));
|
||||
weechat_prefix ("error"), "irc");
|
||||
}
|
||||
|
||||
/* set SO_KEEPALIVE option for socket */
|
||||
@@ -2296,9 +2288,9 @@ irc_server_connect (struct t_irc_server *server, int disable_autojoin)
|
||||
(void *) &set, sizeof (set)) == -1)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: cannot set socket option "
|
||||
_("%s%s: cannot set socket option "
|
||||
"\"SO_KEEPALIVE\""),
|
||||
weechat_prefix ("error"));
|
||||
weechat_prefix ("error"), "irc");
|
||||
}
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
@@ -2343,8 +2335,8 @@ void
|
||||
irc_server_reconnect (struct t_irc_server *server)
|
||||
{
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: reconnecting to server..."),
|
||||
weechat_prefix ("info"));
|
||||
_("%s%s: reconnecting to server..."),
|
||||
weechat_prefix ("info"), "irc");
|
||||
server->reconnect_start = 0;
|
||||
|
||||
if (irc_server_connect (server, 0))
|
||||
@@ -2391,8 +2383,8 @@ irc_server_disconnect (struct t_irc_server *server, int reconnect)
|
||||
{
|
||||
//irc_nick_free_all (ptr_channel);
|
||||
weechat_printf (ptr_channel->buffer,
|
||||
_("%sirc: disconnected from server!"),
|
||||
weechat_prefix ("info"));
|
||||
_("%s%s: disconnected from server"),
|
||||
weechat_prefix ("info"), "irc");
|
||||
//gui_nicklist_draw (ptr_channel->buffer, 1, 1);
|
||||
//gui_status_draw (ptr_channel->buffer, 1);
|
||||
}
|
||||
@@ -2402,8 +2394,8 @@ irc_server_disconnect (struct t_irc_server *server, int reconnect)
|
||||
|
||||
if (server->buffer)
|
||||
weechat_printf (server->buffer,
|
||||
_("%sirc: disconnected from server!"),
|
||||
weechat_prefix ("info"));
|
||||
_("%s%s: disconnected from server"),
|
||||
weechat_prefix ("info"), "irc");
|
||||
|
||||
if (server->nick_modes)
|
||||
{
|
||||
|
||||
@@ -262,8 +262,8 @@ logger_write_line (struct t_logger_buffer *logger_buffer, char *format, ...)
|
||||
if (!logger_buffer->log_file)
|
||||
{
|
||||
weechat_printf (NULL,
|
||||
_("%sLogger: unable to write log file \"%s\"\n"),
|
||||
weechat_prefix ("error"),
|
||||
_("%s%s: unable to write log file \"%s\""),
|
||||
weechat_prefix ("error"), "Logger",
|
||||
logger_buffer->log_filename);
|
||||
free (logger_buffer->log_filename);
|
||||
logger_buffer->log_filename = NULL;
|
||||
|
||||
@@ -323,12 +323,14 @@ plugin_api_info_get (struct t_weechat_plugin *plugin, char *info)
|
||||
if (!plugin || !info)
|
||||
return NULL;
|
||||
|
||||
/* below are infos that do NOT need server to return info */
|
||||
|
||||
if (string_strcasecmp (info, "version") == 0)
|
||||
{
|
||||
return strdup (PACKAGE_VERSION);
|
||||
}
|
||||
if (string_strcasecmp (info, "date") == 0)
|
||||
{
|
||||
return strdup (__DATE__);
|
||||
}
|
||||
else if (string_strcasecmp (info, "dir_separator") == 0)
|
||||
{
|
||||
return strdup (DIR_SEPARATOR);
|
||||
|
||||
+13
-13
@@ -100,7 +100,7 @@ plugin_load (char *filename)
|
||||
if (!handle)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError: unable to load plugin \"%s\": %s\n"),
|
||||
_("%sError: unable to load plugin \"%s\": %s"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
full_name, dlerror());
|
||||
free (full_name);
|
||||
@@ -114,7 +114,7 @@ plugin_load (char *filename)
|
||||
dlclose (handle);
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError: symbol \"%s\" not found in "
|
||||
"plugin \"%s\", failed to load\n"),
|
||||
"plugin \"%s\", failed to load"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
"plugin_name",
|
||||
full_name);
|
||||
@@ -128,7 +128,7 @@ plugin_load (char *filename)
|
||||
dlclose (handle);
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError: unable to load plugin \"%s\": a plugin "
|
||||
"with same name already exists\n"),
|
||||
"with same name already exists"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
full_name);
|
||||
free (full_name);
|
||||
@@ -142,7 +142,7 @@ plugin_load (char *filename)
|
||||
dlclose (handle);
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError: symbol \"%s\" not found "
|
||||
"in plugin \"%s\", failed to load\n"),
|
||||
"in plugin \"%s\", failed to load"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
"plugin_description",
|
||||
full_name);
|
||||
@@ -157,7 +157,7 @@ plugin_load (char *filename)
|
||||
dlclose (handle);
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError: symbol \"%s\" not found in "
|
||||
"plugin \"%s\", failed to load\n"),
|
||||
"plugin \"%s\", failed to load"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
"plugin_version",
|
||||
full_name);
|
||||
@@ -175,7 +175,7 @@ plugin_load (char *filename)
|
||||
dlclose (handle);
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError: function \"%s\" not "
|
||||
"found in plugin \"%s\", failed to load\n"),
|
||||
"found in plugin \"%s\", failed to load"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
"weechat_plugin_init",
|
||||
full_name);
|
||||
@@ -320,7 +320,7 @@ plugin_load (char *filename)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError: unable to initialize plugin "
|
||||
"\"%s\"\n"),
|
||||
"\"%s\""),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
full_name);
|
||||
plugin_remove (new_plugin);
|
||||
@@ -332,7 +332,7 @@ plugin_load (char *filename)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError: unable to load plugin \"%s\" "
|
||||
"(not enough memory)\n"),
|
||||
"(not enough memory)"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
full_name);
|
||||
free (full_name);
|
||||
@@ -340,7 +340,7 @@ plugin_load (char *filename)
|
||||
}
|
||||
|
||||
gui_chat_printf (NULL,
|
||||
_("%sPlugin \"%s\" %s loaded.\n"),
|
||||
_("%sPlugin \"%s\" %s loaded"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_INFO],
|
||||
name, new_plugin->version);
|
||||
|
||||
@@ -512,7 +512,7 @@ plugin_unload (struct t_weechat_plugin *plugin)
|
||||
plugin_remove (plugin);
|
||||
|
||||
gui_chat_printf (NULL,
|
||||
_("%sPlugin \"%s\" unloaded.\n"),
|
||||
_("%sPlugin \"%s\" unloaded"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_INFO],
|
||||
(name) ? name : "???");
|
||||
if (name)
|
||||
@@ -534,7 +534,7 @@ plugin_unload_name (char *name)
|
||||
else
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError: plugin \"%s\" not found\n"),
|
||||
_("%sError: plugin \"%s\" not found"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
name);
|
||||
}
|
||||
@@ -569,7 +569,7 @@ plugin_reload_name (char *name)
|
||||
{
|
||||
plugin_unload (ptr_plugin);
|
||||
gui_chat_printf (NULL,
|
||||
_("%sPlugin \"%s\" unloaded.\n"),
|
||||
_("%sPlugin \"%s\" unloaded"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_INFO],
|
||||
name);
|
||||
plugin_load (filename);
|
||||
@@ -579,7 +579,7 @@ plugin_reload_name (char *name)
|
||||
else
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError: plugin \"%s\" not found\n"),
|
||||
_("%sError: plugin \"%s\" not found"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user