* @param arg
	 * @param client
	 */
	private void cmd_debug(final String arg, final Client client) {
		String[] args = arg.split(":");
		String[] args2 = arg.split(" ");

		String param = arg.toLowerCase();

		if (param.equals("on")) {
			debug = true;
			send("Game> Debugging: On", client);
		}
		else if (param.equals("off")) {
			debug = false;
			send("Game> Debugging: Off", client);
		}
		else if (param.equals("client")) {
			/*
			 * tell us about ourselves (i.e. which client object we are and our
			 * ip address)
			 */
			send("" + client, client);
			send(client.getIPAddress(), client);
		}
		else if (param.equals("clients")) {
			int cn = 0;
			for (Client c : s.getClients()) {
				if (c != null) {
					if (c == client) send(cn + " " + c.getIPAddress() + " " + c.toString() + "[YOU]", client);
					else             send(cn + " " + c.getIPAddress() + " " + c.toString(), client);
				}
				else {
					send(cn + " " + "---.---.---.--- null", client);
				}

				cn++;
			}
		}
		else if (param.equals("colors")) {
			if (color == Constants.ANSI) {
				char c = 'A';

				for (int i = 0; i < 9; i++) {
					client.write("\033[3" + i + ";m" + c);
				}

				client.writeln("");
			}
			else if (color == Constants.XTERM) {
				char c = 'A';

				for (int i = 0; i < 255; i++) {
					client.write("\033[38;5;" + i + "m" + c);
					if (i % 36 == 0) client.writeln("");
				}

				client.writeln("");
			}
		}
		else if (param.equals("creatures")) {
			send("Creatures", client);
			send("--------------------------------------------------------------------------", client);
			for (final Creature c : objectDB.getCreatures()) {
				send(String.format("%s %s %s (#%s)", c.getDBRef(), c.getName(), getRoom(c.getLocation()).getName(), c.getLocation()), client);
			}
			send("--------------------------------------------------------------------------", client);
		}
		else if (param.equals("dbdump")) {
			/*
			 * List all of the names and dbrefs of the objects in the database
			 * their actual index in the database
			 */
			send(objectDB.dump(), client);
		} 
		else if (param.equals("holidays")) {
			/* list the holidays */
			for (Map.Entry<String, Date> entry : holidays.entrySet()) {
				debug(entry.getKey() + ": " + MONTH_NAMES[((Date) entry.getValue()).getMonth() - 1] + " " + ((Date) entry.getValue()).getDay());
				send(entry.getKey() + ": " + MONTH_NAMES[((Date) entry.getValue()).getMonth() - 1] + " " + ((Date) entry.getValue()).getDay(), client);
			}
		}
		else if (args2[0].toLowerCase().equals("instanceof")) {
			// @debug instanceof Laser_Rifle Weapon
			if (args2.length >= 3) {
				final String objectName = args2[1].replace('_', ' ');
				final String className = args2[2];
				
				MUDObject obj = objectDB.getById( Utils.toInt(objectName, -1) );

				if (obj != null && className != null) {
					Class cl = null;

					try {
						cl = Class.forName(className);
						
						debug( cl.getName() );
					}
					catch (final ClassNotFoundException cnfe) {
						send("false", client);
						System.out.println("--- Stack Trace ---");
						cnfe.printStackTrace();
					}
					
					if( cl != null ) {
						send("" + cl.isInstance(obj), client);
					}
				}
			}
		}
		else if (args2[0].toLowerCase().equals("listen")) {
			final int dbref = Utils.toInt(args2[1], -1);
			final Room room = dbref != -1 ? getRoom(dbref) : getRoom(args2[1]);

			if (room != null) {
				StringBuffer listenList = new StringBuffer();

				for (final Player player : room.getListeners()) {
					listenList.append(player.getName() + ", ");
				}

				send("Listeners: " + listenList.toString(), client);
			}
		}
		else if (param.equals("mem")) {
			send(Utils.checkMem(), client);
		}
		else if (param.equals("pos")) {
			Player player = getPlayer(client);
			Point position = player.getPosition();

			send("X: " + position.getX(), client);
			send("Y: " + position.getY(), client);
			send("Z: " + position.getZ(), client);

			send("Flying: " + player.isFlying(), client);
			send("Moving: " + player.isMoving(), client);
		}
		else if (param.equals("portals")) {
			send("--- " + Utils.padRight("Portals", '-', 68), client);

			for (final Portal portal : portals) {
				String state = "inactive";
				
				if (portal.isActive()) {
					state = "active";
				}
				
				send("P " + portal.getName() + " (#" + portal.getDBRef() + ") [ " + state + " ]", client);
			}

			// send("" + Utils.padRight("", '-', 78), client);
		}
		else if (param.equals("seasons")) {
			/*
			 * list all the seasons
			 */
			for (final Season s : Seasons.getSeasons()) {
				send(s + ": " + MONTH_NAMES[s.beginMonth - 1] + " to " + MONTH_NAMES[s.endMonth - 1], client);
			}
		}
		else if (param.equals("telnet")) {
			final List<Byte[]> msgs = client.received_telnet_msgs;

			for (final Byte[] ba : msgs) {
				byte[] ba2 = new byte[ba.length];

				int index = 0;

				for (Byte b : ba) {
					ba2[index] = b;
					index++;
				}

				String msg = Telnet.translate(ba2);

				System.out.println("] " + msg);
			}
		}
		else if (param.equals("timedata")) {
			// get current data
			Calendar rightNow = Calendar.getInstance();

			// Real World Time (or at least whatever time zone the server is in)
			String real_time = "" + rightNow.get(Calendar.HOUR);

			if (rightNow.get(Calendar.HOUR) < 10) {
				real_time = " " + real_time;
			}

			if (rightNow.get(Calendar.MINUTE) < 10) {
				real_time = real_time + ":0" + rightNow.get(Calendar.MINUTE);
			}
			else {
				real_time = real_time + ":" + rightNow.get(Calendar.MINUTE);
			}

			send("Real Time: " + real_time, client);

			// In-game Time
			String gameTime = "" + game_time.getHours();

			if (game_time.getHours() < 10) {
				gameTime = " " + gameTime;
			}

			if (game_time.getMinutes() < 10) {
				gameTime = gameTime + ":0" + game_time.getMinutes();
			}
			else {
				gameTime = gameTime + ":" + game_time.getMinutes();
			}

			send("Game Time: " + gameTime, client);

			// Time Scale (the relative number of seconds to an-game minute)
			// 500 ms -> 1 second = 30000ms -> 1 minute (30s -> 1m)
			// 166 ms -> 1 second = 9960ms -> 1 minute ( 9.960s -> 1m)
			send("Time Scale: 1 minute game time/" + ((((double) game_time.getScale()) * 60) / 1000) + " seconds real time", client);
		}
		else if (param.equals("timers")) {
			send("Timers", client);

			send(Utils.padRight("", '-', 40), client);
			
			
			// TODO check on this, why do I do this here? to make sure their up to date? TimeLoop does this already
			checkTimers();

			// Effect Timers
			for (EffectTimer etimer : getEffectTimers(getPlayer(client))) {
				send("E " + etimer.getEffect().getName() + " ( " + etimer.getTimeRemaining() + " s )", client);
			}

			// Spell Timers
			for (SpellTimer stimer : getSpellTimers(getPlayer(client))) {
				send("S " + stimer.getSpell().getName() + " ( " + stimer.getTimeRemaining() + " s )", client);
			}

			// Auction Timers
			for (AuctionTimer atimer : getAuctionTimers(getPlayer(client))) {
				send("A " + atimer.getAuction().getItem().getName() + " ( " + atimer.getTimeRemaining() + " s )", client);
			}

			send(Utils.padRight("", '-', 40), client);

			send("A - Auction, E - Effect, S - Spell", client);
		}
		else if (param.equals("udbnstack")) {
			send("Functionality Removed", client);
			client.write("Stack: [ ");
			Stack<Integer> unusedDBNs = objectDB.getUnused();

			for (int i = 0; i < unusedDBNs.size(); i++) {

				if (i < unusedDBNs.size() - 1) {
					client.write("" + unusedDBNs.get(i));
				}
				else {
					client.write(unusedDBNs.get(i) + ", ");
				}
			}

			/*
			 * for (final Integer i : unusedDBNs) { client.write(i + ", "); }
			 */

			client.write(" ]\n");
		}
		else if (!arg.equals("")) {
			final int level = Utils.toInt(arg, debugLevel);

			if (debugLevel != level) {
				send("Game> Debug Level changed to: " + level, client);
			}

			debugLevel = level;
		}
		else {
			// print help information?
			// cmd_help("@debug", client);
		}
	}