[Encore] player management
Kevin Jepson
kevijeps at telusplanet.net
Sat Jun 6 20:13:30 MDT 2009
Peter
The traceback would imply that the object numbers are not actually opbject
numbers but simply strings or numbers.
Did you include the # in the list preceding the object numbers?
Ciao
KJ
-----Original Message-----
From: encore-bounces at encore-consortium.org
[mailto:encore-bounces at encore-consortium.org] On Behalf Of Peter Whitehouse
Sent: Saturday, June 06, 2009 7:32 PM
To: pwhitehouse at optusnet.com.au
Cc: encore at encore-consortium.org
Subject: Re: [Encore] player management
Further info:
fails on the if objnum isplayer (line 10 in purge) ... this is odd because
all objects in the purge queue are player (well, builder) object numbers.
Where the @account-adm verb is:
1: "Copyright (C) 1998, Jan Rune Holmevik";
2: this:trust(caller_perms());
3: finished = 0;
4: title = $encore_utils:make_title($network.MOO_name + " User Account
Administration");
5: while (!finished)
6: player:tell_lines(title);
7: if (!this.purge_queue)
8: player:tell("There are no characters in the purging queue");
9: player:tell("");
10: player:tell("1) Find users who was created ",
$time_utils:english_time(7776000), " ago but has never connected");
11: player:tell("2) Find users who has not connected in the last ",
$time_utils:english_time(15638400));
12: player:tell("3) Protect a character from being purged");
13: player:tell("");
14: player:tell("Please enter your choice (1-3) or type Q to quit");
15: choice = read(player);
16: if (choice == "1")
17: this:find_unconnecteds();
18: elseif (choice == "2")
19: this:find_idlers();
20: elseif (choice == "3")
21: this:protect();
22: else
23: player:tell("Exiting.");
24: finished = 1;
25: endif
26: else
27: interval = time() - this.lastrun;
28: elapsed_time = $time_utils:english_time(interval);
29: last_updated = $time_utils:time_sub("$D, $N $T, $Y.", this.lastrun);
30: player:tell("There are currently ", length(this.purge_queue), "
characters in the purging queue, which was compiled ", elapsed_time, " ago,
on ", last_updated);
31: player:tell("");
32: player:tell("1) Display a list of the characters that are up for
purging");
33: player:tell("2) Protect a character from being purged");
34: player:tell("3) Send a purge warning by email to all characters in
the queue.");
35: player:tell("4) Purge all characters in the queue");
36: player:tell("5) Reset purge queue");
37: player:tell("");
38: player:tell("Please enter your choice (1-5) or type Q to quit.");
39: choice = read(player);
40: if (choice == "1")
41: this:report();
42: elseif (choice == "2")
43: this:protect();
44: elseif (choice == "3")
45: this:_send_mail(this.purge_warning);
46: elseif (choice == "4")
47: this:_purge();
48: elseif (choice == "5")
49: this.purge_queue = {};
50: else
51: player:tell("Exiting.");
52: finished = 1;
53: endif
54: endif
55: endwhile
56: "Last modified Sun Jun 7 11:19:02 2009 EST by wOnKo (#8986).";
and the _purge verb is:
1: "Toads and recycles all players in the purge queue.";
2: this:trust(caller_perms());
3: if ($command_utils:yes_or_no(">>> WARNING: This will recycle all
characters in the queue and all their objects. Are you sure you wish to
continue? <<<"))
4: total = 0;
5: bytes = 0;
6: mail = this.goodbye_mail;
7: player:tell("Emailing purge notification");
8: this:_send_mail(mail);
9: for object in (this.purge_queue)
10: if (is_player(object))
11: if ((email = object.email_address) && (current =
$registration_db:find_exact(email)) && (ind = $list_utils:iassoc(object,
current)))
12: current[ind] = {@current[ind], "purged due to inactivity"};
13: $registration_db:insert(email, current);
14: endif
15: $wiz_utils:unset_player(object);
16: endif
17: for x in ({@setremove(object.owned_objects, object), object})
18: if (x.owner == object)
19: player:tell("x ", $building_utils:object_audit_string(x));
20: $command_utils:suspend_if_needed(0);
21: if ($object_utils:has_property(x, "object_size"))
22: bytes = bytes + x.object_size[1];
23: endif
24: $recycler:_recycle(x);
25: total = total + 1;
26: endif
27: endfor
28: this.purge_queue = setremove(this.purge_queue, object);
29: endfor
30: player:tell("Purging complete. ", total, " objects recycled for a
total of ", $string_utils:group_number(bytes), " bytes.");
31: else
32: player:tell("Okay, purging aborted.");
33: endif
34: "Last modified Sun Jun 7 08:58:48 2009 EST by wOnKo (#8986).";
> Peter Whitehouse <pwhitehouse at optusnet.com.au> wrote:
>
> attempting to purge users.
>
> Used @account-admin after loading the object numbers of players that
> need to be purged into the purge queue.
>
> Get the following transcript:
>
> ====================================
> TERRAMOO USER ACCOUNT ADMINISTRATION
> ====================================
> There are currently 1 characters in the purging queue, which was
> compiled 39 years, 5 months, 3 days, 22 hours, 44 minutes, and 53
> seconds ago, on Thursday, January 1, 1970.
>
> 1) Display a list of the characters that are up for purging
> 2) Protect a character from being purged
> 3) Send a purge warning by email to all characters in the queue.
> 4) Purge all characters in the queue
> 5) Reset purge queue
>
> Please enter your choice (1-5) or type Q to quit.
> >>> WARNING: This will recycle all characters in the queue and all
> >>> their
> objects. Are you sure you wish to continue? <<< [Enter `yes' or `no']
> Emailing purge notification Send mail to 1 players? [Enter `yes' or
> `no'] Okay, mail not sent.
> #130:_purge, line 10: Type mismatch
> ... called from #130:@account-adm*inistration, line 47 ... called from
> #6:my_huh (this == #8986), line 26 ... called from #56:do_huh, line 6
> ... called from #1:huh (this == #62), line 2 (End of traceback)
>
> ----------------------------------------------------------------------
> ---
> ---------------------------
>
> the object number of the player (one as a test) was preceded by a #
>
> ...what am I doing wrong - any clues?
>
> I have 700 odd users from cohorts past that need executin', and I am
> trying to avoid doing them one at a time
>
regards,
Peter R Whitehouse *
(AKA wOnKo)
---------------------------------------------------
http://www.wonko.info
*some assembly required
_______________________________________________
Encore mailing list
Encore at encore-consortium.org
http://encore-consortium.org/mailman/listinfo/encore_encore-consortium.org
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.339 / Virus Database: 270.12.54/2157 - Release Date: 06/06/09
18:04:00
More information about the Encore
mailing list