<NME> Ignore.java
<BEF> package com.planet_ink.coffee_mud.Commands;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;

import java.util.*;

/*
   Copyright 2004-2022 Bo Zimmerman

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

	   http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/
public class Ignore extends StdCommand
{
	public Ignore()
	{
	}

	private final String[] access=I(new String[]{"IGNORE"});
	@Override
	public String[] getAccessWords()
	{
		return access;
	}

	@Override
	public boolean execute(final MOB mob, final List<String> commands, final int metaFlags)
		throws java.io.IOException
	{
		final PlayerStats pstats=mob.playerStats();
		if(pstats==null)
			return false;
		final Set<String> h=pstats.getIgnored();
		if((commands.size()<2)||(commands.get(1).equalsIgnoreCase("list")))
		{
			if(h.size()==0)
				mob.tell(L("You have no names on your ignore list.  Use IGNORE ADD to add more."));
			else
			{
				final StringBuffer str=new StringBuffer(L("You are ignoring: "));
				for (final String element : h)
				{
					if(element.endsWith("*"))
				return false;
			}
			name=CMStrings.capitalizeAndLower(name);
			if(!CMLib.players().playerExists(name))
			{
				mob.tell("No player by that name was found.");
				return false;
		else
		if(commands.get(1).equalsIgnoreCase("ADD"))
		{
			String name=CMParms.combine(commands,2);
			if(name.length()==0)
			{
				mob.tell(L("Add whom?"));
				return false;
			}
			name=CMStrings.capitalizeAndLower(name);
			if(CMLib.players().accountExistsAllHosts(name))
				name=name+"*";
			else
			if((!CMLib.players().playerExistsAllHosts(name))
			&&(name.indexOf('@')<0))
			{
				mob.tell(L("No player by that name was found."));
				return false;
			}
			if(h.contains(name))
			{
				mob.tell(L("That name is already on your list."));
				return false;
			}
			h.add(name);
			if(name.endsWith("*"))
				mob.tell(L("The Account '@x1' has been added to your ignore list.",name));
			else
				mob.tell(L("The Player/Account '@x1' has been added to your ignore list.",name));
		}
		else
		if(commands.get(1).equalsIgnoreCase("REMOVE"))
		{
			String name=CMParms.combine(commands,2);
			if(name.length()==0)
			{
				mob.tell(L("Remove whom?"));
				return false;
			}
			if(!h.contains(name))
			{
				if(h.contains(name+"*"))
					name+="*";
				else
				{
					mob.tell(L("That name '@x1' does not appear on your list.  Watch your casing!",name));
					return false;
				}
			}
			h.remove(name);
			if(name.endsWith("*"))
				mob.tell(L("The Account '@x1' has been removed from your ignore list.",name));
			else
				mob.tell(L("The Player '@x1' has been removed from your ignore list.",name));
		}
		else
		{
			mob.tell(L("Parameter '@x1' is not recognized.  Try LIST, ADD, or REMOVE.",(commands.get(1))));
			return false;
		}
		return false;
	}

	@Override
	public boolean canBeOrdered()
	{
		return true;
	}

}

<MSG> 

git-svn-id: svn://192.168.1.10/public/CoffeeMud@10733 0d6f1817-ed0e-0410-87c9-987e46238f29

<DFF> @@ -66,7 +66,7 @@ public class Ignore extends StdCommand
 				return false;
 			}
 			name=CMStrings.capitalizeAndLower(name);
-			if(!CMLib.players().playerExists(name))
+			if((!CMLib.players().playerExists(name))&&(name.indexOf('@')<0))
 			{
 				mob.tell("No player by that name was found.");
 				return false;

{'commit': 'diff --git a/com/planet_ink/coffee_mud/Commands/Ignore.java b/com/planet_ink/coffee_mud/Commands/Ignore.java\nindex 1229613787..6ae5bbe38e 100644\n--- a/com/planet_ink/coffee_mud/Commands/Ignore.java\n+++ b/com/planet_ink/coffee_mud/Commands/Ignore.java\n@@ -66,7 +66,7 @@ public class Ignore extends StdCommand\n \t\t\t\treturn false;\r\n \t\t\t}\r\n \t\t\tname=CMStrings.capitalizeAndLower(name);\r\n-\t\t\tif(!CMLib.players().playerExists(name))\r\n+\t\t\tif((!CMLib.players().playerExists(name))&&(name.indexOf(\'@\')<0))\r\n \t\t\t{\r\n \t\t\t\tmob.tell("No player by that name was found.");\r\n \t\t\t\treturn false;\r\n', 'commit_subject': '', 'repo_name': 'bozimmerman/CoffeeMud', 'committer': {'name': 'bozimmerman', 'email': 'dc45fe023482b3b890b5e574e53c1d051f45b1ef@zimmers.net', 'time_sec': '1374531906', 'tz_offset': '0', 'date': {'seconds': '1374531906'}}, 'commit_tree': 'de2072953f20cade9f83131edde3800b313715da', 'commit_message': '\n\ngit-svn-id: svn://192.168.1.10/public/CoffeeMud@10733 0d6f1817-ed0e-0410-87c9-987e46238f29\n', 'language_name': 'HTML', 'license': 'apache-2.0', 'hunks': '@@ -66,7 +66,7 @@ public class Ignore extends StdCommand\n \t\t\t\treturn false;\r\n \t\t\t}\r\n \t\t\tname=CMStrings.capitalizeAndLower(name);\r\n-\t\t\tif(!CMLib.players().playerExists(name))\r\n+\t\t\tif((!CMLib.players().playerExists(name))&&(name.indexOf(\'@\')<0))\r\n \t\t\t{\r\n \t\t\t\tmob.tell("No player by that name was found.");\r\n \t\t\t\treturn false;\r\n', 'addition_count': 1, 'deletion_count': 1, 'src_file': 'a/com/planet_ink/coffee_mud/Commands/Ignore.java', 'tgt_file': 'b/com/planet_ink/coffee_mud/Commands/Ignore.java', 'file_extension': '.java', 'before_file': 'package com.planet_ink.coffee_mud.Commands;\nimport com.planet_ink.coffee_mud.core.interfaces.*;\nimport com.planet_ink.coffee_mud.core.*;\nimport com.planet_ink.coffee_mud.core.collections.*;\nimport com.planet_ink.coffee_mud.Abilities.interfaces.*;\nimport com.planet_ink.coffee_mud.Areas.interfaces.*;\nimport com.planet_ink.coffee_mud.Behaviors.interfaces.*;\nimport com.planet_ink.coffee_mud.CharClasses.interfaces.*;\nimport com.planet_ink.coffee_mud.Commands.interfaces.*;\nimport com.planet_ink.coffee_mud.Common.interfaces.*;\nimport com.planet_ink.coffee_mud.Exits.interfaces.*;\nimport com.planet_ink.coffee_mud.Items.interfaces.*;\nimport com.planet_ink.coffee_mud.Libraries.interfaces.*;\nimport com.planet_ink.coffee_mud.Locales.interfaces.*;\nimport com.planet_ink.coffee_mud.MOBS.interfaces.*;\nimport com.planet_ink.coffee_mud.Races.interfaces.*;\n\nimport java.util.*;\n\n/*\n   Copyright 2004-2022 Bo Zimmerman\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\npublic class Ignore extends StdCommand\n{\n\tpublic Ignore()\n\t{\n\t}\n\n\tprivate final String[] access=I(new String[]{"IGNORE"});\n\t@Override\n\tpublic String[] getAccessWords()\n\t{\n\t\treturn access;\n\t}\n\n\t@Override\n\tpublic boolean execute(final MOB mob, final List<String> commands, final int metaFlags)\n\t\tthrows java.io.IOException\n\t{\n\t\tfinal PlayerStats pstats=mob.playerStats();\n\t\tif(pstats==null)\n\t\t\treturn false;\n\t\tfinal Set<String> h=pstats.getIgnored();\n\t\tif((commands.size()<2)||(commands.get(1).equalsIgnoreCase("list")))\n\t\t{\n\t\t\tif(h.size()==0)\n\t\t\t\tmob.tell(L("You have no names on your ignore list.  Use IGNORE ADD to add more."));\n\t\t\telse\n\t\t\t{\n\t\t\t\tfinal StringBuffer str=new StringBuffer(L("You are ignoring: "));\n\t\t\t\tfor (final String element : h)\n\t\t\t\t{\n\t\t\t\t\tif(element.endsWith("*"))\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tname=CMStrings.capitalizeAndLower(name);\r\n\t\t\tif(!CMLib.players().playerExists(name))\r\n\t\t\t{\r\n\t\t\t\tmob.tell("No player by that name was found.");\r\n\t\t\t\treturn false;\r\n\t\telse\n\t\tif(commands.get(1).equalsIgnoreCase("ADD"))\n\t\t{\n\t\t\tString name=CMParms.combine(commands,2);\n\t\t\tif(name.length()==0)\n\t\t\t{\n\t\t\t\tmob.tell(L("Add whom?"));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tname=CMStrings.capitalizeAndLower(name);\n\t\t\tif(CMLib.players().accountExistsAllHosts(name))\n\t\t\t\tname=name+"*";\n\t\t\telse\n\t\t\tif((!CMLib.players().playerExistsAllHosts(name))\n\t\t\t&&(name.indexOf(\'@\')<0))\n\t\t\t{\n\t\t\t\tmob.tell(L("No player by that name was found."));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(h.contains(name))\n\t\t\t{\n\t\t\t\tmob.tell(L("That name is already on your list."));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\th.add(name);\n\t\t\tif(name.endsWith("*"))\n\t\t\t\tmob.tell(L("The Account \'@x1\' has been added to your ignore list.",name));\n\t\t\telse\n\t\t\t\tmob.tell(L("The Player/Account \'@x1\' has been added to your ignore list.",name));\n\t\t}\n\t\telse\n\t\tif(commands.get(1).equalsIgnoreCase("REMOVE"))\n\t\t{\n\t\t\tString name=CMParms.combine(commands,2);\n\t\t\tif(name.length()==0)\n\t\t\t{\n\t\t\t\tmob.tell(L("Remove whom?"));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(!h.contains(name))\n\t\t\t{\n\t\t\t\tif(h.contains(name+"*"))\n\t\t\t\t\tname+="*";\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmob.tell(L("That name \'@x1\' does not appear on your list.  Watch your casing!",name));\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\th.remove(name);\n\t\t\tif(name.endsWith("*"))\n\t\t\t\tmob.tell(L("The Account \'@x1\' has been removed from your ignore list.",name));\n\t\t\telse\n\t\t\t\tmob.tell(L("The Player \'@x1\' has been removed from your ignore list.",name));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmob.tell(L("Parameter \'@x1\' is not recognized.  Try LIST, ADD, or REMOVE.",(commands.get(1))));\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}\n\n\t@Override\n\tpublic boolean canBeOrdered()\n\t{\n\t\treturn true;\n\t}\n\n}\n', 'message': '\n\ngit-svn-id: svn://192.168.1.10/public/CoffeeMud@10733 0d6f1817-ed0e-0410-87c9-987e46238f29\n', 'author_name': 'bozimmerman', 'lang': 'java'}