Crossfire Server, Trunk
autojail.py
Go to the documentation of this file.
1 import Crossfire
2 
3 who = Crossfire.WhoAmI()
4 
5 if who.DungeonMaster:
6  value = Crossfire.ScriptParameters()
7  dict = Crossfire.GetSharedDictionary()
8  if value == '1':
9  dict['autojail'] = 1
10  who.Message('Autojail enabled')
11  elif value == '0':
12  dict['autojail'] = 0
13  who.Message('Autojail disabled')
14  else:
15  autojail = 0
16  if 'autojail' in dict and dict['autojail'] == 1:
17  autojail = 1
18  who.Message('Autojail is %d'%autojail)