OOC command

This commit is contained in:
kinther 2025-08-17 11:14:58 -07:00
parent a045045eec
commit 1f707eee74
3 changed files with 36 additions and 0 deletions

View file

@ -71,6 +71,40 @@ ACMD(do_say)
speech_wtrigger(ch, argument);
}
ACMD(do_ooc)
{
skip_spaces(&argument);
if (!*argument)
send_to_char(ch, "Yes, but WHAT do you want to say OOC?\r\n");
else {
char buf[MAX_INPUT_LENGTH + 14], *msg;
struct char_data *vict;
if (CONFIG_SPECIAL_IN_COMM && legal_communication(argument))
parse_at(argument);
snprintf(buf, sizeof(buf), "$n\tn says OOC: '%s'", argument);
msg = act(buf, FALSE, ch, 0, 0, TO_ROOM | DG_NO_TRIG);
for (vict = world[IN_ROOM(ch)].people; vict; vict = vict->next_in_room)
if (vict != ch && GET_POS(vict) > POS_SLEEPING)
add_history(vict, msg, HIST_SAY);
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_NOREPEAT))
send_to_char(ch, "%s", CONFIG_OK);
else {
sprintf(buf, "You say OOC: '%s'", argument);
msg = act(buf, FALSE, ch, 0, 0, TO_CHAR | DG_NO_TRIG);
add_history(ch, msg, HIST_SAY);
}
}
/* Trigger check. */
speech_mtrigger(ch, argument);
speech_wtrigger(ch, argument);
}
ACMD(do_gsay)
{
skip_spaces(&argument);

View file

@ -42,6 +42,7 @@ ACMD(do_spec_comm);
#define SCMD_ASK 1
/* functions without subcommands */
ACMD(do_say);
ACMD(do_ooc);
ACMD(do_gsay);
ACMD(do_page);
ACMD(do_reply);

View file

@ -226,6 +226,7 @@ cpp_extern const struct command_info cmd_info[] = {
{ "olc" , "olc" , POS_DEAD , do_show_save_list, LVL_BUILDER, 0 },
{ "olist" , "olist" , POS_DEAD , do_oasis_list, LVL_BUILDER, SCMD_OASIS_OLIST },
{ "oedit" , "oedit" , POS_DEAD , do_oasis_oedit, LVL_BUILDER, 0 },
{ "ooc" , "oo" , POS_RESTING , do_ooc , 0, 0 },
{ "oset" , "oset" , POS_DEAD , do_oset, LVL_BUILDER, 0 },
{ "ocopy" , "ocopy" , POS_DEAD , do_oasis_copy, LVL_GOD, CON_OEDIT },