* @param client  client (Client)
	 */
	public void cmd(final String _input, final Client client) throws NullPointerException {
		String arg = "";
		String cmd = "";

		final String input = _input.trim();

		debug("");

		// cut the input into an array of strings separated by spaces
		final LinkedList<String> inputList = new LinkedList<String>(Arrays.asList(input.split(" ")));

		if ( !inputList.isEmpty() ) { // if there was any input
			cmd = inputList.remove(0); // grab the first element (which should be the command)

			debug("Command: \"" + cmd + "\"", 2);       // print command (pre-trim so we see any extra junk)
			cmd = cmd.trim();                           // trim the command (remove funny characters)
			debug("Command(trimmed): \"" + cmd + "\""); // print trimmed command


			arg = Utils.join(inputList, " "); // get the arguments if there are any

			// if the command has arguments
			if (inputList.size() > 1) {
				// don't display/log the arguments to connect or create, since
				// they contain sensitive user information,
				// including their name and password
				if (!cmd.toLowerCase().equals("connect") && !cmd.toLowerCase().equals("create")) {
					debug("Arguments: \"" + arg + "\"", 2);       // print arguments
					arg = Utils.trim(arg);                        // trim arguments
					debug("Arguments(trimmed): \"" + arg + "\""); // print trimmed arguments
				}
			}
		}

		debug("");

		// check if the client is logged in
		final boolean logged_in = loginCheck(client);

		// restrict commands based on whether or not the connection has a logged-in player
		// if not logged-in all of this should have configurable messages and maybe a time
		// duration to show for when the mode will return to normal
		if (!logged_in) {
			final String cs = getClientState(client);

			if (cs != null) {
				System.out.println("Client State (CS): " + "\'" + cs + "\'");

				switch (cs) {
				case "register":
					handle_registration(cmd, client);
					break;
				case "account_login":
					handle_account_login(cmd, client);
					break;
				case "account_menu":
					handle_account_menu(cmd, client);
					break;
				default:
					setClientState(client, ""); // clear any unintended client states
					break;
				}

				return;
			}
			else debug("CS is NULL!");

			if (mode == GameMode.NORMAL) // Normal Running Mode (a.k.a. Mode 0)
			{
				if (this.players.size() > this.max_players) {
					if (cmd.equals("connect") || cmd.equals("create")) {
						send("Sorry. Maximum number of players are connected. Please try back later.", client);
						return;
					}
				}

				if ( cmdIs(cmd, "connect") ) {
					cmd_connect(arg, client); // pass arguments to the player connect function
				}
				else if ( cmdIs(cmd, "console") ) {
					cmd_console(arg, client);
				}
				else if ( cmdIs(cmd, "create") ) {
					cmd_create(arg, client); // pass arguments to the player creation function
				}
				else if ( cmdIs(cmd, "help") ) {
					send("Available Commands: connect, console, create, help, register, quit, who", client);
				}
				else if ( cmdIs(cmd, "register") ) {
					send("REGISTER", client);
					cmd_register(arg, client);
				}
				else if ( cmdIs(cmd, "quit") ) {
					disconnect(client); // just kill the client?
				}
				else if ( cmdIs(cmd, "who") ) {
					cmd_who(arg, client); // run the who function
				}
				else {
					send("That is not a known command.", client);
					debug("Command> Unknown Command");
				}
			}
			else if (mode == GameMode.WIZARD) // Wizard-Only Mode (a.k.a. Mode 1)
			{
				send("System is in Wizard-Only Mode.", client);

				if ( cmdIs(cmd, "connect") ) {
					cmd_connect(arg, client); // handles wizflag checking itself (since that's player dependent)
				}
				else if ( cmdIs(cmd, "console") ) {
					cmd_console(arg, client);
				}
				else if ( cmdIs(cmd, "create") ) {
					send("Sorry, only Wizards are allowed to login at this time.", client);
				}
				else if (cmd.equals("help")) {
					send("Available Commands: connect, console, create, help, quit, who", client);
				}
				else if ( cmdIs(cmd, "quit") ) {
					disconnect(client); // just kill the client?
				}
				else {
					send("Huh? That is not a known command.", client);
					debug("Command> Unknown Command");
				}
			}
			else if (mode == GameMode.MAINTENANCE) // Maintenance Mode (a.k.a. Mode 2)
			{
				send("System is in Maintenance Mode.", client); // >configurable message<
				send("No Logins allowed. Booting Client...", client);
				disconnect(client); // just kill the client
			}
			else {
				// ? (any other mode number -- may indicate some kind of failure)
				send("System may be malfunctioning.", client);
				send("No Logins allowed. Booting Client...", client);
				disconnect(client); // just kill the client
			}
		}

		// if logged-in
		else if (logged_in) {
			final Player player = getPlayer(client);
			final Room room = getRoom( player.getLocation() );

			// if the user is editing something, pass their input to the editor
			if (player.getStatus().equals(Constants.ST_EDIT)) {
				final Editors editor = player.getEditor();

				switch (editor) {
				case AREA:     break;
				case CHARGEN:  op_chargen(input, client);      break;
				case CREATURE: op_creatureedit(input, client); break;
				case HELP:     op_helpedit(input, client);     break;
				case INTCAST:  op_cast(input, client);         break;
				case ITEM:     op_itemedit(input, client);     break;
				case LIST:     op_listedit(input, client);     break;
				case MAIL:     handle_mail(input, client);     break;
				case QUEST:    op_questedit(input, client);    break;
				case ROOM:     op_roomedit(input, client);     break;
				case SKILL:    op_skilledit(input, client);    break;
				case ZONE:     op_zoneedit(input, client);     break;
				case NONE:
					send("Exiting " + editor.getName(), client);
					break;
				default:       break;
				}
			}
			else if (player.getStatus().equals("CNVS")) { // Conversation
				debug(">> In a conversation");

				if (input.equalsIgnoreCase("leave") || input.equalsIgnoreCase("bye")) {
					// TODO this is a kludge to allow escaping a broken conversation
					send("You leave the conversation.", client);
					
					player.setStatus("IC");

					look( getRoom( player.getLocation() ), player.getClient() );
				}
				else {
					// TODO make sure we know what npc the player is talking to
					// and what the player type
					
					final NPC npc = conversations.get(player).one;
					
					// TODO call conversation handler?
					handle_conversation(npc, player, Utils.toInt(input, -1));
				}
			}
			else if (player.getStatus().equals("VIEW")) { // viewing help files
				op_pager(input, client);
			}
			// TODO fix this. (what's broken?)
			else if ( !( player.getStatus().equals("IC") || player.getStatus().equals("OOC") ) && module != null ) {
				System.out.println("Module Processing input");
				module.op(input, player);
			}
			// else pass their input to command parsing
			else {
				// TODO there's a check for cmd == "" here
				// if( "".equals(cmd) ) return;

				// see if there are any namerefs, and if so evaluate them
				arg = nameref_eval(arg, client);

				debug("Argument(evaluated): \"" + arg + "\""); // print the trimmed argument

				/* Command Logging */

				if ( logging ) {
					// Log all commands after login
					System.out.println("Command being logged...");
					
					logAction(player.getName(), player.getLocation(), Utils.trim(input));

					System.out.println("Command Logged!");
				}

				/* Grab a possible chat command */
				if (cmd.charAt(0) == '#') {
					final String temp = cmd.substring(1);
					final String test = chan.resolveShortName(temp);
					
					final String channelName = test.equals("") ? temp : test;

					// chat channel invocation
					chatHandler(channelName, arg, client);

					return;
				}

				/* Command Evaluation */

				boolean buildCmd = false;
				boolean adminCmd = false;
				boolean wizCmd = false;
				boolean superuserCmd = false;

				debug("Entering superuser command loop...", 4);
				
				/* SuperUser Commands */

				if (player.getAccess() >= Constants.SUPERUSER) {
					superuserCmd = true; // begin by assuming we have a superuser command

					if( cmdIs(cmd, "@access") ) {
						getCommand("@access").execute(arg, client);
					}
					else if( cmdIs(cmd, "@alias") ) {
						cmd_alias(arg, client);
					}
					else if( cmdIs(cmd, "@broadcast") ) {
						write("Game> " + player.getName() + " says, " + arg);
					}
					else if( cmdIs(cmd, "@jsonify") ) {
						cmd_jsonify(arg, client);
					}
					else if( cmdIs(cmd, "@load") ) {
						send("Game> Command Not Implemented!", client);

						boolean success = cmd_unloadc(arg, client);

						if( success ) {
							send("Game> Loaded " + commandMap.get(arg) + ".", client);
						}
						else {
							String[] args = arg.split("=");

							send("Game> Failed to load " + args[1] + " with command name " + args[0], client);
						}
					}
					else if( cmdIs(cmd, "@unload") ) {
						send("Game> Command Not Implemented!", client);

						boolean success = cmd_unloadc(arg, client);

						if( success ) {
							send("Game> Unloaded " + arg + ".", client);
						}
						else {
							String[] args = arg.split("=");

							send("Game> Failed to unload " + args[1] + " with command name " + args[0], client);
						}
					}
					else if( cmdIs(cmd, "@reload") ) {
						if (arg.equals("")) sys_reload();
						else                sys_reload(arg);
					}
					else if( cmdIs(cmd, "@shutdown") ) {
						cmd_shutdown(arg, client);
					}
					else if( cmdIs(cmd, "@sethour") ) {
						cmd_sethour(arg, client);
					}
					else if( cmdIs(cmd, "@setminute") ) {
						cmd_setminute(arg, client);
					}
					else if( cmdIs(cmd, "@setweather") ) {
						cmd_setweather(arg, client);
					}
					else {
						superuserCmd = false; // if our initial assumption was wrong, indicate that
					}

					if (superuserCmd) {
						return;
					}
				}

				debug("Exited superuser command loop.", 4);

				debug("Entering build command loop...", 4);

				/* Builder Commands */

				if (player.getAccess() >= Constants.BUILD) {
					buildCmd = true; // begin by assuming we have a build command

					if ( cmdIs(cmd, "@check") ) {
						// run the check function
						cmd_check(arg, client);
					}
					else if ( cmdIs(cmd, "@cedit") ) {
						// indicate what is parsing commands
						debug("Command Parser: @cedit");

						// launch the item editor
						cmd_creatureedit(arg, client);
					}
					else if ( cmdIs(cmd, "@create_npc") ) {
						final String[] args = arg.split(" ");

						for (final String s : args) {
							System.out.println(s);
						}

						final String npcName = args[0];
						
						//getRace checks equality, ignoring case
						//final Race npcRace = getRace(args[1]);
						final Race npcRace = Races.NONE;
						//final Integer[] stats = Utils.stringsToIntegers(args[2].split(","));
						final Integer[] stats = Utils.stringsToIntegers("7,7,7,7,7,7,7".split(","));
						
						final Room location = getRoom(getPlayer(client).getLocation());

						createNPC(npcName, npcRace, stats, location);
					}
					else if ( cmdIs(cmd, "@dig") ) {
						cmd_dig(arg, client);
					}
					else if ( cmdIs(cmd, "@describe") ) {
						// run the describe function
						cmd_describe(arg, client);
					}
					else if ( cmdIs(cmd, "@door") ) {
						// run the door function
						cmd_door(arg, client);
					}

					// pass arguments to the dungeon function
					// commented out on purpose
					/*
					 * else if ( cmd.equals("@dungeon") || ( aliasExists &&
					 * alias.equals("@dungeon") ) ) { buildCmd = true;
					 * 
					 * int dX = 2; int dY = 2;
					 * 
					 * Dungeon d = new Dungeon(arg, dX, dY);
					 * 
					 * cmd_jump(d.dRooms[0][0].getDBRef() + "", client);
					 * cmd_look("", client);
					 * 
					 * int dXc = 0; int dYc = 0;
					 * 
					 * System.out.println(d.dRooms.length);
					 * 
					 * for (int r = 0; r < dX * dY; r++) { if (dXc == 0) {
					 * System.out.println("Xexits" + ", " + r + ", " + "(" + dXc
					 * + ", " + dYc + ")"); cmd_open("east=" + d.roomIds[r] +
					 * "=" + (d.roomIds[r] + 1), client); cmd_open("west=" +
					 * (d.roomIds[r] + 1) + "=" + d.roomIds[r], client); } if
					 * (dYc == 0) { System.out.println("Yexits" + ", " + r +
					 * ", " + "(" + dXc + ", " + dYc + ")"); cmd_open("south=" +
					 * d.roomIds[r] + "=" + (d.roomIds[r] + dX), client);
					 * cmd_open("north=" + (d.roomIds[r] + dX) + "=" +
					 * d.roomIds[r], client); } if (r == dX - 1) {
					 * System.out.println("Increase in Y"); dYc = dYc + 1; dXc =
					 * 0; } else { System.out.println("Increase in X"); dXc =
					 * dXc + 1; } } }
					 */
					else if ( cmdIs(cmd, "@edit") ) {
						cmd_edit(arg, client);
					}
					else if ( cmdIs(cmd, "@examine") ) {
						// run the examine function
						cmd_examine(arg, client);
					}
					//
					else if ( cmdIs(cmd, "@fail") ) {
						cmd_fail(arg, client);
					}
					else if ( cmdIs(cmd, "@iedit") ) {
						// indicate what is parsing commands
						debug("Command Parser: @iedit");

						// launch the item editor
						cmd_itemedit(arg, client);
					}
					else if ( cmdIs(cmd, "@jump") ) {
						cmd_jump(arg, client);
					}
					else if ( cmdIs(cmd, "@link") ) {
						cmd_link(arg, client);
					}
					else if ( cmdIs(cmd, "@lsedit") ) {
						cmd_lsedit(arg, client); // run the list editor
					}
					else if ( cmdIs(cmd, "@nameref") ) {
						cmd_nameref(arg, client);
					}
					else if ( cmdIs(cmd, "@ofail") ) {
						cmd_ofail(arg, client); // set an ofail message
					}
					else if ( cmdIs(cmd, "@open") ) {
						// run the open function
						cmd_open(arg, client);
					}
					else if ( cmdIs(cmd, "@osuccess") ) {
						//
						cmd_osuccess(arg, client);
					}
					else if ( cmdIs(cmd, "@qedit") ) {
						//
						debug("Command Parser: @qedit");

						// run the list editor
						cmd_questedit(arg, client);
					}
					else if ( cmdIs(cmd, "@redit") ) {
						//
						debug("Command Parser: @redit");

						// run the list editor
						cmd_roomedit(arg, client);
					}
					else if ( cmdIs(cmd, "@skedit") ) {
						//
						debug("Command Parser: @skilledit");

						// run the skill editor
						cmd_skilledit(arg, client);
					}
					//
					else if ( cmdIs(cmd, "@success") ) {
						cmd_success(arg, client); // set an exit success message
					}
					else if ( cmdIs(cmd, "@unlink") ) {
						cmd_unlink(arg, client);
					}
					else if ( cmdIs(cmd, "@zedit") ) {
						cmd_zoneedit(arg, client);
					}
					else {
						buildCmd = false; // if our initial assumption was wrong, indicate that
					}

					if (buildCmd) {
						return;
					}
				}

				debug("Exited build command loop.", 4);

				debug("Entering admin command loop...", 4);

				/* Admin Commands */

				if (player.getAccess() >= Constants.ADMIN) {
					adminCmd = true; // begin by assuming we have a admin command

					if ( cmdIs(cmd, "@accounts") ) {
						cmd_accounts(arg, client);
					}
					else if ( cmdIs(cmd, "@alias") ) {
						cmd_alias(arg, client);
					}
					else if ( cmdIs(cmd, "@backup") ) {
						cmd_backup(arg, client);
						// send("Game> Backup Functionality Broken. Please stick to manual file saves.");
					} 
					else if ( cmdIs(cmd, "@bb") ) {
						cmd_bb(arg, client);
					}
					else if ( cmdIs(cmd, "@config") ) {
						cmd_config(arg, client);
					}
					else if ( cmdIs(cmd, "@control") ) {
						// run the NPC control/takeover function?
						cmd_control(arg, client);
					}
					else if ( cmdIs(cmd, "@debug") ) {
						cmd_debug(arg, client);
					}
					else if ( cmdIs(cmd, "@find") ) {
						cmd_find(arg, client);
					}
					else if ( cmdIs(cmd, "@flags") ) {
						cmd_flags(arg, client);
					}
					else if ( cmdIs(cmd, "@give") ) {
						cmd_give(arg, client);
					}
					else if ( cmdIs(cmd, "@hash") ) {
						client.write("Hash of argument: '" + arg + "' is hash: '" + Utils.hash(arg) + "'.");
					}
					else if ( cmdIs(cmd, "@hedit") ) {
						cmd_helpedit(arg, client);
					}
					else if ( cmdIs(cmd, "@initialize") ) {
						cmd_initialize(arg, client);
					}
					else if ( cmdIs(cmd, "@kick") ) {
						kick(player.getClient());
					}
					else if ( cmdIs(cmd, "@listprops") ) {
						cmd_listprops(arg, client);
					}
					else if ( cmdIs(cmd, "@makehouse") ) {
						final House h = new House(getPlayer(client), 5);

						for (final String s : h.getInfo()) send(s, client);
					}
					else if ( cmdIs(cmd, "@name") ) {
						cmd_name(arg, client);
					}
					else if ( cmdIs(cmd, "@nextdb") ) {
						if (arg.equals("")) {
							send("Next Database Reference Number (DBRef/DBRN): " + objectDB.peekNextId(), client);
						}
					}
					else if ( cmdIs(cmd, "@npcs") ) {
						cmd_npcs("", client);
					}
					else if ( cmdIs(cmd, "@lex") ) {
						final List<String> result = ProgramInterpreter.lex(arg); 
						
						send(result, client);
					}
					else if ( cmdIs(cmd, "@pgm") ) {
						// we'll just create a new and temporary instance (debugging enabled)
						ProgramInterpreter newInterp = new ProgramInterpreter(this, true);
						
						Script script = new Script(arg);
						
						// invoke the program interpreter and pass it the argument
						send("-Result: " + newInterp.interpret(script, player, null), client);

						newInterp = null;
					}
					else if ( cmdIs(cmd, "@set") ) {
						cmd_set(arg, client);
					}
					else if ( cmdIs(cmd, "@session") ) {
						/*
						 * notionally this should give data on the current or
						 * last of the specified player
						 */
						cmd_session(arg, client);
					}
					else if ( cmdIs(cmd, "@sethp") ) {
						cmd_sethp(arg, client); // DM/Debug Command
					}
					else if ( cmdIs(cmd, "@setlevel") ) {
						cmd_setlevel(arg, client); // DM/Debug Command
					}
					else if ( cmdIs(cmd, "@setmana") ) {
						cmd_setmana(arg, client); // DM/Debug Command
					}
					else if ( cmdIs(cmd, "@setskill") ) {
						cmd_setskill(arg, client); // DM/Debug Command
					}
					else if ( cmdIs(cmd, "@setxp") ) {
						cmd_setxp(arg, client); // DM/Debug Command
					}
					else if ( cmdIs(cmd, "@viewlog") ) {
						cmd_viewlog(arg, client);
					}
					else if ( cmdIs(cmd, "@tune") ) {
						String[] args = arg.split(" ");

						if (args[0].equals("cmdDelay")) {
							final int delay = Utils.toInt(args[1], -1);
						}
					}
					else if ( cmdIs(cmd, "@zones") ) {
						cmd_zones(arg, client);
					}
					else if ( cmdIs(cmd, "@zoneinfo") ) {
						cmd_zoneinfo(arg, client);
					}
					else {
						adminCmd = false; // if our initial assumption was wrong, indicate that
					}

					if (adminCmd) {
						return;
					}
				}

				debug("Exited admin command loop.", 4);

				debug("Entered wizard command loop.", 4);

				/* Wizard Commands */

				if (player.getAccess() >= Constants.WIZARD) {
					wizCmd = true; // begin by assuming we have a wizard command

					if ( cmdIs(cmd, "@ban") ) {
						cmd_ban(arg, client);
					}
					else if ( cmdIs(cmd, "@flag") ) {
						cmd_flag(arg, client);
					}
					else if ( cmdIs(cmd, "@flush") ) {
						flush();
					}
					else if ( cmdIs(cmd, "@recycle") ) {
						cmd_recycle(arg, client);
					}
					else if ( cmdIs(cmd, "@setcolor") ) {
						cmd_setcolor(arg, client);
					}
					else if ( cmdIs(cmd, "@setmode") ) {
						cmd_setmode(arg, client);
					}
					else if ( cmdIs(cmd, "@spawn") ) {
						cmd_spawn(arg, client);
					}
					else if ( cmdIs(cmd, "@teleport") ) {
						getCommand("@teleport").execute(arg, client);
					}
					else {
						wizCmd = false; // if our initial assumption was wrong, indicate that
					}

					if (wizCmd) {
						return;
					}
				}

				debug("Exited wizard command loop.", 4);

				debug("Entering user commmand loop...", 4);

				/* User Commands */

				// TODO convert player command checks to use CmdIs(...)

				if (player.getAccess() >= Constants.USER) {
					if ( cmdIs(cmd, "ask") )             cmd_ask(arg, client);
					// attack (a soft command)
					if ( cmdIs(cmd, "aliases") )         cmd_aliases(arg, client);
					else if ( cmdIs(cmd, "auction") )    cmd_auction(arg, client);
					else if ( cmdIs(cmd, "auctions") )   cmd_auctions(arg, client);
					else if ( cmdIs(cmd, "balance") )    cmd_balance(arg, client);
					else if ( cmdIs(cmd, "bash") )       cmd_bash(arg, client);
					else if ( cmdIs(cmd, "bid") )        cmd_bid(arg, client);
					else if ( cmdIs(cmd, "boards") )     cmd_boards(arg, client);
					else if ( cmdIs(cmd, "buy") )        cmd_buy(arg, client);
					else if ( cmdIs(cmd, "calendar") )   cmd_calendar(arg, client);
					// cast (a soft command)
					else if ( cmdIs(cmd, "chargen") )    cmd_chargen(arg, client);
					else if ( cmdIs(cmd, "chat") )       cmd_chat(arg, client);
					else if ( cmdIs(cmd, "climb") )      cmd_climb(arg, client);
					else if ( cmdIs(cmd, "cls") )        cmd_cls(arg, client);
					else if ( cmdIs(cmd, "colors") )     cmd_colors(arg, client);
					else if ( cmdIs(cmd, "commands") )   cmd_commands(arg, client);
					else if ( cmdIs(cmd, "condition") )  cmd_condition(arg, client);
					else if ( cmdIs(cmd, "deposit") )    cmd_deposit(arg, client);
					else if ( cmdIs(cmd, "drink") )      cmd_drink(arg, client);
					else if ( cmdIs(cmd, "drop") )       cmd_drop(arg, client); 
					else if ( cmdIs(cmd, "effects") )    cmd_effects(arg, client);
					else if ( cmdIs(cmd, "equip") )      cmd_equip(arg, client);
					else if ( cmdIs(cmd, "exchange") )   cmd_exchange(arg, client);
					else if ( cmdIs(cmd, "exp") )        cmd_exp(arg, client); // TODO CMD 5
					else if ( cmdIs(cmd, "exits") )      cmd_exits(arg, client);
					else if ( cmdIs(cmd, "feats") )      cmd_feats(arg, client);
					else if ( cmdIs(cmd, "fly") )        cmd_fly(arg, client); // TODO CMD 6
					else if ( cmdIs(cmd, "get") )        cmd_get(arg, client);
					else if ( cmdIs(cmd, "go") )         cmd_go(arg, client);
					// greet (a soft command)
					else if ( cmdIs(cmd, "help") )       cmd_help(arg, client);
					else if ( cmdIs(cmd, "home") )       cmd_home(arg, client);
					else if ( cmdIs(cmd, "housing") )    cmd_housing(arg, client);
					else if ( cmdIs(cmd, "inspect") )    cmd_inspect(arg, client);
					else if ( cmdIs(cmd, "interact") )   cmd_interact(arg, client);
					else if ( cmdIs(cmd, "inventory") )  cmd_inventory(arg, client);
					else if ( cmdIs(cmd, "land") )       cmd_land(arg, client);    // TODO CMD
					else if ( cmdIs(cmd, "levelup") )    cmd_levelup(arg, client); // TODO CMD 8 fix this kludge
					else if ( cmdIs(cmd, "list") )       cmd_list(arg, client);
					else if ( cmdIs(cmd, "lock") )       cmd_lock(arg, client);
					else if ( cmdIs(cmd, "logout") )     cmd_logout(arg, client);
					else if ( cmdIs(cmd, "look") )       cmd_look(arg, client);
					else if ( cmdIs(cmd, "lookat") )     cmd_lookat(arg, client);
					// mail (a soft command)
					else if ( cmdIs(cmd, "map") )        cmd_map(arg, client);
					else if ( cmdIs(cmd, "money") )      cmd_money(arg, client);
					
					else if ( cmdIs(cmd, "motd") )       send(messageOfTheDay(), client); // TODO CMD 11
					
					else if ( cmdIs(cmd, "move") )       cmd_move(arg, client);
					else if ( cmdIs(cmd, "ooc") )        player.setStatus("OOC"); // TODO CMD 12 fix this kludge
					else if ( cmdIs(cmd, "ic") )         player.setStatus("IC");  // TODO CMD 13 fix this kludge
					
					else if ( cmdIs(cmd, "open") )       cmd_open2(arg, client);
					else if ( cmdIs(cmd, "page") )       cmd_page(arg, client);
					else if ( cmdIs(cmd, "pose") )       cmd_pose(arg, client);
					else if ( cmdIs(cmd, "party") )      cmd_party(arg, client);
					else if ( cmdIs(cmd, "passwd") )     cmd_passwd(arg, client);
					else if ( cmdIs(cmd, "pconfig") )    cmd_pconfig(arg, client);
					else if ( cmdIs(cmd, "pinfo") )      cmd_pinfo(arg, client);
					else if ( cmdIs(cmd, "push") )       cmd_push(arg, client);
					else if ( cmdIs(cmd, "put") )        cmd_put(arg, client);
					
					else if ( cmdIs(cmd, "prompt") )     prompt(client);
					
					else if ( cmdIs(cmd, "quests") )     cmd_quests(arg, client);
					else if ( cmdIs(cmd, "quit") )       cmd_quit(arg, client);
					else if ( cmdIs(cmd, "read") )       cmd_read(arg, client);
					else if ( cmdIs(cmd, "roll") )       cmd_roll(arg, client); // TODO CMD 14
					else if ( cmdIs(cmd, "run") ) {
						(new Command("") {
							@Override
							public void execute(final String arg, final Client client) {
								final Player player = getPlayer(client);
								player.setSpeed(Constants.RUN);
								send("You get ready to run.", client);
							}
						}).execute(arg, client);
					}
					else if ( cmdIs(cmd, "score") )      cmd_score(arg, client);
					else if ( cmdIs(cmd, "sell") )       cmd_sell(arg, client);
					else if ( cmdIs(cmd, "sheathe") )    cmd_sheathe(arg, client);
					else if ( cmdIs(cmd, "skillcheck") ) cmd_skillcheck(arg, client);
					else if ( cmdIs(cmd, "spellinfo") )  cmd_spellinfo(arg, client);
					else if ( cmdIs(cmd, "spells") )     cmd_spells(arg, client);
					// staff (a soft command)
					else if ( cmdIs(cmd, "stats") )      cmd_stats(arg, client);
					else if ( cmdIs(cmd, "status") )     cmd_status(arg, client);
					else if ( cmdIs(cmd, "talk") )       cmd_talk(arg, client);
					else if ( cmdIs(cmd, "take") )       cmd_take(arg, client);
					else if ( cmdIs(cmd, "target") )     cmd_target(arg, client);
					else if ( cmdIs(cmd, "tell") )       cmd_tell(arg, client);
					else if ( cmdIs(cmd, "time") )       cmd_time(arg, client);
					else if ( cmdIs(cmd, "trade") )      cmd_trade(arg, client);
					else if ( cmdIs(cmd, "travel") )     cmd_travel(arg, client);
					else if ( cmdIs(cmd, "unequip") )    cmd_unequip(arg, client);
					else if ( cmdIs(cmd, "unlock") )     cmd_unlock(arg, client);
					else if ( cmdIs(cmd, "use") )        cmd_use(arg, client);
					else if ( cmdIs(cmd, "value") )      cmd_value(arg, client);
					else if ( cmdIs(cmd, "version") )    cmd_version(arg, client);					
					else if ( cmdIs(cmd, "vitals") )     cmd_vitals(arg, client);
					else if ( cmdIs(cmd, "where") )      cmd_where(arg, client);
					else if ( cmdIs(cmd, "who") )        cmd_who(arg, client);
					else if ( cmdIs(cmd, "withdraw") )   cmd_withdraw(arg, client);
					else if ( cmdIs(cmd, "walk") ) {
						(new Command("") {
							@Override
							public void execute(final String arg, final Client client) {
								final Player player = getPlayer(client);
								
								if (player.getSpeed() > Constants.WALK) {
									player.setSpeed(Constants.WALK);
									send("You slow down to a walking speed.", client);
								}
							}
						}).execute(arg, client);
					}
					else if ( cmdIs(cmd, "write") ) { // TODO CMD 21
						// check for something to write in/on (writable things
						// -- paper, books, scrolls?)
						// check for writing tool and ink
						// get stuff and "write" it down
					}
					else {
						// TODO exits first, then soft commands...
						debug("Exit? " + cmd);
						
						boolean nothing = false;

						if ( cmd.matches("[a-zA-Z_-]+") ) {
							// exit handling
							// has the user given an action/exit that is linked
							// to something for which no similarly named command exists,
							// if so, execute link or move user in the direction/to
							// the room specified by the action/exit

							// handle the command as an exit
							if ( exitHandler(cmd, client) ) {}
							// general case for non-explicitly checked mapped commands
							else if (soft_commands) { // "soft" commands enabled?
								debug("Look in CommandMap");
								final Command command = (player.hasCommand(cmd) ? player.getCommand(cmd) : getCommand(cmd));

								if (command != null) {
									if ( checkAccess(player, command.getAccessLevel()) ) {
										command.execute(arg, client);
									}
									else send("You may not use that command. (Insufficient Access Level!)", client);
								}
							}
							else nothing = true;
						}
						else {
							debug("No match found in '" + cmd + "'");
							nothing = true;
						}
						
						if( nothing ) {
							send("Huh? That is not a known command.", client);
							debug("Command> Unknown Command");
						}
					}
				}

				debug("Exited user commmand loop.", 4);
			}
		}
	}