summaryrefslogtreecommitdiff
path: root/src/irc/irc-send.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-10-30 09:56:24 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-10-30 09:56:24 +0000
commit079e4a40281c6e8802885d1331f4c0217addaa19 (patch)
tree5137fffc0ca6ad208fc076cbd0b9c866dce57bf2 /src/irc/irc-send.c
parent24ceb3bb95f41b938a4ac1d10fb36cdd33381bf3 (diff)
downloadweechat-079e4a40281c6e8802885d1331f4c0217addaa19.zip
- added new setting (look_one_server_buffer): use same buffer for all servers
- fixed DCC bug when looking for ports in range
Diffstat (limited to 'src/irc/irc-send.c')
-rw-r--r--src/irc/irc-send.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/src/irc/irc-send.c b/src/irc/irc-send.c
index 9e8e2e0ab..fea02fbbe 100644
--- a/src/irc/irc-send.c
+++ b/src/irc/irc-send.c
@@ -57,7 +57,7 @@ irc_login (t_irc_server *server)
hostname[sizeof (hostname) - 1] = '\0';
if (!hostname[0])
strcpy (hostname, _("unknown"));
- irc_display_prefix (server->buffer, PREFIX_INFO);
+ irc_display_prefix (server, server->buffer, PREFIX_INFO);
gui_printf (server->buffer,
_("%s: using local hostname \"%s\"\n"),
PACKAGE_NAME, hostname);
@@ -109,7 +109,7 @@ irc_cmd_send_ame (t_irc_server *server, char *arguments)
server_sendf (ptr_server, "PRIVMSG %s :\01ACTION %s\01\r\n",
ptr_channel->name,
(arguments && arguments[0]) ? arguments : "");
- irc_display_prefix (ptr_channel->buffer, PREFIX_ACTION_ME);
+ irc_display_prefix (NULL, ptr_channel->buffer, PREFIX_ACTION_ME);
gui_printf_color (ptr_channel->buffer,
COLOR_WIN_CHAT_NICK, "%s", ptr_server->nick);
gui_printf_color (ptr_channel->buffer,
@@ -162,7 +162,7 @@ irc_cmd_send_amsg (t_irc_server *server, char *arguments)
}
else
{
- irc_display_prefix (ptr_server->buffer, PREFIX_ERROR);
+ irc_display_prefix (ptr_server, ptr_server->buffer, PREFIX_ERROR);
gui_printf (ptr_server->buffer,
_("%s cannot find nick for sending message\n"),
WEECHAT_ERROR);
@@ -324,7 +324,7 @@ irc_cmd_send_ban (t_irc_server *server, char *arguments)
{
if (!BUFFER_IS_CHANNEL(gui_current_window->buffer))
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can only be executed in a channel window\n"),
WEECHAT_ERROR, "ban");
@@ -352,7 +352,7 @@ irc_cmd_send_ban (t_irc_server *server, char *arguments)
{
if (!BUFFER_IS_CHANNEL(gui_current_window->buffer))
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can only be executed in a channel window\n"),
WEECHAT_ERROR, "ban");
@@ -400,7 +400,7 @@ irc_cmd_send_ctcp (t_irc_server *server, char *arguments)
pos++;
}
- irc_display_prefix (server->buffer, PREFIX_SERVER);
+ irc_display_prefix (server, server->buffer, PREFIX_SERVER);
gui_printf_color (server->buffer, COLOR_WIN_CHAT, "CTCP");
gui_printf_color (server->buffer, COLOR_WIN_CHAT_DARK, "(");
gui_printf_color (server->buffer, COLOR_WIN_CHAT_NICK, "%s", arguments);
@@ -451,7 +451,7 @@ irc_cmd_send_dcc (t_irc_server *server, char *arguments)
pos_nick = strchr (arguments, ' ');
if (!pos_nick)
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s wrong argument count for \"%s\" command\n"),
WEECHAT_ERROR, "dcc send");
@@ -463,7 +463,7 @@ irc_cmd_send_dcc (t_irc_server *server, char *arguments)
pos_file = strchr (pos_nick, ' ');
if (!pos_file)
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s wrong argument count for \"%s\" command\n"),
WEECHAT_ERROR, "dcc send");
@@ -481,7 +481,7 @@ irc_cmd_send_dcc (t_irc_server *server, char *arguments)
pos_nick = strchr (arguments, ' ');
if (!pos_nick)
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s wrong argument count for \"%s\" command\n"),
WEECHAT_ERROR, "dcc chat");
@@ -504,7 +504,7 @@ irc_cmd_send_dcc (t_irc_server *server, char *arguments)
}
else
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s wrong arguments for \"%s\" command\n"),
WEECHAT_ERROR, "dcc");
@@ -539,7 +539,7 @@ irc_cmd_send_dehalfop (t_irc_server *server, int argc, char **argv)
}
else
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can only be executed in a channel window\n"),
WEECHAT_ERROR, "dehalfop");
@@ -572,7 +572,7 @@ irc_cmd_send_deop (t_irc_server *server, int argc, char **argv)
}
else
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can only be executed in a channel window\n"),
WEECHAT_ERROR, "deop");
@@ -605,7 +605,7 @@ irc_cmd_send_devoice (t_irc_server *server, int argc, char **argv)
}
else
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can only be executed in a channel window\n"),
WEECHAT_ERROR, "devoice");
@@ -653,7 +653,7 @@ irc_cmd_send_halfop (t_irc_server *server, int argc, char **argv)
}
else
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can only be executed in a channel window\n"),
WEECHAT_ERROR, "halfop");
@@ -689,7 +689,7 @@ irc_cmd_send_invite (t_irc_server *server, int argc, char **argv)
{
if (!BUFFER_IS_CHANNEL(gui_current_window->buffer))
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can only be executed in a channel window\n"),
WEECHAT_ERROR, "invite");
@@ -741,7 +741,7 @@ irc_cmd_send_kick (t_irc_server *server, char *arguments)
pos_nick = strchr (arguments, ' ');
if (!pos_nick)
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s wrong arguments for \"%s\" command\n"),
WEECHAT_ERROR, "kick");
@@ -756,7 +756,7 @@ irc_cmd_send_kick (t_irc_server *server, char *arguments)
{
if (!BUFFER_IS_CHANNEL(gui_current_window->buffer))
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can only be executed in a channel window\n"),
WEECHAT_ERROR, "kick");
@@ -798,7 +798,7 @@ irc_cmd_send_kickban (t_irc_server *server, char *arguments)
pos_nick = strchr (arguments, ' ');
if (!pos_nick)
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s wrong arguments for \"%s\" command\n"),
WEECHAT_ERROR, "kickban");
@@ -813,7 +813,7 @@ irc_cmd_send_kickban (t_irc_server *server, char *arguments)
{
if (!BUFFER_IS_CHANNEL(gui_current_window->buffer))
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can only be executed in a channel window\n"),
WEECHAT_ERROR, "kickban");
@@ -905,7 +905,7 @@ irc_send_me (t_irc_server *server, t_irc_channel *channel, char *arguments)
server_sendf (server, "PRIVMSG %s :\01ACTION %s\01\r\n",
channel->name,
(arguments && arguments[0]) ? arguments : "");
- irc_display_prefix (channel->buffer, PREFIX_ACTION_ME);
+ irc_display_prefix (NULL, channel->buffer, PREFIX_ACTION_ME);
gui_printf_color (channel->buffer,
COLOR_WIN_CHAT_NICK, "%s", server->nick);
gui_printf_color (channel->buffer,
@@ -941,7 +941,7 @@ irc_cmd_send_me (t_irc_server *server, char *arguments)
{
if (BUFFER_IS_SERVER(gui_current_window->buffer))
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can not be executed on a server window\n"),
WEECHAT_ERROR, "me");
@@ -1008,7 +1008,7 @@ irc_cmd_send_msg (t_irc_server *server, char *arguments)
{
if (BUFFER_IS_SERVER(gui_current_window->buffer))
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can not be executed on a server window\n"),
WEECHAT_ERROR, "msg *");
@@ -1026,7 +1026,7 @@ irc_cmd_send_msg (t_irc_server *server, char *arguments)
}
else
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (server, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s nick \"%s\" not found for \"%s\" command\n"),
WEECHAT_ERROR, server->nick, "msg");
@@ -1051,7 +1051,7 @@ irc_cmd_send_msg (t_irc_server *server, char *arguments)
}
else
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (server, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s nick \"%s\" not found for \"%s\" command\n"),
WEECHAT_ERROR, server->nick, "msg");
@@ -1080,7 +1080,7 @@ irc_cmd_send_msg (t_irc_server *server, char *arguments)
}
}
}
- irc_display_prefix (server->buffer, PREFIX_SERVER);
+ irc_display_prefix (server, server->buffer, PREFIX_SERVER);
gui_printf_type_color (server->buffer,
MSG_TYPE_NICK,
COLOR_WIN_CHAT_DARK, "-");
@@ -1103,7 +1103,7 @@ irc_cmd_send_msg (t_irc_server *server, char *arguments)
ptr_channel = channel_new (server, CHAT_PRIVATE, arguments, 1);
if (!ptr_channel)
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s cannot create new private window \"%s\"\n"),
WEECHAT_ERROR, arguments);
@@ -1133,7 +1133,7 @@ irc_cmd_send_msg (t_irc_server *server, char *arguments)
}
else
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s wrong argument count for \"%s\" command\n"),
WEECHAT_ERROR, "msg");
@@ -1155,7 +1155,7 @@ irc_cmd_send_names (t_irc_server *server, char *arguments)
{
if (!BUFFER_IS_CHANNEL(gui_current_window->buffer))
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can only be executed in a channel window\n"),
WEECHAT_ERROR, "names");
@@ -1216,7 +1216,7 @@ irc_cmd_send_notice (t_irc_server *server, char *arguments)
pos++;
while (pos[0] == ' ')
pos++;
- irc_display_prefix (server->buffer, PREFIX_SERVER);
+ irc_display_prefix (server, server->buffer, PREFIX_SERVER);
gui_printf_color (server->buffer, COLOR_WIN_CHAT, "notice");
gui_printf_color (server->buffer, COLOR_WIN_CHAT_DARK, "(");
gui_printf_color (server->buffer, COLOR_WIN_CHAT_NICK, "%s", arguments);
@@ -1226,7 +1226,7 @@ irc_cmd_send_notice (t_irc_server *server, char *arguments)
}
else
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s wrong argument count for \"%s\" command\n"),
WEECHAT_ERROR, "notice");
@@ -1253,7 +1253,7 @@ irc_cmd_send_op (t_irc_server *server, int argc, char **argv)
}
else
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can only be executed in a channel window\n"),
WEECHAT_ERROR, "op");
@@ -1301,7 +1301,7 @@ irc_cmd_send_part (t_irc_server *server, char *arguments)
{
if (BUFFER_IS_SERVER(gui_current_window->buffer))
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can not be executed on a server window\n"),
WEECHAT_ERROR, "part");
@@ -1315,7 +1315,7 @@ irc_cmd_send_part (t_irc_server *server, char *arguments)
{
if (BUFFER_IS_SERVER(gui_current_window->buffer))
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can not be executed on a server window\n"),
WEECHAT_ERROR, "part");
@@ -1411,7 +1411,7 @@ irc_cmd_send_query (t_irc_server *server, char *arguments)
ptr_channel = channel_new (server, CHAT_PRIVATE, arguments, 1);
if (!ptr_channel)
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s cannot create new private window \"%s\"\n"),
WEECHAT_ERROR, arguments);
@@ -1659,7 +1659,7 @@ irc_cmd_send_topic (t_irc_server *server, char *arguments)
{
if (BUFFER_IS_SERVER(gui_current_window->buffer))
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can not be executed on a server window\n"),
WEECHAT_ERROR, "topic");
@@ -1732,7 +1732,7 @@ irc_cmd_send_unban (t_irc_server *server, char *arguments)
{
if (!BUFFER_IS_CHANNEL(gui_current_window->buffer))
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can only be executed in a channel window\n"),
WEECHAT_ERROR, "unban");
@@ -1758,7 +1758,7 @@ irc_cmd_send_unban (t_irc_server *server, char *arguments)
}
else
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s wrong argument count for \"%s\" command\n"),
WEECHAT_ERROR, "unban");
@@ -1812,7 +1812,7 @@ irc_cmd_send_version (t_irc_server *server, char *arguments)
}
else
{
- irc_display_prefix (server->buffer, PREFIX_INFO);
+ irc_display_prefix (NULL, server->buffer, PREFIX_INFO);
gui_printf (server->buffer, _("%s, compiled on %s %s\n"),
PACKAGE_STRING,
__DATE__, __TIME__);
@@ -1846,7 +1846,7 @@ irc_cmd_send_voice (t_irc_server *server, int argc, char **argv)
}
else
{
- irc_display_prefix (server->buffer, PREFIX_ERROR);
+ irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
gui_printf_nolog (server->buffer,
_("%s \"%s\" command can only be executed in a channel window\n"),
WEECHAT_ERROR, "voice");