earmuff.c

ds2.1.1/lib/cmds/players/earmuff.c · 870 B

From the archive ds2.1.1.zip

Download the archive   « Back to the archive contents

#include <lib.h>

inherit LIB_DAEMON;

mixed cmd(string str) {
    if(!str || str =="") {
	if(!sizeof(this_player()->GetMuffed())) write("You are ignoring no one.");
	else {
	    write("You are ignoring the following name(s):\n");
	    write(implode(filter(this_player()->GetMuffed(), (: capitalize($1) :)), "\n")+"\n");
	}
	return 1;
    }
    else this_player()->AddMuffed(str);
    write("You add "+capitalize(str)+" to your earmuffed list.");
    return 1;
}

void help() {
    message("help",
      "Syntax: earmuff\n"
      "        earmuff <name>\n"
      "        earmuff @<mud>\n\n"
      "This command allows you to ignore channel messages from the name specified.\n"
      "You can also earmuff all channel messages coming from a "
      "specific mud, for example: earmuff @Spammy Mud II\n"
      "See also: whomuffed, unmuff\n\n",
      this_player() );
}

Site Stats

Snippets: 1791
Codebases: 571