src/tron/gCommandLineJumpStart.h File Reference

#include "tCommandLine.h"
#include "tString.h"
#include "gServerFavorites.h"
#include "nServerInfo.h"
#include "aa_config.h"

Include dependency graph for gCommandLineJumpStart.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gCommandLineJumpStartAnalyzer

Functions

void ExtractConnectionInformation (tString &raw, tString &servername, tString &port)


Function Documentation

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 }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Sat Mar 15 23:14:48 2008 for Armagetron Advanced by  doxygen 1.5.4