VegaStrike Online MMO Server

A forum for online playing, administration, bugs and feature requests
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: VegaStrike Online MMO Server

Post by ezee »

Login works from VS client with plaintext password
So your login is working without have edited manually the password in the table ?
( you entered plaintext version of the password , while the password in the sql table is hashed )

Bad news for windows users ...
I was hoping that there was a bug somewhere in the python code , that forgot to translate
the password hash to string , when the server requested the username and pass .

Thus your server is 100 % working now ? ( i mean account server + vs client working fine )
If it's the case , it's time to invite people for alpha tests ( and see if windows clients can join with their passwords )
:?:

What is weird to me , is that in the file version of accountserver user's storage ,
the login in Vegastrike client was working fine ( the hash translation was done properly ).
I may look to parts of code that deal with files instead of database , and find out what's goin'on .

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: VegaStrike Online MMO Server

Post by ezee »

WOOHOOOOOOOO !!!!

I have fixed my login problem , that was not a code problem , but :
D:\program\experimental\data\cgi-accountserver\db.py:357: Warning: Data truncated for column 'savegame' at row 1
(username, self.modkey, csv, save))
Yeah , i had a 30 chars as buffer size for the user_account key in the sql table .
And the hash code was > 30 ...

I have the same problem with the savegame key , etc ...
SO WARNING :
WHEn YOU SET UP YOUR TABLES , SET THE VARCHAR BUFFER TO 200
( would be better to know the needed size , but for now , works )

Very nice , the code is working good , i will do my tests in better conditions now .
I'm very impatient to test the registration in your server Eye~R !
:wink:

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: VegaStrike Online MMO Server

Post by ezee »

:!: http://vegastrike.armed.me.uk:8080/ is not accessible .

Code: Select all

error code :
 ERR_CONNECTION_RESET.
:cry:

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
Eye~R
Hunter
Hunter
Posts: 70
Joined: Sun Jan 19, 2014 5:02 am

Re: VegaStrike Online MMO Server

Post by Eye~R »

Yeah - fixed that... Spambot(?), unsanitised input, crashed session....

Forgot to c&p the err, and seems it's not logging that output(I had enforced this, seems I forgot when last launched) ... I've little backscroll in my interactions with screen, and starting it up it started spitting my current attemtps to access... but I caught:

File "/usr/lib/python2.7/mimetools.py", line 25, in __init__
rfc822.Message.__init__(self, fp, seekable)
File "/usr/lib/python2.7/rfc822.py", line 108, in __init__
self.readheaders()
File "/usr/lib/python2.7/rfc822.py", line 155, in readheaders
line = self.fp.readline()
File "/usr/lib/python2.7/socket.py", line 447, in readline
data = self._sock.recv(self._rbufsize)
KeyboardInterrupt
----------------------------------------
Possibly of no use tho - I'll quit it now, and get the output logged for next time (because this will happen again).
Multiplayer Server Offline. Copy ony testing rig semi-funcitonal.
User Signup Offline.
Server Health Shows old data from last snapshot before the server downed.

If you have any issues you can usually find me in #vegastrike on freenode.
Eye~R
Hunter
Hunter
Posts: 70
Joined: Sun Jan 19, 2014 5:02 am

Re: VegaStrike Online MMO Server

Post by Eye~R »

Need to find a way to probe both that and vegaserver periodically for response, and should it not get one - restart it
Multiplayer Server Offline. Copy ony testing rig semi-funcitonal.
User Signup Offline.
Server Health Shows old data from last snapshot before the server downed.

If you have any issues you can usually find me in #vegastrike on freenode.
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: VegaStrike Online MMO Server

Post by ezee »

File "/usr/lib/python2.7/mimetools.py", line 25, in __init__
rfc822.Message.__init__(self, fp, seekable)
File "/usr/lib/python2.7/rfc822.py", line 108, in __init__
self.readheaders()
File "/usr/lib/python2.7/rfc822.py", line 155, in readheaders
line = self.fp.readline()
File "/usr/lib/python2.7/socket.py", line 447, in readline
data = self._sock.recv(self._rbufsize)
KeyboardInterrupt
mmm... i have the keyboardInterrupt when i manually stop the python module ( httpserver.py) in my IDE .
More info :
Stupid Python Tricks: The KeyboardInterrupt Exception
Need to find a way to probe both that and vegaserver periodically for response, and should it not get one - restart it
you are talking about the httpserver.py ?

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: VegaStrike Online MMO Server

