mirror of
https://github.com/tbamud/tbamud.git
synced 2026-04-05 11:57:19 +02:00
OOC command
This commit is contained in:
parent
a045045eec
commit
1f707eee74
3 changed files with 36 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue