Coder Social home page Coder Social logo

spring / uberserver Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 38.0 2.58 MB

uberserver, a matchmaking/chat lobby server for the spring rts project

Home Page: https://springrts.com/wiki/Uberserver

License: Other

Python 99.61% PHP 0.01% Dockerfile 0.38%

uberserver's Introduction

Spring RTS game engine

Build Status

README

Spring (formerly TASpring) is an Open Source Real Time Strategy game engine. Visit our project homepage for help, suggestions, bugs, community forum and everything spring related.

Compiling

Detailed instructions for how to compile Spring can be found here

The most simple set of commands will be:

cmake .
make

Installation

Usually, you want to use an installer or a package prepared for your OS:

If you want to compile and install from source, please see this wiki page

The most simple set of commands will be:

make install

Using

Use a lobby client for playing single- or multi-player matches. A list of lobbies may be found here

Once you are in-game, Spring games basically work like every other RTS, though it has a LOT of additional ways of control and customizability.

Notes

A more extensive readme can be found here.

uberserver's People

Contributors

a-pavlov avatar abma avatar cleanrock avatar dansan avatar dependabot[bot] avatar histidine91 avatar jamerlan avatar lunixbochs avatar masterbel2 avatar rlcevg avatar silentwings avatar turboss avatar yaribz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uberserver's Issues

delay failed logins

this should reduce login spam problems and maybe motivate bot/lobby devs to fix their code.

also makes password brute force attacks much more difficult.

double time till response each failed login?!

0 seconds
1
2
4
8
...

hmm, take into account that after a total of 60 seconds connection gets dropped

LEFT messages sent for users which are in no channel

(17:05:37) bibim_: 20131015170209 - WARNING - [PerlIRCInterface(23362)] Received a LEFT message for a channel we are not in (RUSSIA)! (bibim_ {Antares [192.168.10.2]})
(17:05:37) bibim_: 20131015170409 - WARNING - [PerlIRCInterface(23362)] Received a LEFT message for a channel we are not in (RUSSIA)! (bibim_ {Antares [192.168.10.2]})
(17:05:37) bibim_: 20131015170412 - WARNING - [PerlIRCInterface(23362)] Received a LEFT message for a channel we are not in (MC)! (bibim_ {Antares [192.168.10.2]})

Insufficient rights: QUIT

telnet lobby.springrts.com 7000
Trying 94.23.170.70...
Connected to springrts.com.
Escape character is '^]'.
TASServer 0.35 91.0 8201 0
QUIT
SERVERMSG QUIT failed. Insufficient rights.

account_id's aren't migrated

uid's are migrated (but it seems they are not needed, as its only some random id by the lobby client)

account_id's are important because these id's are used to map username -> id

GETLOBBYVERSION broken (it seems)

T 94.23.230.207:18886 -> 94.23.170.70:8200 [AP]
GETLOBBYVERSION Pizzaraider.
T 94.23.170.70:8200 -> 94.23.230.207:18886 [AP]
SERVERMSG is using -363551007.

trace in FORCEJOINBATTLE

2013-11-01T08:47:02 ------------------------------------------------------------
2013-11-01T08:47:02 Traceback (most recent call last):
2013-11-01T08:47:02 File "/home/lobby/uberserver/Dispatcher.py", line 39, in callback
2013-11-01T08:47:02 self.socketmap[s].Handle(data)
2013-11-01T08:47:02 File "/home/lobby/uberserver/Client.py", line 143, in Handle
2013-11-01T08:47:02 self._protocol._handle(self,cmd)
2013-11-01T08:47:02 File "/home/lobby/uberserver/protocol/Protocol.py", line 245, in _handle
2013-11-01T08:47:02 function(*([client]+arguments))
2013-11-01T08:47:02 File "/home/lobby/uberserver/protocol/Protocol.py", line 1219, in in_FORCEJOINBATTLE
2013-11-01T08:47:02 battle_id = user.current_battle
2013-11-01T08:47:02 AttributeError: OfflineClient instance has no attribute 'current_battle'
2013-11-01T08:47:02
2013-11-01T08:47:02 ------------------------------------------------------------

