forked from hipstercat/giantsd
clean
This commit is contained in:
parent
5007fc4383
commit
aa63bbca39
12
server.py
12
server.py
@ -1,10 +1,8 @@
|
||||
from dpnet.netserver import Netserver
|
||||
from giants.masterserver import MasterServer
|
||||
from utils.logger import setup_logger
|
||||
import asyncio
|
||||
|
||||
logger = setup_logger(__name__)
|
||||
|
||||
num_players_alltime = 0
|
||||
|
||||
class Server:
|
||||
def __init__(self, **kwargs):
|
||||
@ -14,10 +12,12 @@ class Server:
|
||||
|
||||
async def on_connection_received(self, ip, port):
|
||||
version = 1.497
|
||||
server_name = "My server name"
|
||||
player_count = 2
|
||||
server_name = "Hello %s" % ip
|
||||
global num_players_alltime
|
||||
num_players_alltime = num_players_alltime + 1
|
||||
player_count = num_players_alltime
|
||||
max_player_count = 20
|
||||
map_name = "Map name"
|
||||
map_name = "best map ever"
|
||||
return version, server_name, player_count, max_player_count, map_name
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user