26 from time
import localtime, strftime, time
29 date = strftime(
"%a, %d %b %Y %H:%M:%S %Z", localtime(time()))
30 activator = Crossfire.WhoIsActivator()
31 activatorname = activator.Name
32 whoami = Crossfire.WhoAmI()
35 inv = whoami.Inventory
37 text = inv.Name.split()
38 if text[0] ==
'mailscroll' or text[0] ==
'mailwarning':
39 if text[0] ==
'mailscroll':
43 if text[1] ==
'T:' and text[3] ==
'F:':
47 message =
'From: %s\nTo: %s\nDate: %s\n\n%s\n'%(fromname, toname, date, inv.Message[:-1])
48 activator.Write(text[0]+
' to '+toname+
' sent.')
49 mail.send(type, toname, fromname, message)
50 elif text[1] ==
'F:' and text[3] ==
'T:':
54 message = inv.Message[:-1]+
'\n'
55 mail.send(type, toname, fromname, message)