clients exiting at the same time trigger an error

when I tell to several autohosts to exit at same time, it seems it triggers an error in uberserver
the first ones exit normally, with the exit message they send just before exiting
but then the others exit with following exit message: FlushBuffer(): Socket error: [Errno 104] Connection reset by peer

login when already logged in problem

I got some error traces with flobby here for a match-maker bot (yami), looks like uberserver can send ADDUSER before REMOVEUSER is sent when the user is currently logged in.

These are the yami traces of my flobby session:
D-10:45:16-Model.cpp:179] message: ADDUSER yami DE 6667
D-10:45:16-Model.cpp:179] message: JOINEDBATTLE 25 yami
D-10:45:16-Model.cpp:179] message: CLIENTSTATUS yami 17
D-10:45:16-Model.cpp:179] message: CLIENTS zk ChanServ [V]sheep niktu biscuit_test detrino vexeli jsamilo TheMooseIsLoose IrishDruid gajop Danzle kdayo sanyc ikinz banana_Ai Southern98 GoogleFrog vulcon sdkfyt32 Gerald [1uP]ledarsi 4hundred Sortale Licho Putkon3n VerLaNei Creepi [TROLL]sfireman yami Nightwatch nassier Sinoe [I]derp exploit dusselduck TheOppositeOfaTroll Anarchid cleanrock
D-10:50:44-Model.cpp:179] message: CLIENTSTATUS yami 16
D-10:55:18-Model.cpp:179] message: CLIENTSTATUS yami 17
D-11:27:22-Model.cpp:179] message: CLIENTSTATUS yami 16
D-11:29:02-Model.cpp:179] message: CLIENTSTATUS yami 17
D-11:31:44-Model.cpp:179] message: ADDUSER yami DE 6667
W-11:31:44-Model.cpp:435] failed to process server msg:'ADDUSER yami DE 6667' (row already exist: yami)
D-11:31:44-Model.cpp:179] message: LEFT zk yami Connection timed out
D-11:31:44-Model.cpp:179] message: LEFTBATTLE 25 yami
W-11:31:44-Model.cpp:435] failed to process server msg:'LEFTBATTLE 25 yami' (void User::leftBattle(const Battle&))
D-11:31:44-Model.cpp:179] message: REMOVEUSER yami
D-11:31:44-Model.cpp:179] message: CLIENTSTATUS yami 16
W-11:31:44-Model.cpp:435] failed to process server msg:'CLIENTSTATUS yami 16' (user not found:yami)
D-11:31:44-Model.cpp:179] message: JOINED zk yami
W-11:31:44-Model.cpp:435] failed to process server msg:'JOINED zk yami' (user not found:yami)
D-11:32:54-Model.cpp:179] message: LEFT zk yami Connection timed out
W-11:32:54-Model.cpp:435] failed to process server msg:'LEFT zk yami Connection timed out' (row not found:yami)
D-11:32:54-Model.cpp:179] message: REMOVEUSER yami
W-11:32:54-Model.cpp:435] failed to process server msg:'REMOVEUSER yami' (user not found:yami)
D-11:33:07-Model.cpp:179] message: ADDUSER yami DE 6667
D-11:33:07-Model.cpp:179] message: CLIENTSTATUS yami 16
D-11:33:07-Model.cpp:179] message: JOINED zk yami
D-11:34:14-Model.cpp:179] message: LEFT zk yami Connection timed out
D-11:34:14-Model.cpp:179] message: REMOVEUSER yami
D-11:34:51-Model.cpp:179] message: ADDUSER yami DE 6667
D-11:34:51-Model.cpp:179] message: CLIENTSTATUS yami 16
D-11:34:51-Model.cpp:179] message: JOINED zk yami
D-11:35:10-Model.cpp:179] message: JOINEDBATTLE 25 yami
D-11:35:13-Model.cpp:179] message: CLIENTSTATUS yami 17

Notice that the second ADDUSER comes before the first REMOVEUSER.

log compatibility flags

so we know which clients needs an update / maybe add a response on login:

please upgrade client when needed.

server doesn't send all ADDUSER on connected

My flobby log clearly shows that all ADDUSER messages are not sent when connecting.
I have logs if needed, github dont support attaching files and i dont want to paste it all here.

server still crashes :-|

fu, crash is still present:
2013-10-19T11:45:14 ------------------------------------------------------------
2013-10-19T11:45:14 Traceback (most recent call last):
2013-10-19T11:45:14 File "server.py", line 90, in
2013-10-19T11:45:14 dispatcher.pump()
2013-10-19T11:45:14 File "/home/lobby/uberserver/Dispatcher.py", line 19, in pump
2013-10-19T11:45:14 self.poller.pump(self.callback)
2013-10-19T11:45:14 File "/home/lobby/uberserver/Multiplexer.py", line 46, in pump
2013-10-19T11:45:14 inputs, outputs, errors = self.poll()
2013-10-19T11:45:14 File "/home/lobby/uberserver/Multiplexer.py", line 86, in poll
2013-10-19T11:45:14 s = self.filenoToSocket[fd]
2013-10-19T11:45:14 KeyError: 122
2013-10-19T11:45:14
2013-10-19T11:45:14 ------------------------------------------------------------

!topic/Chanserv broken

2013-10-07T07:35:03 Traceback (most recent call last):
2013-10-07T07:35:03 File "/home/lobby/uberserver/ChanServ.py", line 22, in Handle
2013-10-07T07:35:03 self.handleSAIDPRIVATE(args)
2013-10-07T07:35:03 File "/home/lobby/uberserver/ChanServ.py", line 32, in handleSAIDPRIVATE
2013-10-07T07:35:03 self.HandleMessage(None, user, msg)
2013-10-07T07:35:03 File "/home/lobby/uberserver/ChanServ.py", line 59, in HandleMessage
2013-10-07T07:35:03 response = self.HandleCommand(chan, user, cmd, args)
2013-10-07T07:35:03 File "/home/lobby/uberserver/ChanServ.py", line 96, in HandleCommand
2013-10-07T07:35:03 self.channeldb.setTopic(client.username, channel, args) # update topic in db
2013-10-07T07:35:03 File "/home/lobby/uberserver/SQLUsers.py", line 531, in setTopic
2013-10-07T07:35:03 entry.topic = topic
2013-10-07T07:35:03 AttributeError: 'NoneType' object has no attribute 'topic'

Closing Lobby and attempt to rejoin fails with User Already Logged in

When closing lobby and u want to rejoin it fails with: "Already Logged in"
I had this problem in the morning and now again, connecting as Chesti.
Some other guy had same issue today
I used flobby he is using ZKLobby.
Trying the same thing with differenct account under springlobby does not fail

error in FINDIP

2013-10-15T05:10:29 ------------------------------------------------------------
2013-10-15T05:10:29 Traceback (most recent call last):
2013-10-15T05:10:29 File "/home/lobby/uberserver/Dispatcher.py", line 39, in callback
2013-10-15T05:10:29 self.socketmap[s].Handle(data)
2013-10-15T05:10:29 File "/home/lobby/uberserver/Client.py", line 144, in Handle
2013-10-15T05:10:29 self._protocol._handle(self,cmd)
2013-10-15T05:10:29 File "/home/lobby/uberserver/protocol/Protocol.py", line 247, in _handle
2013-10-15T05:10:29 function(*([client]+arguments))
2013-10-15T05:10:29 File "/home/lobby/uberserver/protocol/Protocol.py", line 2114, in in_FINDIP
2013-10-15T05:10:29 client.Send('SERVERMSG <%s> was recently bound to %s at %s' % (entry.username, address, entry.last_login.isoformat()))
2013-10-15T05:10:29 AttributeError: 'NoneType' object has no attribute 'isoformat'