Post by ezee »

Hey ! i have successfully registered in your server !
:wink:

But the jumps crash vs in my system :
e\src\networking\netclient.cpp:559 Rcvd TCP: CMD_JUMP from serial 0
g\lowlevel\vsnet_sockettcp.cpp:301 Closing connection to server : Warning: disconnected
i will try to set the maximum debug level in vegastrike.cfg to find what's wrong .

:idea: could you put your server port and adress in your signature , please ?
That will help people to join .

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
Eye~R
Hunter
Hunter
Posts: 70
Joined: Sun Jan 19, 2014 5:02 am

Re: VegaStrike Online MMO Server

Post by Eye~R »

HMMM @ Crash.

Will poke logs... logging isn't great tho. be better if could sync your attempts to jump with my observance of log. well, by better I mean easier for me 'cause I'm lazy.

Yeah, the keyb interrupt was me - I useually expect ^c to quit it - but in this instance it seemed to rescue itself.

Just caught something similar in log, Didn't appear to be fatal this time tho.

Code: Select all

91.188.124.225 - - [27/Apr/2014 06:29:02] "GET http://www.google.pl/search?q=wp.pl HTTP/1.1" 404 -
93.174.93.51 - - [27/Apr/2014 10:40:48] code 404, message The requested file /cgi-bin/ was not found.
93.174.93.51 - - [27/Apr/2014 10:40:48] "GET http://ipv4scan.com/hello/check.txt HTTP/1.1" 404 -
91.188.124.225 - - [27/Apr/2014 12:30:04] code 404, message The requested file /cgi-bin/ was not found.
91.188.124.225 - - [27/Apr/2014 12:30:04] "GET http://www.google.pl/search?q=wczasy HTTP/1.1" 404 -
37.59.223.188 - - [27/Apr/2014 15:46:20] code 404, message The requested file /cgi-bin/ was not found.
37.59.223.188 - - [27/Apr/2014 15:46:20] "GET http://37.28.156.211/sprawdza.php HTTP/1.1" 404 -
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 649, in __init__
    self.handle()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 310, in handle_one_request
    self.raw_requestline = self.rfile.readline(65537)
  File "/usr/lib/python2.7/socket.py", line 476, in readline
    data = self._sock.recv(self._rbufsize)
error: [Errno 104] Connection reset by peer
111.73.46.220 - - [27/Apr/2014 17:21:31] code 501, message Unsupported method ('HEAD')
111.73.46.220 - - [27/Apr/2014 17:21:31] "HEAD http://www.baidu.com/ HTTP/1.1" 501 -
95.211.213.17 - - [27/Apr/2014 17:23:46] code 404, message The requested file /cgi-bin/ was not found.
95.211.213.17 - - [27/Apr/2014 17:23:46] "GET http://195.139.39.24/proxyjudge/prxjdg.cgi?ja HTTP/1.1" 404 -
All them IP's are rented services and performing criminal activities so I've not taken the time or care to redact them. Just as I was about to mention as it's showing up in accountserver, it's being specifically directed to 8080 - Then it clicks. 8080 is commonly used for proxy, and previous owners of this IP likely exist in multiple lists... Altering this port to something more obscure should defeat a *lot* of this. Maybe consider deploying a honeypot on port 8080, and generate public blocklists of suspect IP's.

Also great idea about spamming the server in my sig - I'll do that for sure, but tbh right now I'm a touch embarressed of it's visual state - once at least the signup is pretty maybe...
Multiplayer Server Offline. Copy ony testing rig semi-funcitonal.
User Signup Offline.
Server Health Shows old data from last snapshot before the server downed.

If you have any issues you can usually find me in #vegastrike on freenode.
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: VegaStrike Online MMO Server

Post by ezee »

