View/Edit #5335:@monitor @unmonitor @monitoring

Switch to edit mode.

Name(s): @monitor @unmonitor @monitoring
1:  "Programmed by Daryl (#3887), hacked to itty-bitty bits by whiz.kid (#3135), and further ground and grinded by Raptor (#6319)."
2:  "This verb has several diffrent forms to preform diffrent actions."
3:  "@monitor and @unmonitor will do the obvious thing."
4:  "@[un]monitor <player> will start monitoring or stop monitoring a player."
5:  "@[un]monitor all will turn monitoring everyone on or off."
6:  "@monitoring will list all players you are monitoring."
7:  "Deactivated for the time being by Raptor"
8:  m = (id = $list_utils:iassoc(player, this.monitoring)) ? this.monitoring[id][3] | {}
9:  if (verb == "@monitoring")
10:   if (!m)
11:     return player:tell("You are currently monitoring everyone.")
12:   endif
13:   player:tell("You are monitoring:")
14:   if (#-1 in m)
15:     m = setremove(m, #-1)
16:     player:tell("everyone", m ? " but:" | ".")
17:   endif
18:   player:tell($string_utils:columnize($list_utils:map_verb(m, "title"), 3))
19:   return player:tell("You are ", this.monitoring[id][2] ? "" | "not ", "currently listening to connects and disconnects.")
20: endif
21: q = (verb in {"@unmonitor", "@monitor"}) - 1
22: if (!id)
23:   this.monitoring = {@this.monitoring, {player, 1, {#-1}}}
24:   id = length(this.monitoring)
25: endif
26: if (!argstr)
27:   this.monitoring[id][2] = q
28:   return player:tell("You are ", q ? "" | "not ", "currently listening to connects and disconnects.")
29: endif
30: victim = args[1] == "all" ? #-1 | $string_utils:match_player(args[1])
31: if (victim == $failed_match)
32:   return player:tell(args[1] + " does not exist.")
33: endif
34: if (victim == #-1 && q)
35:   this.monitoring = listdelete(this.monitoring, id)
36:   return player:tell("You are now monitoring everyone.")
37: elseif (victim == #-1 && !q)
38:   this.monitoring[id][3] = {}
39:   return player:tell("All monitors deleted.")
40: elseif (!!(#-1 in this.monitoring[id][3]) == q)
41:   this.monitoring[id][3] = setremove(this.monitoring[id][3], victim)
42:   player:tell("You are now monitoring ", victim:nn(), ".")
43: else
44:   this.monitoring[id][3] = setadd(this.monitoring[id][3], victim)
45:   player:tell("You are now not monitoring ", victim:nn(), ".")
46: endif
47: "Last modified by Raptor (#6319) on Fri Oct 30 16:24:44 1998 EST."

Verb arguments: any none none
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Hacker (#60)

You are not logged in.

[home | help | who | search | setup | code]