mirror of
https://github.com/weechat/weechat.git
synced 2026-07-06 01:33:12 +02:00
irc: use 6697 as default port for SSL servers created with URL "ircs://" (bug #39621)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
WeeChat ChangeLog
|
||||
=================
|
||||
Sébastien Helleu <flashcode@flashtux.org>
|
||||
v0.4.2-dev, 2013-07-28
|
||||
v0.4.2-dev, 2013-07-30
|
||||
|
||||
|
||||
This document lists all changes for each version.
|
||||
@@ -51,6 +51,8 @@ Version 0.4.2 (under dev!)
|
||||
* aspell: rename option aspell.look.color to aspell.color.misspelled, add option
|
||||
aspell.color.suggestions
|
||||
* aspell: add support of enchant library (patch #6858)
|
||||
* irc: use 6697 as default port for SSL servers created with URL "ircs://"
|
||||
(bug #39621)
|
||||
* irc: display number of ops/halfops/voices on channel join only for supported
|
||||
modes on server (bug #39582)
|
||||
* irc: fix self nick color in server messages after nick is changed with /nick
|
||||
|
||||
@@ -1022,6 +1022,7 @@ irc_server_alloc_with_url (const char *irc_url)
|
||||
char *irc_url2, *pos_server, *pos_nick, *pos_password;
|
||||
char *pos_address, *pos_port, *pos_channel, *pos;
|
||||
char *server_address, *server_nicks, *server_autojoin;
|
||||
char default_port[16];
|
||||
int ipv6, ssl, length;
|
||||
struct t_irc_server *ptr_server;
|
||||
|
||||
@@ -1038,6 +1039,8 @@ irc_server_alloc_with_url (const char *irc_url)
|
||||
|
||||
ipv6 = 0;
|
||||
ssl = 0;
|
||||
snprintf (default_port, sizeof (default_port),
|
||||
"%d", IRC_SERVER_DEFAULT_PORT);
|
||||
|
||||
pos_server = strstr (irc_url2, "://");
|
||||
if (!pos_server || !pos_server[3])
|
||||
@@ -1075,6 +1078,12 @@ irc_server_alloc_with_url (const char *irc_url)
|
||||
ssl = 1;
|
||||
}
|
||||
|
||||
if (ssl)
|
||||
{
|
||||
snprintf (default_port, sizeof (default_port),
|
||||
"%d", IRC_SERVER_DEFAULT_PORT_SSL);
|
||||
}
|
||||
|
||||
/* search for nick, password, address+port */
|
||||
pos_address = strchr (pos_server, '@');
|
||||
if (pos_address)
|
||||
@@ -1131,15 +1140,14 @@ irc_server_alloc_with_url (const char *irc_url)
|
||||
if (pos_address && pos_address[0])
|
||||
{
|
||||
length = strlen (pos_address) + 1 +
|
||||
((pos_port) ? strlen (pos_port) : 0) + 1;
|
||||
((pos_port) ? strlen (pos_port) : 16) + 1;
|
||||
server_address = malloc (length);
|
||||
if (server_address)
|
||||
{
|
||||
snprintf (server_address, length,
|
||||
"%s%s%s",
|
||||
"%s/%s",
|
||||
pos_address,
|
||||
(pos_port && pos_port[0]) ? "/" : "",
|
||||
(pos_port && pos_port[0]) ? pos_port : "");
|
||||
(pos_port && pos_port[0]) ? pos_port : default_port);
|
||||
weechat_config_option_set (ptr_server->options[IRC_SERVER_OPTION_ADDRESSES],
|
||||
server_address,
|
||||
1);
|
||||
|
||||
@@ -93,8 +93,9 @@ enum t_irc_server_option
|
||||
weechat_config_string(irc_config_server_default[__index]) \
|
||||
: weechat_config_string_default(irc_config_server_default[__index])))
|
||||
|
||||
#define IRC_SERVER_DEFAULT_PORT 6667
|
||||
#define IRC_SERVER_DEFAULT_NICKS "weechat1,weechat2,weechat3,weechat4,weechat5"
|
||||
#define IRC_SERVER_DEFAULT_PORT 6667
|
||||
#define IRC_SERVER_DEFAULT_PORT_SSL 6697
|
||||
#define IRC_SERVER_DEFAULT_NICKS "weechat1,weechat2,weechat3,weechat4,weechat5"
|
||||
|
||||
/* number of queues for sending messages */
|
||||
#define IRC_SERVER_NUM_OUTQUEUES_PRIO 2
|
||||
|
||||
Reference in New Issue
Block a user