Also great idea about spamming the server in my sig - I'll do that for sure, but tbh right now I'm a touch embarressed of it's visual state - once at least the signup is pretty maybe...
yeah , sounds logical .
Have you fixed your problem with mysql access from php ?
That's the most important thing for now .

Then ... zen ...
I will try to make a php registration page that works with sql , then i'll upload it to you .

The crash on Jump is specific to Windows i guess , so i wait to see if other windows users
have the same problem . I'll work on that later .

My goal is to have a nice front page , with php able to read ships description in the .csv
example found :
<?php
$row = 1;
if (($handle = fopen("test.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$num = count($data);
echo "<p> $num champs à la ligne $row: <br /></p>\n";
$row++;
for ($c=0; $c < $num; $c++) {
echo $data[$c] . "<br />\n";
}
}
fclose($handle);
}
?>
source : http://www.php.net/manual/en/function.fgetcsv.php

edit :

i tried this script with " data\units\units_description.csv .
Works ....
output :
ancestor
The 'ancestors' of the Ancestor class have been flying for hundreds of years. This most recent remodelling of the Shaper's aerospace frame has been in service for 15 years, and has seen action several times in assaults on dirtside criminal bases.
So now the question is :
Should we keep units_description.csv server side , and read on it when needed , or
make a sql table from it ?

The VS server still need this file , but the php web site could have a duplicate in his tables .

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
Eye~R
Hunter
Hunter
Posts: 70
Joined: Sun Jan 19, 2014 5:02 am

Re: VegaStrike Online MMO Server

Post by Eye~R »

ezee wrote:Have you fixed your problem with mysql access from php ?
That's the most important thing for now .
Yup, that's rolling =)
ezee wrote:I will try to make a php registration page that works with sql , then i'll upload it to you .
Great! If you can pull it off faster n me brilliant, I'm still messing around with read before I play with write - want to play with a dummy-table for testing, then need to test inserting users via PHP - Taking the values from the signup and putting them in the user table should be simple enough, it's the account table... Via the .py form, that populates itself... Don't know if that'll happen on it's own with PHP, or if server will do on accnt login....
ezee wrote:The crash on Jump is specific to Windows i guess , so i wait to see if other windows users
have the same problem . I'll work on that later .
Yeah, that's really not acceptable, kinda puts a downer on the game for winhoes users - still, another excuse to avoid winhoes =) Anyone unused to linux is encouraged towards Linux Mint. Good ethics, and good helproom.... </spam>
ezee wrote:Should we keep units_description.csv server side , and read on it when needed , or
make a sql table from it ?

The VS server still need this file , but the php web site could have a duplicate in his tables .
I'm all for migration to DB - But I'm not keen on having redundant duplicates for not much reason... I've no doubt PHP can process CSV nicely, it's me that has the issues =) Could use PHP to build an interface (superuser access only ofc) to not only display these values, but tweak them. Theoretically make long-term expansion easier.(also avoids creating a DB to hold the same data as the CSV file, and worrying about keeping 'em in sync) Could possible form framework for other edits, too, usable in offline-mode, as a kinda "Vegastrike Universe Editor"(obviously, also creating an "easy" deployment/maintainence interface for the MMO) ... Another interesting project...
Multiplayer Server Offline. Copy ony testing rig semi-funcitonal.
User Signup Offline.
Server Health Shows old data from last snapshot before the server downed.

If you have any issues you can usually find me in #vegastrike on freenode.
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: VegaStrike Online MMO Server

Post by ezee »

Another interesting project...
Absolutly .

I've seen that even 3d graphics from vegastrike could be displayed in a browser page .
So with a php script able to read .csv files , an object/universe editor is something that
could works .

I have started to make .obj meshs with mesher , and some .js scripts already can display
them . That is neat , and i really want to try it out this week .
Display the 3d model of the ship when the user select it , it's something i really want to have .

A realtime map of the universe could be done too ...
In fact , i believe that the webgl is the best friend of our MMo project .
example with an error 404 :
http://teampixfx.com/lost

And the best of the best :
https://developer.cdn.mozilla.net/media ... index.html
BananaBread is a 3D first person shooter that runs on the web. It takes the Cube 2: Sauerbraten engine, which is written in C++ and OpenGL, and compiles it using Emscripten into JavaScript and WebGL so that it can run in modern browsers using standards-based web APIs and without the need for plugins.

Mozilla (makers of Firefox) created this project for several reasons. First, to serve as a testcase for running a demanding 3D game in browsers: Having a working testcase lets us try out new browser features and to profile performance in order to make browsers faster. Another goal is to prove that games of this nature can run in JavaScript and WebGL, which many people are skeptical about. Finally, all the code in this project is open (and practically all the art assets), so others can learn from this effort and use this code to create their own browser games.
So even the Terrain/Exploratiion/FPS part of Vegastrike could be into a browser ...

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
Eye~R
Hunter
Hunter
Posts: 70
Joined: Sun Jan 19, 2014 5:02 am

Re: VegaStrike Online MMO Server

Post by Eye~R »

ezee wrote: A realtime map of the universe could be done too ...
I'm liking the sound of this, as that's one of my personal goals for this...

You mention "terrain exploration" - One thing I've noted that Elite had over Vegastrike is you could actually land on planets, just anywhere(not much use for else but mining, maybe awaiting a target to leave a spaceport) or at spaceports... Such a thing is something I would look forwards to - You mention "FPS" ... I think it'd be really cool if smaller ships could disable a larger, say a clydesdale or an opposing factions fighterbase, and invade it. If the crew repel invaders, they keep their ship/station. Should they fail, or the crew surrenders, control is leveraged to the successful assaulters... This could allow for another layer in the piracy angle, and form basis of hostile takeovers between factions - Allowing them to expand through sectors through diplomatic, economic or military means.

Browser implementation though great kind of limits the user... For the above senario of taking a ship, disabling the ship in VS then having to alt-tab to a browser doesn't feel v. professional. This could be possibly implemented into VS itself by inclusion of a simple browser, called at appropriate times and displayed in a similar fashion to the shift-M menu? User can then seamlessly fly, trade, invade...
Multiplayer Server Offline. Copy ony testing rig semi-funcitonal.
User Signup Offline.
Server Health Shows old data from last snapshot before the server downed.

If you have any issues you can usually find me in #vegastrike on freenode.
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: VegaStrike Online MMO Server

Post by ezee »

Yeah , i was thinking to that browser inside VS too .
I know it is possible , i have tried years ago a browser inside of Ogre3D .
The problem here is the memory usage in vegastrike :
textures , meshs are loaded in VS and how much they take in ram is a crucial question .
( well at least for me , with my two gigas on my windows xp ... even if textures are hold in the gpu's memory)

The browser should be displayed once docked , and all the actual base system would exist in the browser . Better graphics would be displayed , without rewriting all the old Vegastrike
code .
Well , some rewrite would be neccessary , like pause the 3d render loop , perhaps also free some ressources .

But before go ahead i want to find a way to have mozilla embded in a c++ application .
And have webgl working with the VegaStrike datas .

Now , a second option is to port all the game in webgl ...
https://developer.cdn.mozilla.net/media ... index.html
Last edited by ezee on Mon Apr 28, 2014 7:00 am, edited 1 time in total.

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
Eye~R
Hunter
Hunter
Posts: 70
Joined: Sun Jan 19, 2014 5:02 am

Re: VegaStrike Online MMO Server

Post by Eye~R »

ezee wrote: But before go ahead i want to find a way to have mozilla embded in a c++ application .
Um, isn't FF already a C++ application? Should certainly be possible... Your memory footprint concerns are also mirrored by myself, also I'm concerned about a full-browser, don't want to end up building something like the steam client, buggy and with insane overheads for what little it's really doing..

The idea of "walkaround mode" once docked is good - but I phear shouldn't be default, should offer it as disembark ship, so there's a "low def mode"(current) to allow for shall we say lesser systems. Options offered in the "walkaround mode" could be implemented with existing features largely(I think), and all stitched together right, should allow for use in either "mode" and gain same net result(just maybe not as pretty).
Multiplayer Server Offline. Copy ony testing rig semi-funcitonal.
User Signup Offline.
Server Health Shows old data from last snapshot before the server downed.

If you have any issues you can usually find me in #vegastrike on freenode.
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: VegaStrike Online MMO Server

Post by ezee »

The idea of "walkaround mode" once docked is good - but I phear shouldn't be default, should offer it as disembark ship, so there's a "low def mode"(current) to allow for shall we say lesser systems. Options offered in the "walkaround mode" could be implemented with existing features largely(I think), and all stitched together right, should allow for use in either "mode" and gain same net result(just maybe not as pretty).
Sure .
But implement the two sides will be time consuming .
I have already played with the c++ Menu system , and to place UI elements is not trivial at all .
Some say python side is better for that , but the guys never done something with it ...
So there is again a lot of experiments to do in that domain .

Today , it seem that i am alone at the code , trying to find solutions at every level .
And i can't be everywhere ...

Even artists have disapeared , DarkVixen is the last still active :
http://forums.vega-strike.org/viewtopic ... 34#p137234
So the future of Vegastrike is more than uncertain .
Like loki said , there will always be old timers in the forum , but like Jacks also said ,
they ' don't put their money where their mouth is" .
:roll:

I'm here since two months , and was looking for partners to play with .
But in this ...
Image
space cemetery , all i want now is repair my ship's jump engine and moove on ...

A web site to give a new life to vega strike is may be for me a jump point .
At least , a waypoint .
:wink:

edit :
Taking the values from the signup and putting them in the user table should be simple enough, it's the account table... Via the .py form, that populates itself... Don't know if that'll happen on it's own with PHP, or if server will do on accnt login....
i missed that from you .
Okay , i'll see that too .
:lol:

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: VegaStrike Online MMO Server

Post by ezee »

So i looked into the db.py , and found that the account table is updated here :
def modify_account(self, username, type="llama.begin", faction="confed"):
self.save_account(username, self.get_default_save(type, faction),
self.get_default_csv(type))
with details implemented here :
def save_account(self, username, save, csv):
#print save
#print csv
if not save:
raise DBError('Empty save file')
elif not csv:
raise DBError('Empty csv file')
c = self.conn.cursor()
whereadd=''
username=username.replace(' ','_')
if self.user_table != self.account_table:
c.execute('SELECT logged_in_server FROM '+self.account_table +
' WHERE username=%s AND modname=%s',
(username, self.modkey))
row = c.fetchone()
if not row:
c.execute('INSERT INTO '+self.account_table +
' (username, modname, csv, savegame, logged_in_server)'+
' VALUES (%s, %s, %s, %s, 0)',
(username, self.modkey, csv, save))
else:
#print ('UPDATE ' + self.account_table +
# ' SET savegame=%s, csv=%s WHERE username=%s AND modname=%s' %
# (save, csv, username, self.modkey))
c.execute('UPDATE ' + self.account_table +
' SET savegame=%s, csv=%s WHERE username=%s AND modname=%s',
(save, csv, username, self.modkey))
else:
c.execute('UPDATE ' +self.user_table+
'SET savegame=%s, csv=%s WHERE username=%s',
(save, csv, username))
3 different queries , 1 create and 2 updates .
We could make that in php , with respect with the conditions .
I don't have checked yet if the VS server is calling save_account , i guess he does .
So php could be used at registration time , then VS server will do the updates , with his connection
to the account server . tho' I need to verify that point .

EDIT :
VERIFIED :
in netserver_accnt.cpp :
bool NetServer::saveAccount( int i )
{
string xmlstr, savestr;
//unsigned int xmllen, savelen, nxmllen, nsavelen;
Cockpit *cp = _Universe->AccessCockpit( i );
//Write the save and xml unit
//FileUtil::WriteSaveFiles( savestr, xmlstr, VSFileSystem::datadir+"/serversaves", cp->savegame->GetCallsign());
//SEND THE BUFFERS TO ACCOUNT SERVER
if (cp && acctserver && acct_con) {
Unit *un = cp->GetParent();
ClientPtr clt;
if (un)
clt = getClientFromSerial( un->GetSerial() );
if (!clt || !un) {
cerr<<"Error client/unit for "<<(clt ? clt->callsign : "")<<", serial "<<(un ? un->GetSerial() : 0)
<<" not found in save process !!!!"<<endl;
return false;
}
if (clt->loginstate < Client::INGAME)
return false; //Cannot save at this point.

SaveNetUtil::GetSaveStrings( i, savestr, xmlstr, true );
if ( savestr.empty() || xmlstr.empty() )
//cerr<<"Unable to generate CSV and Save data for player."<<endl;
return false;
std::string snetbuf;
//Loop through clients to find the one corresponding to the unit (we need its serial)
//Fix CMD_RESPAWN. I expect the client to do the same thing here.
clt->savegame.clear();
clt->savegame.push_back( savestr );
clt->savegame.push_back( xmlstr );

addSimpleChar( snetbuf, ACCT_SAVE );
addSimpleString( snetbuf, clt->callsign );
addSimpleString( snetbuf, clt->passwd );
addSimpleString( snetbuf, savestr );
addSimpleString( snetbuf, xmlstr );
if ( !acct_sock->sendstr( snetbuf ) ) {
COUT<<"ERROR sending SAVE to account server for "<<clt->callsign<<" ("<<un->GetSerial()<<")"<<endl;
return false;
}
{
//Tell client that we saved the game.
Packet p1;
NetBuffer netbuf;
p1.send( CMD_SAVEACCOUNTS, un->GetSerial(), netbuf.getData(), netbuf.getDataLength(),
SENDRELIABLE, NULL, clt->tcp_sock, __FILE__, __LINE__ );
}
return true;
}
return false;
}
In red , the command sent to the account server .
Accountserver.py is listening and react to that command ( line 205 ) :
elif command==ACCT_SAVE:
username=packet.getCheckedString()
password=packet.getCheckedString()
save=packet.getString()
xml=packet.getString()
if conn.check_password(username, password):
conn.save_account(username,save,xml)
printACCT_SUCCESS(conn, username, save)
So yeah , the updates of the accounts are done when clients logout from VS server .
So it seem to me that we can make the first account write in the database with php ,
then let the VS server+Account server do the updates .

We could at any time write to the accounts with php ( superuser ? ), directly to the database , or even by using php sockets and sending a string that contains the ACCT_SAVE:

We just have to do the same than the c++ code :
std::string snetbuf; <---- Standard string
addSimpleChar( snetbuf, ACCT_SAVE );
input += std::string( add, 1 );
addSimpleString( snetbuf, clt->callsign );
addSimpleString( snetbuf, clt->passwd );
addSimpleString( snetbuf, savestr );
addSimpleString( snetbuf, xmlstr );
if ( !acct_sock->sendstr( snetbuf ) ) {
COUT<<"ERROR sending SAVE to account server for "<<clt->callsign<<" ("<<un->GetSerial()<<")"<<endl;
return false;
}
not so complicated .
( in theory :mrgreen: )

Ah , and you need that to compose your messages :
enum accountServerCommands
{
ACCT_LOGIN ='l',
ACCT_NEWCHAR ='c',
ACCT_NEWSUBSCRIBE ='u',
ACCT_LOGIN_DATA ='d',
ACCT_LOGIN_ERROR ='e',
ACCT_LOGIN_ALREADY='f',
ACCT_LOGIN_NEW ='n',
ACCT_LOGIN_ACCEPT ='a',
ACCT_LOGOUT ='o',
ACCT_RESYNC ='r',
ACCT_SAVE='s',
ACCT_SAVE_LOGOUT ='S',
ACCT_SUCCESS ='!',
};

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
Eye~R
Hunter
Hunter
Posts: 70
Joined: Sun Jan 19, 2014 5:02 am

Re: VegaStrike Online MMO Server

Post by Eye~R »

New post to ensure this shows up on everyone's radar in case meer edits don't show as unread.
Server online: vegastrike.armed.me.uk
Default ports

User account creation:http://vegastrike.armed.me.uk/signup.php

Currently, The ship/faction selection options are ineffective. Default ship is the Llama, and default faction is privateer - as per the single player.

As a workaround for the "buy=boom" bug effecting vegaserver(meaning, you buy a ship you die) use: http://vegastrike.armed.me.uk/usership.php

Players required for testing =)
Multiplayer Server Offline. Copy ony testing rig semi-funcitonal.
User Signup Offline.
Server Health Shows old data from last snapshot before the server downed.

If you have any issues you can usually find me in #vegastrike on freenode.
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: VegaStrike Online MMO Server

Post by loki1950 »

Great news Eye-R with the move too github you just might get some traffic 8) for a change.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: VegaStrike Online MMO Server

