Skip to content

Commit

Permalink
fixed one plugin with two init() functions
Browse files Browse the repository at this point in the history
  • Loading branch information
fdChasm committed May 31, 2010
1 parent f4c7611 commit 8515bc6
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/pyscripts/xsbs/users/privilege.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@
}
}

def init():
loadPluginConfig(config, 'UserPrivilege')
config['Templates']['authenticated'] = string.Template(config['Templates']['authenticated'])
config['Templates']['gain_master'] = string.Template(config['Templates']['gain_master'])
config['Templates']['gain_admin'] = string.Template(config['Templates']['gain_admin'])
config['Templates']['release_master'] = string.Template(config['Templates']['release_master'])
config['Templates']['release_admin'] = string.Template(config['Templates']['release_admin'])

USER = 0
MASTER = 1
ADMIN = 2
Expand Down Expand Up @@ -87,6 +79,13 @@ def onRelAdmin(cn):
sbserver.message(info(config['Templates']['release_admin'].substitute(colordict, name=sbserver.playerName(cn))))

def init():
loadPluginConfig(config, 'UserPrivilege')
config['Templates']['authenticated'] = string.Template(config['Templates']['authenticated'])
config['Templates']['gain_master'] = string.Template(config['Templates']['gain_master'])
config['Templates']['gain_admin'] = string.Template(config['Templates']['gain_admin'])
config['Templates']['release_master'] = string.Template(config['Templates']['release_master'])
config['Templates']['release_admin'] = string.Template(config['Templates']['release_admin'])

registerServerEventHandler('player_setmaster', onSetMaster)
registerServerEventHandler('player_setmaster_off', onSetMasterOff)
registerServerEventHandler('player_claimed_master', onGainMaster)
Expand Down

0 comments on commit 8515bc6

Please sign in to comment.