Example #1
0
def top_list(clan):
    (executor, caller, enactor) = pennmush.call_info()
    global conn
    if not conn:
        conn = db.get_conn()
    cursor = conn.cursor()
    pennmush.notify([enactor],"Not implemented at present.")
Example #2
0
def colortable():
    from ll import ansistyle
    (executor, caller, enactor) = pennmush.call_info()
    retval = ""
    for i in range(0, 264):
        t = ansistyle.Text(i, str(i))
        retval = retval + " " + t.string()
    pennmush.notify([enactor], retval)
    retval = ""
    for i in range(265, 511):
        t = ansistyle.Text(i, str(i))
        retval = retval + " " + t.string()
    pennmush.notify([enactor], retval)
Example #3
0
def log_view(victim):
    (executor, caller, enactor) = pennmush.call_info()
    victim = int(victim.lstrip("#"))
    global conn
    if not conn:
        conn = db.get_conn()
    cursor = conn.cursor()
    cursor.execute("SELECT delta, balance, description, dt FROM honor_log WHERE victim = " + str(victim) + " ORDER BY dt desc LIMIT 20")
    pennmush.notify([enactor], util.titlebar("Honor Log: " + pennmush.api.name("#" + str(victim))))
    pennmush.notify([enactor], " Date/Time       Change  Balance  Description")
    for (delta, balance, description, dt) in cursor.fetchall():
        pennmush.notify([enactor], " " + dt.strftime("%d/%m/%y %H:%m") + "  " + str(delta).rjust(6) + "  " + str(balance).rjust(7) + "  " + str(description)[:44])
    pennmush.notify([enactor], util.footerbar())
Example #4
0
def test_notify(target, message):
	# FIXME: This isn't how you detect dbrefs for real.
	int_list = [int(pennmush.dbref(dbref)) for dbref in target.split()]
	pennmush.notify(int_list, message)