summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common.h2
-rw-r--r--src/fe-common/core/fe-common-core.c2
-rw-r--r--src/fe-common/core/fe-server.c2
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) {