File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -267,14 +267,14 @@ void CCommandFuncs::Connect(const char* szParameters)
267
267
strNick = szNick;
268
268
269
269
// Got all required arguments?
270
- if (!szHost || !szPort || strNick.empty ())
270
+ if (!szHost || strNick.empty ())
271
271
{
272
- CCore::GetSingleton ().GetConsole ()->Print (_ (" connect: Syntax is 'connect <host> <port> [ <nick> <pass>]'" ));
272
+ CCore::GetSingleton ().GetConsole ()->Print (_ (" connect: Syntax is 'connect <host> [ <port> <nick> <pass>]'" ));
273
273
return ;
274
274
}
275
275
276
276
// Verify and convert the port number
277
- int iPort = atoi (szPort);
277
+ int iPort = szPort ? atoi (szPort) : 22003 ;
278
278
if (iPort <= 0 || iPort > 0xFFFF )
279
279
{
280
280
CCore::GetSingleton ().GetConsole ()->Print (_ (" connect: Bad port number" ));
You can’t perform that action at this time.
0 commit comments