#include "gGame.h"
#include "gCommandLineJumpStart.h"
#include "gLogo.h"
Go to the source code of this file.
Functions | |
void | ExtractConnectionInformation (tString &raw, tString &servername, tString &port) |
raw commandline string store extracted servername here store port here
Definition at line 88 of file gCommandLineJumpStart.cpp.
References tString::Len(), tString::RemoveSubStr(), tString::StartsWith(), and tString::SubStr().
Referenced by gCommandLineJumpStartAnalyzer::Connect(), and AAURLHandler::connectToServer:.
00089 { 00090 // BUG: case sensitive 00091 if ( raw.StartsWith("armagetronad://") ) 00092 { 00093 raw.RemoveSubStr(0, 15); 00094 } 00095 00096 int portStart = strcspn( raw, ":" ); 00097 // Is a port given? 00098 if ( portStart != raw.Len() - 1 ) 00099 { 00100 servername = raw.SubStr( 0, portStart ); 00101 port = raw.SubStr( portStart + 1 ); 00102 } 00103 else 00104 { 00105 servername = raw; 00106 port = "4534"; 00107 } 00108 }