* @param arg
	 * @param client
	 */
	private void cmd_flag(final String arg, final Client client) {
		// @flag <object> = <flags
		// ex. @flag me=D, should add the dark flag
		final String[] args = arg.split("=");

		final Player player = getPlayer(client);
		final Room room = getRoom( player.getLocation() );

		final ObjectFlag flag;

		if (args.length > 1) {
			MUDObject m = null;
			
			if ( args[0].equals("me") )        m = player;
			else if ( args[0].equals("here") ) m = room;
			else {
				int dbref = Utils.toInt(args[0], -1);

				if (dbref != -1) m = getObject(dbref);
				else             m = getObject(args[0]);
			}
			
			// only the first flag indicated matters if the ! symbol is present
			if (args[1].contains("!")) {
				flag = ObjectFlag.fromLetter(args[1].charAt(1));

				if (m != null) {
					m.removeFlag(flag);
					send("Removed " + flag.toString() + " flag from " + m.getName(), client);
				}
				else send("No such object.", client);
			}
			else {
				send("Adding Flag(s)", client);
				
				for(final Character c : args[1].toCharArray()) {
					ObjectFlag of = ObjectFlag.fromLetter(c);
					
					if (m != null) {
						if( !MudUtils.isAllowed(of, m.getType()) ) {
							send("You may not set " + of.name() + " on a " + m.getType().getName(), client);
							continue;
						}

						m.setFlag(of);

						send(m.getName() + " flagged as " + of, client);

						send("Removed " + of.toString() + " flag from " + m.getName(), client);
					}
					else send("No such object.", client);
				}
				
				/*if (m != null) {
					m.setFlags( ObjectFlag.getFlagsFromString(args[1] + player.getFlagsAsString()) );

					send(m.getName() + " flagged " + ObjectFlag.fromLetter(args[1].charAt(0)), client);
				}
				else send("No such object.", client);*/
			}
		}
	}