URL protocol: assaultcube://
Now assaultcube://example.org:28763 works as port definition as well. git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5914 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+7
-1
@@ -1018,10 +1018,16 @@ void connectprotocol(char *protocolstring, string &servername, string &serverpor
|
||||
int len = 0;
|
||||
direct_connect = false;
|
||||
servername[0] = serverport[0] = password[0] = '\0';
|
||||
while(*c && *c!='/' && *c!='?') { len++; c++; }
|
||||
while(*c && *c!='/' && *c!='?' && *c!=':') { len++; c++; }
|
||||
if(!len) { conoutf("\f3bad commandline syntax", protocolstring); return; }
|
||||
copystring(servername, p, min(len+1, MAXSTRLEN));
|
||||
direct_connect = true;
|
||||
if(*c && *c==':')
|
||||
{
|
||||
c++; p = c; len = 0;
|
||||
while(*c && *c!='/' && *c!='?') { len++; c++; }
|
||||
if(len) copystring(serverport, p, min(len+1, MAXSTRLEN));
|
||||
}
|
||||
if(*c && *c=='/') c++;
|
||||
if(!*c || *c!='?') return;
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user