# each player can save a note that only they can see
# add cmd_note to conf/groupdef.dir/default
# initial version feb 7 2005 by smong for asss wiki

from asss import *

chat = get_interface(I_CHAT)

# show and store a note
def c_note(cmd, params, p, targ):
    if len(params) > 0:
        p.note = params
    chat.SendMessage(p, "note: %s" % p.note)

cmd1 = add_command("note", c_note)

# return the data to save for player p
def getpd(p):
    return p.note

# restore the data for player p
def setpd(p, d):
    p.note = d

# reset/clear the data for player p
def clearpd(p):
    p.note = "<not set>"

mypd = reg_player_persistent(
	7890, INTERVAL_FOREVER, PERSIST_GLOBAL,
	getpd, setpd, clearpd)

