Skip to content
Snippets Groups Projects
Commit 5573aec9 authored by Ferenc Schulcz's avatar Ferenc Schulcz
Browse files

Adapt to new registration scheme

parent 9f1dc1f9
No related branches found
No related tags found
No related merge requests found
......@@ -10,14 +10,13 @@ plugin_dir = os.path.dirname(__file__) # parent folder name of the absolute path
RCON_ADDRESS="172.16.25.100"
AUTHME_DB_HOST="172.16.25.101"
def register(add_endpoint, add_postable_endpoint, add_menu):
add_endpoint('minecraft', minecraft)
add_endpoint('map', minecraftmap)
add_postable_endpoint('minecraft_username', minecraft_username)
add_postable_endpoint('minecraft_password', minecraft_password)
add_postable_endpoint('minecraft_register', minecraft_register)
add_menu('minecraft', 'Minecraft', 'minecraft')
add_menu('minecraft', 'Minecraft map', 'map')
def register(add_endpoint):
add_endpoint(endpoint_id='minecraft', handler=minecraft, permission_name='minecraft', menutext='Minecraft')
add_endpoint(endpoint_id='map', handler=minecraftmap, permission_name='minecraft', menutext='Minecraft map')
add_endpoint(endpoint_id='map', handler=minecraftmap, permission_name=None, menutext='Minecraft map') # adding it again for public use
add_endpoint(endpoint_id='minecraft_username', handler=minecraft_username, permission_name='minecraft', method='POST')
add_endpoint(endpoint_id='minecraft_password', handler=minecraft_password, permission_name='minecraft', method='POST')
add_endpoint(endpoint_id='minecraft_register', handler=minecraft_register, permission_name='minecraft', method='POST')
def minecraft(**kwargs):
......
......@@ -9,13 +9,12 @@ import os
plugin_dir = os.path.dirname(__file__) # parent folder name of the absolute path of this file
def register(add_endpoint, add_postable_endpoint, add_menu):
add_endpoint('mcadmin', mcadmin)
add_menu('mcadmin', 'Minecraft admin', 'mcadmin')
add_endpoint('mcban', mcban)
add_endpoint('mcunban', mcunban)
add_postable_endpoint('mcadd', mcadd)
add_endpoint('mcrestart', mcrestart)
def register(add_endpoint):
add_endpoint(endpoint_id='mcadmin', handler=mcadmin, permission_name='mcadmin', menutext='Minecraft admin')
add_endpoint(endpoint_id='mcban', handler=mcban, permission_name='mcadmin')
add_endpoint(endpoint_id='mcunban', handler=mcunban, permission_name='mcadmin')
add_endpoint(endpoint_id='mcadd', handler=mcadd, permission_name='mcadmin', method='POST')
add_endpoint(endpoint_id='mcrestart', handler=mcrestart, permission_name='mcadmin')
def mcadmin(**kwargs):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment