diff options
author | Timo Sirainen <cras@irssi.org> | 2002-10-21 19:05:44 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-10-21 19:05:44 +0000 |
commit | ca4328e3ab57d0c7cb5fa86b3ff21ea27a3165f2 (patch) | |
tree | b464cb22d6c9f10e031ad5b2986e55c1d938aaac /src | |
parent | 37995ea05f77d8ef0fe429362e526e0de7080502 (diff) | |
download | irssi-ca4328e3ab57d0c7cb5fa86b3ff21ea27a3165f2.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/common.h | 2 | ||||
-rw-r--r-- | src/fe-common/core/fe-common-core.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/fe-server.c | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/common.h b/src/common.h index b4e04179..95a49b2f 100644 --- a/src/common.h +++ b/src/common.h @@ -11,6 +11,8 @@ #define IRSSI_GLOBAL_CONFIG "irssi.conf" /* config file name in /etc/ */ #define IRSSI_HOME_CONFIG "config" /* config file name in ~/.irssi/ */ +#define DEFAULT_SERVER_ADD_PORT 6667 + #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/src/fe-common/core/fe-common-core.c b/src/fe-common/core/fe-common-core.c index 32f405ac..aa830350 100644 --- a/src/fe-common/core/fe-common-core.c +++ b/src/fe-common/core/fe-common-core.c @@ -143,7 +143,7 @@ void fe_common_core_init(void) autocon_server = NULL; autocon_password = NULL; - autocon_port = 6667; + autocon_port = 0; no_autoconnect = FALSE; cmdline_nick = NULL; cmdline_hostname = NULL; diff --git a/src/fe-common/core/fe-server.c b/src/fe-common/core/fe-server.c index f452d0a1..fdc676af 100644 --- a/src/fe-common/core/fe-server.c +++ b/src/fe-common/core/fe-server.c @@ -117,7 +117,7 @@ static void cmd_server_add(const char *data) return; 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); if (rec == NULL) { |