Permalink
Browse files

Make connect cmd defer to the default port

  • Loading branch information...
qaisjp committed Jul 23, 2018
1 parent ed9f3b5 commit d698b5f15a0234e7cb6913a07c11d5e2a62671d3
Showing with 3 additions and 3 deletions.
  1. +3 −3 Client/core/CCommandFuncs.cpp
@@ -267,14 +267,14 @@ void CCommandFuncs::Connect(const char* szParameters)
strNick = szNick;
// Got all required arguments?
if (!szHost || !szPort || strNick.empty())
if (!szHost || strNick.empty())
{
CCore::GetSingleton().GetConsole()->Print(_("connect: Syntax is 'connect <host> <port> [<nick> <pass>]'"));
CCore::GetSingleton().GetConsole()->Print(_("connect: Syntax is 'connect <host> [<port> <nick> <pass>]'"));
return;
}
// Verify and convert the port number
int iPort = atoi(szPort);
int iPort = szPort ? atoi(szPort) : 22003;
if (iPort <= 0 || iPort > 0xFFFF)
{
CCore::GetSingleton().GetConsole()->Print(_("connect: Bad port number"));

0 comments on commit d698b5f

Please sign in to comment.