Crossfire Server, Trunk
arrest.py
Go to the documentation of this file.
1 """
2 This implements a custom trap that is put under doors in guilds to deal with
3 tailgaters (people without access who follow people with access through doors).
4 
5 This used to do some weird cursing, but it's modern times now so this just
6 sends people to Scorn's jail.
7 """
8 
9 import Crossfire
10 from CFGuildClearance import CheckClearance
11 
12 activator = Crossfire.WhoIsActivator()
13 
14 Crossfire.SetReturnValue(1) # don't run the actual trap
15 
16 Params = Crossfire.ScriptParameters().split()
17 ActionRequired = Params[2] # formerly A for arrest and D for curse, no longer used (always A)
18 
19 if activator is None:
20  pass
21 elif activator.Type != Crossfire.Type.PLAYER:
22  pass
23 elif CheckClearance(Params, activator):
24  pass
25 else:
26  activator.Teleport(Crossfire.ReadyMap('/scorn/misc/jail'), 15, 1) # 15 minute sentence
split
static std::vector< std::string > split(const std::string &field, const std::string &by)
Definition: mapper.cpp:2606
CFGuildClearance.CheckClearance
def CheckClearance(lParams, oActivator)
Definition: CFGuildClearance.py:21