Switch to edit mode.
Name(s): @ch*eck-full1: "Copied from Generic Player (#12):@ch by Slacker (#55)Aug 17 20:02:48 1998"
2: if (typeof(this.responsible) != $LIST)
3: this:notify("Hey, someone was mucking about with your .responsible property, and it was probably you. Don't do it again.")
4: this.responsible = {}
5: return
6: endif
7: if (length(verb) <= 6)
8: "@check, not @check-full"
9: n = 5
10: trust = {this, $no_one, $hacker}
11: "... trust no one, my friend.... no one.... --Herod"
12: mistrust = {}
13: for k in (args)
14: if (z = $code_utils:toint(k))
15: n = z
16: elseif (k[1] == "!")
17: mistrust = listappend(mistrust, $string_utils:match_player(k[2..length(k)]))
18: else
19: trust = listappend(trust, $string_utils:match_player(k))
20: endif
21: endfor
22: msg_width = player:linelength() - 60
23: for q in (n > (y = length(z = this.responsible)) ? z | z[y - n + 1..y])
24: msg = tostr(@q[2])
25: if (length(msg) > msg_width)
26: msg = msg[1..msg_width]
27: endif
28: s = this:whodunnit(q[1], trust, mistrust)
29: text = valid(s[1]) ? s[1].name | "** NONE **"
30: this:notify(tostr($string_utils:left(tostr(length(text) > 13 ? text[1..13] | text, " (", s[1], ")"), 20), $string_utils:left(s[2], 15), $string_utils:left(tostr(length(s[3].name) > 13 ? s[3].name[1..13] | s[3].name, " (", s[3], ")"), 20), msg))
31: endfor
32: this:notify("*** finished ***")
33: this.responsible = z
34: else
35: "@check-full, from @traceback by APHiD"
36: matches = {}
37: if (length(match = argstr) == 0)
38: player:notify(tostr("Usage: ", verb, " <string> --or-- ", verb, " <number>"))
39: return
40: endif
41: if (!(responsible = player.responsible))
42: player:notify("No text has been saved by the monitor. (See `help @paranoid').")
43: else
44: if (typeof(x = $code_utils:toint(argstr)) == $ERR)
45: for line in (responsible)
46: if (index(tostr(@line[length(line)]), argstr))
47: matches = {@matches, line}
48: endif
49: endfor
50: else
51: matches = this.responsible[(l = length(this.responsible)) - x + 1..l]
52: endif
53: if (matches)
54: linelength = player:linelength()
55: string_utils = $string_utils
56: list_utils = $list_utils
57: for match in (matches)
58: $command_utils:suspend_if_needed(3)
59: text = tostr(@match[length(match)])
60: player:notify("Traceback for:")
61: player:notify(text)
62: verbwidth = 0
63: for verbitem in (list_utils:slice(mm = listdelete(mm = match[1], length(mm)), 2))
64: verbwidth = max(verbwidth, length(verbitem))
65: endfor
66: numwidth = (linelength - verbwidth) / 4 - 1
67: widths = {numwidth, verbwidth, numwidth, numwidth, numwidth}
68: top = l = between = ""
69: for x in [1..5]
70: top = top + between + string_utils:left({"This", "Verb", "Programmer", "VerbLocation", "Player"}[x], widths[x])
71: l = l + between + string_utils:space(widths[x], "-")
72: between = " "
73: endfor
74: player:notify(top)
75: player:notify(l)
76: for line in (listdelete(mm = match[1], length(mm)))
77: output = {}
78: for bit in [1..5]
79: output = {@output, string_utils:left(typeof(word = line[bit]) == $STR ? word | tostr(word, "(", valid(word) ? list_utils:shortest({word.name, @`word.aliases ! E_PROPNF => {}'}) | (word == $nothing ? "invalid" | (word == $ambiguous_match ? "ambiguous match" | "Error")), ")"), widths[bit]), " "}
80: endfor
81: player:notify(string_utils:trimr(tostr(@output)))
82: endfor
83: player:notify(l)
84: endfor
85: player:notify("**** finished ****")
86: else
87: player:notify(tostr("No matches for \"", argstr, "\" found."))
88: endif
89: endif
90: endif
91: "Last modified by Dax (#789) on Wed May 4 06:46:02 2005 MDT."