def cmd_paslap(self, data, client, cmd=None):
"""\
<player> [<ammount>] - (multi)Slap a player.
(You can safely use the command without the 'pa' at the beginning)
"""
# this will split the player name and the message
input = self._adminPlugin.parseUserCmd(data)
if input:
# input[0] is the player id
sclient = self._adminPlugin.findClientPrompt(input[0], client)
if not sclient:
# a player matchin the name was not found, a list of closest matches will be displayed
# we can exit here and the user will retry with a more specific player
return False
else:
client.message('^7Invalid data, try !help paslap')
return False
if input[1]:
try:
x = int(input[1])
except:
client.message('^7Invalid data, try !help paslap')
return False
if x in range(1, 6):
# changed by wursti 07/2011 cause lagi kurwa. sry hardcoded noob. cookie knows whats this about.
thread.start_new_thread(self.multipunish, (x, sclient, client, 'slap'))
else:
client.message('^7Number of punishments out of range, must be 1 to 5 (even for Kampfschlampe)')
else:
self.debug('Performing single slap...')
self.console.write('slap %s' % (sclient.cid))
return True
Who is onlineUsers browsing this forum: No registered users and 55 guests |
Misc
|