FINDIP broken

2013-10-08T23:51:24 ------------------------------------------------------------
2013-10-08T23:51:24 Traceback (most recent call last):
2013-10-08T23:51:24 File "/home/lobby/uberserver/Dispatcher.py", line 39, in callback
2013-10-08T23:51:24 self.socketmap[s].Handle(data)
2013-10-08T23:51:24 File "/home/lobby/uberserver/Client.py", line 145, in Handle
2013-10-08T23:51:24 self._protocol._handle(self,cmd)
2013-10-08T23:51:24 File "/home/lobby/uberserver/protocol/Protocol.py", line 245, in _handle
2013-10-08T23:51:24 function(*([client]+arguments))
2013-10-08T23:51:24 File "/home/lobby/uberserver/protocol/Protocol.py", line 2111, in in_FINDIP
2013-10-08T23:51:24 client.Send('SERVERMSG <%s> was recently bound to %s at %s' % (entry.username, address, time.strftime('%a, %d %b %Y %H:%M:%S GMT', time.gmtime(entry.last_login / 1000))))
2013-10-08T23:51:24 TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'
2013-10-08T23:51:24
2013-10-08T23:51:24 ------------------------------------------------------------

GETIP broken

2013-10-08T23:50:57 Traceback (most recent call last):
2013-10-08T23:50:57 File "/home/lobby/uberserver/Dispatcher.py", line 39, in callback
2013-10-08T23:50:57 self.socketmap[s].Handle(data)
2013-10-08T23:50:57 File "/home/lobby/uberserver/Client.py", line 145, in Handle
2013-10-08T23:50:57 self._protocol._handle(self,cmd)
2013-10-08T23:50:57 File "/home/lobby/uberserver/protocol/Protocol.py", line 245, in _handle
2013-10-08T23:50:57 function(*([client]+arguments))
2013-10-08T23:50:57 File "/home/lobby/uberserver/protocol/Protocol.py", line 2117, in in_GETLASTIP
2013-10-08T23:50:57 return self.in_GETIP(client, username)
2013-10-08T23:50:57 File "/home/lobby/uberserver/protocol/Protocol.py", line 2129, in in_GETIP
2013-10-08T23:50:57 ip = self.userdb.get_ip(username)
2013-10-08T23:50:57 File "/home/lobby/uberserver/SQLUsers.py", line 435, in get_ip
2013-10-08T23:50:57 return entry.last_ip
2013-10-08T23:50:57 AttributeError: 'NoneType' object has no attribute 'last_ip'

remove FORGEREVERSEMSG

its against any convention in the lobbyprotocol.

needed:

FORCEJOIN

the rest has already alternatives:
FORCELEAVECHANNEL
FORCEJOINBATTLE
FORCEQUITBATTLE

ingame + lobby flags lost

Really old accounts like springie lose control over ingame flag and bot flag.

My theory is that ingame time overflows into state flags when sending to clients.
Is that possible?

data loss again!

merge current db and 20130920-05:00-accounts.txt should fix it... / recover missing accounts.

(fuck!)

server crash