Post by ezee »

Players required for testing =)
I have started a dedicated project for Vegastrike Evolved MMO.
EMpty now , but there is room for future development .
I'm ok to play the beta tester on your server again .

Edit : I suggest to you to give a step by step instruction on how to connect to your server
from vegastrike in your server site. Not all players are devs ...

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: VegaStrike Online MMO Server

Post by ezee »

I have just opened the wiki for the MMO : https://sourceforge.net/p/vegastrikevo/mmo/wiki/Home/

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
Comstar
Atmospheric Pilot
Atmospheric Pilot
Posts: 1
Joined: Sat Jun 27, 2015 3:12 am

Re: VegaStrike Online MMO Server

Post by Comstar »

Does the server require 5.1 or 5.0 to play multiplayer?

I'm on a mac and I tried connecting to the MMO server but my VS client appears to timeout when trying to login
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: VegaStrike Online MMO Server

Post by loki1950 »

Welcome aboard Comstar that particular sever is most likely not online sorry but haven't heard from the original poster in a year or so ezze may be putting one together for his refactoring effort and his refactor will not run on OSX yet he works on an Win XP platform and has no unix experience so no understanding of and that it is under Apple's functional GUI,hopefully we can get both working soon those of us still active will be helping resolve the platform issues.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
Eye~R
Hunter
Hunter
Posts: 70
Joined: Sun Jan 19, 2014 5:02 am

Re: VegaStrike Online MMO Server

Post by Eye~R »

Sorry, Try now.

Currently it's a touch buggy in many aspects, one of which is every "X" it loses connectivity with the SQL server(Where it holds player save data) - The only workaround I'm having of current is to periodically restart the accountserver. I've been too lazy to automate this, and as no-one's really been using it I've stopped being as rigid with manually restarting. (Now autonomously restarts the accountserver every 8 hrs, seems viable as workaround) That's next on my list of (serious)things to get fixed. Of technical note for the curious, the error it spits is: The SQL server has gone away. As it's there and functional, I'm assuming the connection has become stale. It should be a simple affair to cause it to test and on failure, reconnect - but I lack sufficient grasp of python to do this. To be honest I'm unsure if this issue is in the python or c++ side.

I've not put a great deal of testing into versioning, I'm honestly unsure where I've built the server from now, but I'm able to login with latest. ie: 5.1. Be interesting to know if 5.0 isn't compatible.

Sorry for delays with replies, but knowing there's higher chance of there being messages I'll check this more frequently.
Multiplayer Server Offline. Copy ony testing rig semi-funcitonal.
User Signup Offline.
Server Health Shows old data from last snapshot before the server downed.

If you have any issues you can usually find me in #vegastrike on freenode.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: VegaStrike Online MMO Server

Post by pheonixstorm »

If you make any improvements to the mmo python code add a patch to the VS tracker ( http://sourceforge.net/p/vegastrike/patches/ ) so I can look them over and possibly add them. Same goes for the actual game code. It all needs some serious work that I haven't found much time to do lately.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
Eye~R
Hunter
Hunter
Posts: 70
Joined: Sun Jan 19, 2014 5:02 am

Re: VegaStrike Online MMO Server

Post by Eye~R »

Heh, I'm far too 'tard to actually do anything in the code - at least anything that works. Workarounds is as good as I've got. When it's more refined things like the PHP-based user account generation(to bypass httpaccountserver.py, so it can be locked down) and ship adjustment(to bypass the (player)fatal bug that prevents changing ship) etc that I've done, or had involvement with, will be happily made open.
Multiplayer Server Offline. Copy ony testing rig semi-funcitonal.
User Signup Offline.
Server Health Shows old data from last snapshot before the server downed.

If you have any issues you can usually find me in #vegastrike on freenode.
Post Reply