/* Do not remove the headers from this file! see /USAGE for more info. */
//:COMMAND
//USAGE beep
// beep <player>
//
//Sends a "beep" (character 7) to the room, or to the targetted player.
//Usually disabled to prevent annoyance.
inherit CMD;
inherit M_MESSAGES;
private void main( string arg )
{
object who;
if( !arg)
{
this_body()->simple_action("$N $vbeep." + chr(7));
return;
}
who = find_body(lower_case(arg));
if( !who )
{
out("You can only beep players.\n");
return;
}
//### If command is reinstated, should add a method for players to turn on/off
// their "beepability".
if (who->query_link()->query_shell_ob()->get_variable("no_beep"))
{
write("Sorry that person does not want to be beeped.\n");
return;
}
this_body()->inform( ({ this_body(), who }), action( ({this_body(), who }),
"$N0 $vbeep $t.\n" + chr(7)));
return;
}