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:
aerkefiende
2010-11-20 15:21:45 +00:00
parent bd7e1e3574
commit 75b71ca05b
+7 -1
View File
@@ -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