mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Added #define DEFAULT_SERVER_ADD_PORT to common.h which /SERVER ADD uses as
default port. Fixed autoconnecting to use port 0 (default) instead of forced 6667. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2970 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
37995ea05f
commit
ca4328e3ab
@ -11,6 +11,8 @@
|
|||||||
#define IRSSI_GLOBAL_CONFIG "irssi.conf" /* config file name in /etc/ */
|
#define IRSSI_GLOBAL_CONFIG "irssi.conf" /* config file name in /etc/ */
|
||||||
#define IRSSI_HOME_CONFIG "config" /* config file name in ~/.irssi/ */
|
#define IRSSI_HOME_CONFIG "config" /* config file name in ~/.irssi/ */
|
||||||
|
|
||||||
|
#define DEFAULT_SERVER_ADD_PORT 6667
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -143,7 +143,7 @@ void fe_common_core_init(void)
|
|||||||
|
|
||||||
autocon_server = NULL;
|
autocon_server = NULL;
|
||||||
autocon_password = NULL;
|
autocon_password = NULL;
|
||||||
autocon_port = 6667;
|
autocon_port = 0;
|
||||||
no_autoconnect = FALSE;
|
no_autoconnect = FALSE;
|
||||||
cmdline_nick = NULL;
|
cmdline_nick = NULL;
|
||||||
cmdline_hostname = NULL;
|
cmdline_hostname = NULL;
|
||||||
|
@ -117,7 +117,7 @@ static void cmd_server_add(const char *data)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (*addr == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
|
if (*addr == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
|
||||||
port = *portstr == '\0' ? 6667 : atoi(portstr);
|
port = *portstr == '\0' ? DEFAULT_SERVER_ADD_PORT : atoi(portstr);
|
||||||
|
|
||||||
rec = server_setup_find_port(addr, port);
|
rec = server_setup_find_port(addr, port);
|
||||||
if (rec == NULL) {
|
if (rec == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user