giantsd/plugins/greetings.py

14 lines
382 B
Python

class Greetings:
def __init__(self, server):
self.server = server
def on_player_join(self, player):
self.server.broadcast_message("Welcome "+player.name+"!")
def on_map_change(self, newmap):
self.server.broadcast_message("You are now playing on "+newmap.mapname)
def setup(server):
plugin = Greetings(server)
server.add_plugin(plugin)