2013-10-10T02:17:41 Client disconnected from 94.23.171.71, session ID was 6171: Connection timed out
2013-10-10T02:17:41 Client disconnected from 78.14.230.150, session ID was 6269: Connection timed out
2013-10-10T02:17:41 Client disconnected from 37.59.11.198, session ID was 148: Connection timed out
2013-10-10T02:17:41 Client disconnected from 162.192.73.121, session ID was 4420: Connection timed out
2013-10-10T02:17:41 Client disconnected from 124.185.130.221, session ID was 6742: Connection timed out
2013-10-10T02:17:41 Client disconnected from 98.112.78.238, session ID was 725: Connection timed out
2013-10-10T02:17:41 Client disconnected from 81.57.129.140, session ID was 7289: Connection timed out
2013-10-10T02:17:41 Client disconnected from 94.221.99.232, session ID was 6913: Connection timed out
2013-10-10T02:17:41 Client disconnected from 91.202.45.158, session ID was 6942: Connection timed out
2013-10-10T02:17:41 ------------------------------------------------------------
2013-10-10T02:17:41 Traceback (most recent call last):
2013-10-10T02:17:41 File "server.py", line 90, in
2013-10-10T02:17:41 dispatcher.pump()
2013-10-10T02:17:41 File "/home/lobby/uberserver/Dispatcher.py", line 19, in pump
2013-10-10T02:17:41 self.poller.pump(self.callback)
2013-10-10T02:17:41 File "/home/lobby/uberserver/Multiplexer.py", line 37, in pump
2013-10-10T02:17:41 inputs, outputs, errors = self.poll()
2013-10-10T02:17:41 File "/home/lobby/uberserver/Multiplexer.py", line 129, in poll
2013-10-10T02:17:41 if mask & outMask: outputs.append(self.filenoToSocket[fd])
2013-10-10T02:17:41 KeyError: 160
2013-10-10T02:17:41
2013-10-10T02:17:41 ------------------------------------------------------------
2013-10-10T02:17:41 Deep error, exiting...
2013-10-10T02:17:41 Killing clients.

ghosted users / battles don't dissapear on restart

There is this "feature" called ghosting that makes users (and hosted battles not disappear) under certain conditions.
It happens when i restart springie - suddenly there is 20 battle rooms which arent really running and are just dead ghosts that disappear after about 1h.

It could be fixed by disconnecting clients if they fail to PING/PONG every minutes or so how tasserver did it.

make calls to db more safe

when mysql-server is gone, logout at least should work nicely.

atm it seems the session is not fully closed

2013-10-18T17:48:27 Traceback (most recent call last):
2013-10-18T17:48:27 File "/home/lobby/uberserver/Dispatcher.py", line 39, in callback
2013-10-18T17:48:27 self.socketmap[s].Handle(data)
2013-10-18T17:48:27 File "/home/lobby/uberserver/Client.py", line 144, in Handle
2013-10-18T17:48:27 self._protocol._handle(self,cmd)
2013-10-18T17:48:27 File "/home/lobby/uberserver/protocol/Protocol.py", line 240, in _handle
2013-10-18T17:48:27 function(client)
2013-10-18T17:48:27 File "/home/lobby/uberserver/protocol/Protocol.py", line 2349, in in_EXIT
2013-10-18T17:48:27 optional.str reason: The reason for exiting.
2013-10-18T17:48:27 File "/home/lobby/uberserver/Client.py", line 147, in Remove
2013-10-18T17:48:27 self.handler.finishRemove(self, reason)
2013-10-18T17:48:27 File "/home/lobby/uberserver/Dispatcher.py", line 75, in finishRemove
2013-10-18T17:48:27 client._protocol._remove(client, reason)
2013-10-18T17:48:27 File "/home/lobby/uberserver/protocol/Protocol.py", line 151, in _remove
2013-10-18T17:48:27 self.userdb.end_session(client.db_id)
2013-10-18T17:48:27 File "/home/lobby/uberserver/SQLUsers.py", line 271, in end_session
2013-10-18T17:48:27 entry = session.query(User).filter(User.id==db_id).first()

timeout seems to not always work (some leading tracebacks)

2013-10-18T21:40:09 Client disconnected from 183.245.105.235, session ID was 11654: Connection timed out
2013-10-18T21:40:16 Client disconnected from 109.14.100.122, session ID was 12525: Quit
2013-10-18T21:40:19 Client disconnected from 91.115.222.126, session ID was 11526: Connection timed out
2013-10-18T21:40:19 Client disconnected from 183.245.105.235, session ID was 11654: Connection timed out

Unlicensed code

This repository has no license file.

Instead of going rogue, I'd appreciate if you used a fork of https://github.com/lunixbochs/uberserver and pulled in my MIT LICENSE.

I pulled in all the sane commits from here to master there, and made a branch 'spring' with your non-upstream changes to the server as a single commit on top.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.