Placeholder packages for game handlers

This commit is contained in:
Ben 2019-04-25 17:30:59 +01:00
parent d0e67ba14c
commit cf1c41ecd8
30 changed files with 6 additions and 13 deletions

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@ -1,9 +1,14 @@
from Houdini import Handlers
from Houdini.Handlers import XMLPacket
from Houdini.Converters import CredentialsConverter
from Houdini.Converters import CredentialsConverter, VersionChkConverter
@Handlers.handler(XMLPacket('login'))
async def handle_login(p, credentials: CredentialsConverter):
username, password = credentials
p.logger.info('{}:{} is logging in!'.format(username, password))
@Handlers.handler(XMLPacket('verChk'))
async def handle_version_check(p, version: VersionChkConverter):
p.logger.info('Version: {}'.format(version))

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@ -1,12 +0,0 @@
from Houdini.Handlers import Handlers, XTPacket
from Houdini.Converters import RoomConverter
@Handlers.handler(XTPacket('j', 'js'))
async def handle_join_world(p, is_moderator: bool, is_mascot: bool, is_member: bool):
print(p, is_moderator, is_mascot, is_member)
@Handlers.handler(XTPacket('j', 'jr'))
async def handle_join_room(p, room: RoomConverter):
print(room)

View File

View File

View File

View File

View File

View File

View File

View File