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)
267267 strNick = szNick;
268268
269269 // Got all required arguments?
270- if (!szHost || !szPort || strNick.empty ())
270+ if (!szHost || strNick.empty ())
271271 {
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>]'" ));
273273 return ;
274274 }
275275
276276 // Verify and convert the port number
277- int iPort = atoi (szPort);
277+ int iPort = szPort ? atoi (szPort) : 22003 ;
278278 if (iPort <= 0 || iPort > 0xFFFF )
279279 {
280280 CCore::GetSingleton ().GetConsole ()->Print (_ (" connect: Bad port number" ));
You can’t perform that action at this time.
0 commit comments