Switch to edit mode.
Name(s): bonk_on_confunc bonk_on_disfunc bonk_on_reconfunc1: if (args[1]:isa($project) || args[1]:isa($webber) || !caller_perms().wizard || args[1]:isa($system_player))
2: return
3: endif
4: cp = connected_players()
5: "Then we can drop perms."
6: set_task_perms($no_one)
7: "It might have been funny the first time, but it's been done now. These jokes should have a suicide switch."
8: "if (ctime()[5..10] == \"Apr 1\")"
9: " \"April Fool's hack!\";"
10: " args[1] = players()[random($)];"
11: "endif"
12: for x in (cp)
13: y = $list_utils:iassoc(x, this.monitoring)
14: ret = 0
15: if (x in this.users)
16: if (!y)
17: ret = 1
18: else
19: if (this.monitoring[y][2])
20: if (!!(#-1 in this.monitoring[y][3]) + !!(args[1] in this.monitoring[y][3]) == 1)
21: ret = 1
22: endif
23: endif
24: endif
25: try
26: if (ret)
27: if (verb == "bonk_on_confunc")
28: msg = "msg_connect"
29: elseif (verb == "bonk_on_reconfunc")
30: msg = "msg_reconnect"
31: elseif (verb == "bonk_on_disfunc")
32: msg = "msg_disconnect"
33: endif
34: $scheduler:run(30.0, x, "tell", {strsub(x:has_property(msg) || ((loc = x:has_verb(msg)) && loc[1] == x) ? x:(msg)(args[1]) | this:(msg)(), "%n", args[1].name)}, $no_one, $no_one)
35: endif
36: except (ANY)
37: "doh..."
38: endtry
39: endif
40: endfor
41: for y in (this.hooks)
42: if (!this:cleanup_hook(@y))
43: $scheduler:run(10.0, this, "do_funky_bonk", {y[1], y[2], {@args, verb}}, $no_one, $no_one)
44: " $scheduler:run(10.0, y[1], y[2], {@args, verb}, $no_one, $no_one);"
45: endif
46: "Above if structure added by Cecil to correct for dead hooked objects."
47: endfor
48: "Thanks to Daryl for customizable connect/disconnect messages."
49: "Removed facility for people to have annoying :title verbs. - whiz"
50: "Last modified by Dax (#789) on Wed Jan 24 17:28:24 2007 EST."