29 activator=Crossfire.WhoIsActivator()
30 activatorname=activator.Name
31 whoami=Crossfire.WhoAmI()
32 isDM=activator.DungeonMaster
37 text = Crossfire.WhatIsMessage().
split()
41 record = log.info(text[1])
44 message =
"I have seen '%s' %d times.\nI saw them last coming from\nIP: %s\non %s." % (text[1],
int(record[
'Login_Count']), record[
'IP'], record[
'Last_Login_Date'])
46 message =
"I have seen '%s' %d times.\nI saw them last at %s." % (text[1],
int(record[
'Login_Count']), record[
'Last_Login_Date'])
48 message =
"I have never seen '%s'." % text[1]
50 message =
'Usage "seen <player>"'
52 elif text[0] ==
'help' or text[0] ==
'yes':
54 message =
"How can I help you? Here is a quick list of commands:\nseen, info, muzzlecount, lastmuzzle, kickcount, lastkick"
56 message =
"I have seen just about everybody - go ahead and ask me."
58 elif text[0] ==
'muzzlecount' and isDM:
60 record = log.info(text[1])
62 message =
"%s has been muzzled %d times" % (text[1],
int(record[
'Muzzle_Count']))
64 message =
"I have no knowledge of '%s'." % text[1]
66 message =
'Usage "muzzlecount <player>"'
68 elif text[0] ==
'lastmuzzle' and isDM:
70 record = log.info(text[1])
72 message =
"%s was last muzzled on %s" % (text[1],record[
'Last_Muzzle_Date'])
74 message =
"I have no knowledge of '%s'." % text[1]
76 message =
'Usage "muzzlestatus <player>"'
78 elif text[0] ==
'kickcount' and isDM:
80 record = log.info(text[1])
82 message =
"%s has been kicked %d times" % (text[1],
int(record[
'Kick_Count']))
84 message =
"I have no knowledge of '%s'." % text[1]
86 message =
'Usage "kickcount <player>"'
88 elif text[0] ==
'lastkick' and isDM:
90 record = log.info(text[1])
92 message =
"%s was last kicked out on %s" % (text[1],record[
'Last_Kick_Date'])
94 message =
"I have no knowledge of '%s'." % text[1]
96 message =
'Usage "lastkick <player>"'
98 elif text[0] ==
'info' and isDM:
100 record = log.info(text[1])
102 message =
"%s" % (record)
104 message =
"I have no knowledge of '%s'." % text[1]
106 message =
'Usage "info <player>"'
108 message =
"Do you need help?"
111 Crossfire.SetReturnValue(1)