31 activator = Crossfire.WhoIsActivator()
32 activatorname = activator.Name
33 whoami = Crossfire.WhoAmI()
35 boardname = Crossfire.ScriptParameters()
38 text = Crossfire.WhatIsMessage().
split(
' ', 1)
40 if text[0] ==
'help' or text[0] ==
'yes':
41 message=
'Help for %s\nList of commands:\n\n- list\n- write <message>\n- remove <id>\n'%boardname
42 activator.Write(message)
44 elif text[0] ==
'write':
46 board.write(boardname, activatorname, text[1])
47 activator.Write(
'Added to %s'%boardname)
49 activator.Write(
'Usage "write <text>"')
51 elif text[0] ==
'list':
52 total = board.countmsg(boardname)
54 activator.Write(
'Content of %s:'%boardname)
55 elements = board.list(boardname)
58 for element
in elements:
59 author, message = element
60 activator.Write(
'<%d> (%s) %s'%(id, author, message))
63 activator.Write(
'%s is empty'%boardname)
65 elif text[0] ==
'remove':
68 if board.getauthor(boardname, index) == activatorname
or activator.DungeonMaster:
69 if board.delete(boardname, index):
70 activator.Write(
'Removed from %s'%boardname)
72 activator.Write(
'Doesn\'t exist on %s'%boardname)
74 activator.Write(
'Access denied')
76 activator.Write(
'Usage "remove <id>"')
79 activator.Write(
'Do you need help?')
82 activator.Write(
'Board Error')