1
0
mirror of https://github.com/irssi/irssi.git synced 2024-08-11 03:44:15 -04: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:
Timo Sirainen 2002-10-21 19:05:44 +00:00 committed by cras
parent 37995ea05f
commit ca4328e3ab
3 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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;

View File

@ -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) {