Compare commits

...

3 Commits

Author SHA1 Message Date
deed239fdf docs: All programmers by default 2025-09-06 12:58:26 +00:00
c9f994063a Make users programmer by default 2025-09-06 12:55:26 +00:00
0c9b3c0152 Revert "tilde_utils: Add set_programmer"
This reverts commit 9ff42a234f3f70b0ef888a3854f3f5795df9cc30.
2025-09-06 12:49:34 +00:00
4 changed files with 8 additions and 42 deletions

View File

@ -15,10 +15,6 @@ Quickstart:
- `@audit` to see a list of all objects you own.
- Check `news` and `help` for LOADS MORE.
(Note: You'll need to be registered as a programmer in order to create things.
I'd like for this to be automatic, but I don't know how to do that, so
unfortunately it's manual. Ask in #moo!)
## What is this?
It's a MOO, which is a kind of text-based virtual reality. Part chatroom, part

View File

@ -13,6 +13,10 @@
@make-guest Yellow
# At least one guest needs an alias "Guest"
@addalias "Guest" to #127
# Make everyone is a programmer by default
# Was #40 (Generic Mail Receiving Player)
$player_class=$prog
```
## Other notes

View File

@ -5,6 +5,7 @@
- `;set_property_info(#136, "exits", {#ROOM_ID, "rwc"})`
- [ ] Enable colors by default
- `@ansi-option +all`
- [ ] Make everyone programmers by default
- [X] Make everyone programmers by default
- `@programmer USERNAME`
- [ ] Grant access to `curl` and `exec` by default
- [X] Grant access to `curl` and `exec` by default
- DONE: `$tilde_utils:curl` and `$tilde_utils:exec`

View File

@ -2,7 +2,7 @@
@property #0.tilde_utils #170
@describe $tilde_utils as "This is the Tilde Utilities utility package. See `help $tilde_utils' for more details."
@set $tilde_utils.help_msg to {"Mirrored functions:", " curl (STR <url> [, INT <include_headers>, INT timeout]) -- See `help curl()`", " exec (LIST command[, STR input][, LIST environment variables]) -- See `help eval()`", "", "$wiz_utils:", "", ":set_programmer(object) object.programmer = 1;"," chparent object to $prog", " send mail to $prog_log"}
@set $tilde_utils.help_msg to {"Mirrored functions:", " curl (STR <url> [, INT <include_headers>, INT timeout]) -- See `help curl()`", " exec (LIST command[, STR input][, LIST environment variables]) -- See `help eval()`"}
@verb $tilde_utils:exec tnt
@program $tilde_utils:exec
@ -27,38 +27,3 @@ else
return curl (url);
endif
.
@verb $tilde_utils:set_programmer tnt
@program $tilde_utils:set_programmer
"This code is taken from $wiz_utils:set_programmer, but has the wiz check removed, and a guest check added.";
":set_programmer(victim[,mail from]) => 1 or error.";
"Sets victim.programmer, chparents victim to $prog if necessary, and sends mail to $new_prog_log, mail is from optional second arg or caller_perms().";
whodunnit = caller_perms();
{victim, ?mailfrom = whodunnit} = args;
if (!(valid(victim) && (is_player(victim) && $object_utils:isa(victim, $player))))
return E_INVARG;
elseif ($object_utils:isa(victim, $guest))
return E_INVARG;
elseif (victim.programmer)
return E_NONE;
elseif ($wiz_utils:check_prog_restricted(victim))
return E_INVARG;
elseif (typeof(e = `victim.programmer = 1 ! ANY') == ERR)
return e;
else
$quota_utils:adjust_quota_for_programmer(victim);
if (!$object_utils:isa(victim, $prog))
if (typeof(e = `chparent(victim, $prog) ! ANY') == ERR)
"...this isn't really supposed to happen but it could...";
player:notify(tostr("chparent(", victim, ",", $prog, ") failed: ", e));
player:notify("Check for common properties.");
endif
else
player:notify(tostr(victim.name, " was already a child of ", parent(victim).name, " (", parent(victim), ")"));
endif
if (!$mail_agent:send_message(mailfrom, {$new_prog_log, victim}, tostr("@programmer ", victim.name, " (", victim, ")"), tostr("I just gave ", victim.name, " a programmer bit."))[1])
$mail_agent:send_message(mailfrom, {$new_prog_log}, tostr("@programmer ", victim.name, " (", victim, ")"), tostr("I just gave ", victim.name, " a programmer bit."));
endif
return 1;
endif
.