org.starhope.appius.game
Class Zone

java.lang.Object
  extended by org.starhope.appius.game.Zone
All Implemented Interfaces:
Comparable<AbstractZone>, AbstractZone

public class Zone
extends Object
implements AbstractZone

Author:
brpocock@star-hope.org

Field Summary
private  Map<String,Room> badges
          Badges are icons placed upon the map to indicate something special about a room
private  AbstractCensor censor
          Censorship object
protected  Set<String> cullRooms
          Rooms to be culled
private  Set<GameEvent> gameEvents
          All GameEvents which have been added to this Zone already
(package private) static long lastCheckedZonesForSpawn
           
private  List<Room> lobbies
          Lobby rooms into which users are dropped at login, if they don't specify an initial room to join on their own
protected  Set<String> myEmptyZones
          Names of empty zones
private  String myName
          The name of this zone
private  String myServer
          The hostname of the server on which this Zone is running
private  int nextDynamicRoomNumber
          The room numbers for dynamic rooms begin here
private static int NPC_TICK_INTERVAL
          Time between updates for NPC's
private static Random randomSource
          keep the random source around for fun.
(package private) static Set<AbstractZone> retiredZones
          Set of retired zones
static Map<AbstractZone,Map<String,List<String>>> roomMaps
          linkages between rooms
private  ConcurrentHashMap<Integer,Room> roomsByID
          All rooms in the Zone: sorted by ID.
private  ConcurrentHashMap<String,Room> roomsByMoniker
          All rooms in the Zone: sorted by moniker.
private static long serialVersionUID
          Java Serialization unique ID
protected  boolean serverReady
          A flag set once the server has indicated that it's ready to go, to avoid issues with events firing off too soon (e.g.
private  ConcurrentSkipListSet<AbstractUser> zoneUsers
          The set of all users in the zone.
 
Constructor Summary
Zone(String zoneName)
           XXX the zone's censor is initialised to FilterType.KID_CHAT.
 
Method Summary
 void activate()
          This is an overriding method.
 void add(AbstractUser user)
           
 void add(Room room)
          This is an overriding method.
 void addGameEventByClass(String className)
          add a GameEvent by instantiating it into this Zone, based upon its class name.
 void assertStaffLevel(GeneralUser u, int staffLevelRequired)
          Assert that the given user must have a given level of staff privileges
private  Room autoVivifyUserRoom(String string)
          WRITEME: Document this method brpocock@star-hope.org
private  void badgesChanged()
          Notify everyone in the zone that the badges have been changed
protected  void buildRoomMap()
          WRITEME: Document this method brpocock@star-hope.org
 void clearAllBadges()
          WRITEME
 void clearAllBadges(Room room)
          clear all badges on one room
 void clearBadge(String string)
          clear the given badge name off of any room to which it might be applied
 int compareTo(AbstractZone other)
           
protected static void cullAllUserRooms()
          remove unused user rooms
protected  void cullUserRooms()
          WRITEME: Document this method brpocock@star-hope.org
 void destroy()
          This is an overriding method.
 void destroyRoom(Room room)
          This is an overriding method.
 boolean equals(AbstractZone z)
          determine whether two Zone pointers are the same object
 boolean equals(Object obj)
          This is an overriding method.
private  org.json.JSONObject getAllBadges_JSON()
          get all badges on the Zone in JSON form
 Map<String,String> getAllBadges()
          Get all badges in this Zone (and to which rooms they are applied)
 Set<Integer> getAllUsersIDsInZone()
          get the user ID's of all users active in the Zone
 Collection<AbstractUser> getAllUsersInZone()
          This is an overriding method.
private  String getBackgroundImage()
          Get the background image used to identify this Zone in the zone browser
 Set<String> getBadgesForRoom(Room room)
          Get any badges assigned to a room
private  int getBuddiesForUser(AbstractUser user)
          Discover how many of the user's buddies are online in a given zone
static AbstractZone getByName(String zoneName)
          Deprecated. ask AppiusClaudiusCaecus.getZone(java.lang.String)
 AbstractCensor getCensor()
          WRITEME: Document this method brpocock@star-hope.org
private static Vector<String> getDefaultGameEvents()
           Get the GameEvents configured for default inclusion in all zones
 int getDynamicRoomNumber()
           
 Set<GameEvent> getGameEvents()
          get all game events tied to this Zone
 String getHost()
          Get the host on which this zone's server is running
 int getMaxUsers()
          This is an overriding method.
 String getMyServer()
           
 String getName()
          This is an overriding method.
 Room getNextLobby()
           Get the next room which will accept an inbound user as the next lobby.
static int getNPCTickInterval()
           
static String getRev()
           
 Room getRoom(Integer room)
          This is an overriding method.
 Room getRoomByName(String moniker)
          This is an overriding method.
 org.json.JSONObject getRoomList_JSON()
          This is an overriding method.
 Collection<Room> getRoomList()
          This is an overriding method.
 String getRoomListSFSXML()
          This is an overriding method.
 Map<String,List<String>> getRoomMap()
           
 int getRoomMaxUsers()
          This is an overriding method.
 String getURL()
          Get the Appius URL for this Zone
 AbstractUser getUserByName(String buddy)
          This is an overriding method.
 int getUserCount()
          WRITEME: Document this method brpocock@star-hope.org
 Room getUserRoom(AbstractUser user)
          Deprecated. use RoomListener.getRoom()
 org.json.JSONObject getZoneData_JSON(AbstractUser user)
          Gets the Zone data.
 org.json.JSONObject getZoneList_JSON(AbstractUser user)
          Get the set of all zones active (and not hidden nor retired) in JSON form.
(package private)  void handleServerReady()
          Once the server indicates its readiness, begin spawning auto-spawning Zones
 int hashCode()
          This is an overriding method.
 void init()
          This is an overriding method.
(package private)  boolean isItGood()
          Check over Zone spawn
(package private)  void loadGameEvents()
          Load game events specified in the database
 void readExternal(ObjectInput in)
           
 void remove(AbstractUser thing)
          This is an overriding method.
 void remove(GameEvent ev)
          Remove an event from this Zone
 void retire()
          Stop accepting new users
private  void sendBadges(AbstractUser user)
          send badges to an given user in this zone
protected  void sendBadPassword(String nick, ServerThread channel, User user, String zoneName, String password)
          Deprecated. Use ServerThread.sendBadPassword(Zone, User, String)
protected  void sendBuddyNotice(String buddyName, boolean isOnline, String roomMoniker, String roomTitle, GeneralUser u, int room)
           Sends a buddy notice message to the client
 void sendErrorReply(String source, String error, org.json.JSONObject result, User u, int room)
          Deprecated. use ServerThread.sendErrorReply(String, String, JSONObject, User, int)
 void sendModMessage(Room room, GeneralUser user, String message)
           Sends an (anonymous) moderator message to the user
protected  void sendNoSuchUser(LinkedList<ServerThread> recipients, String nick, String zoneName, String password)
          Deprecated. use ServerThread.sendNoSuchUser(String,String,String)
 void sendOops(GeneralUser u)
          Deprecated. use AbstractUser.sendOops()
 void sendSuccessReply(String source, org.json.JSONObject resultIn, AbstractUser u, int room)
          Deprecated. Call AbstractUser.acceptSuccessReply(String, JSONObject, Room) directly
 void sendSuccessReply(String source, org.json.JSONObject resultIn, AbstractUser u, int room, ServerThread recipient)
          Deprecated. Use ServerThread.sendSuccessReply(String,JSONObject,AbstractUser,int) instead
(package private)  void sendWardrobe(AbstractUser user, Object ignored, int room)
          Send a "from:wardrobe" message to the user
 void setAutoJoinRoom(int id)
          This is an overriding method.
 void setBadge(String badge, Room room)
          set a badge upon a room
 void setMyServer(String server)
           
 String toString()
           
 void trace(String string)
          This is an overriding method.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

lastCheckedZonesForSpawn

static long lastCheckedZonesForSpawn

NPC_TICK_INTERVAL

private static int NPC_TICK_INTERVAL
Time between updates for NPC's


randomSource

private static Random randomSource
keep the random source around for fun.


retiredZones

static Set<AbstractZone> retiredZones
Set of retired zones


serialVersionUID

private static final long serialVersionUID
Java Serialization unique ID

See Also:
Constant Field Values

badges

private final transient Map<String,Room> badges
Badges are icons placed upon the map to indicate something special about a room


censor

private final AbstractCensor censor
Censorship object


cullRooms

protected final transient Set<String> cullRooms
Rooms to be culled


gameEvents

private final Set<GameEvent> gameEvents
All GameEvents which have been added to this Zone already


lobbies

private final transient List<Room> lobbies
Lobby rooms into which users are dropped at login, if they don't specify an initial room to join on their own


myEmptyZones

protected final transient Set<String> myEmptyZones
Names of empty zones


myName

private final String myName
The name of this zone


myServer

private String myServer
The hostname of the server on which this Zone is running


nextDynamicRoomNumber

private int nextDynamicRoomNumber
The room numbers for dynamic rooms begin here


roomsByID

private final ConcurrentHashMap<Integer,Room> roomsByID
All rooms in the Zone: sorted by ID.

See Also:
roomsByMoniker

roomsByMoniker

private final ConcurrentHashMap<String,Room> roomsByMoniker
All rooms in the Zone: sorted by moniker.

See Also:
roomsByID

serverReady

protected boolean serverReady
A flag set once the server has indicated that it's ready to go, to avoid issues with events firing off too soon (e.g. NPC's)


zoneUsers

private final ConcurrentSkipListSet<AbstractUser> zoneUsers
The set of all users in the zone.


roomMaps

public static final Map<AbstractZone,Map<String,List<String>>> roomMaps
linkages between rooms

Constructor Detail

Zone

public Zone(String zoneName)

XXX the zone's censor is initialised to FilterType.KID_CHAT. To enable FilterType.ADULT_CHAT you'll have to overrule that on a zone-by-zone basis right now: there is no configuration option for that in the default SQL table layout.

Parameters:
zoneName - The name for the new Zone.

Note

Method Detail

cullAllUserRooms

protected static void cullAllUserRooms()
remove unused user rooms


getByName

@Deprecated
public static AbstractZone getByName(String zoneName)
Deprecated. ask AppiusClaudiusCaecus.getZone(java.lang.String)

WRITEME: Document this method brpocock@star-hope.org

Parameters:
zoneName - WRITEME
Returns:
WRITEME

getDefaultGameEvents

private static Vector<String> getDefaultGameEvents()

Get the GameEvents configured for default inclusion in all zones

XXX: contains SQL

Returns:
the class names of all default game events from the database

getNPCTickInterval

public static int getNPCTickInterval()
Returns:
Seconds between NPC updates

getRev

public static String getRev()
Returns:
get the Subversion revision of this file

activate

public void activate()
This is an overriding method.

Specified by:
activate in interface AbstractZone
See Also:
AbstractZone.activate()

add

public void add(AbstractUser user)
Parameters:
user - the user entering the zone

add

public void add(Room room)
This is an overriding method.

Specified by:
add in interface AbstractZone
Parameters:
room - The room to be added.
See Also:
AbstractZone.add(Room)

addGameEventByClass

public void addGameEventByClass(String className)
add a GameEvent by instantiating it into this Zone, based upon its class name.

Parameters:
className - the GameEvent class name to be loaded

assertStaffLevel

public void assertStaffLevel(GeneralUser u,
                             int staffLevelRequired)
                      throws PrivilegeRequiredException
Assert that the given user must have a given level of staff privileges

Parameters:
u - The Smart Fox user object
staffLevelRequired - The staff level required to perform the action
Throws:
PrivilegeRequiredException - if the user

autoVivifyUserRoom

private Room autoVivifyUserRoom(String string)
WRITEME: Document this method brpocock@star-hope.org

Parameters:
string - WRITEME
Returns:
WRITEME

badgesChanged

private void badgesChanged()
Notify everyone in the zone that the badges have been changed


buildRoomMap

protected void buildRoomMap()
WRITEME: Document this method brpocock@star-hope.org


clearAllBadges

public void clearAllBadges()
Description copied from interface: AbstractZone
WRITEME

Specified by:
clearAllBadges in interface AbstractZone
See Also:
AbstractZone.clearAllBadges()

clearAllBadges

public void clearAllBadges(Room room)
clear all badges on one room

Specified by:
clearAllBadges in interface AbstractZone
Parameters:
room - the room upon which all badges are to be cleared

clearBadge

public void clearBadge(String string)
                throws GameLogicException
clear the given badge name off of any room to which it might be applied

Specified by:
clearBadge in interface AbstractZone
Parameters:
string - the badge name
Throws:
GameLogicException - if the given badge wasn't set on the room already

compareTo

public int compareTo(AbstractZone other)
Specified by:
compareTo in interface Comparable<AbstractZone>
Parameters:
other - the other zone
Returns:
the relative ordering of the zones, in Unicode order by name

cullUserRooms

protected void cullUserRooms()
WRITEME: Document this method brpocock@star-hope.org


destroy

public void destroy()
This is an overriding method.

Specified by:
destroy in interface AbstractZone
See Also:
AbstractZone.destroy()

destroyRoom

public void destroyRoom(Room room)
This is an overriding method.

Specified by:
destroyRoom in interface AbstractZone
Parameters:
room - WRITEME
See Also:
AbstractZone.destroyRoom(Room)

equals

public boolean equals(AbstractZone z)
determine whether two Zone pointers are the same object

Parameters:
z - another Zone
Returns:
true, if the two objects are the same Zone

equals

public boolean equals(Object obj)
This is an overriding method.

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

getAllBadges

public Map<String,String> getAllBadges()
Get all badges in this Zone (and to which rooms they are applied)

Returns:
a map of badges and room monikers

getAllBadges_JSON

private org.json.JSONObject getAllBadges_JSON()
get all badges on the Zone in JSON form

Returns:
the JSON set describing all active badges

getAllUsersIDsInZone

public Set<Integer> getAllUsersIDsInZone()
get the user ID's of all users active in the Zone

Specified by:
getAllUsersIDsInZone in interface AbstractZone
Returns:
the set of all users in the Zone

getAllUsersInZone

public Collection<AbstractUser> getAllUsersInZone()
This is an overriding method.

Specified by:
getAllUsersInZone in interface AbstractZone
Returns:
A Collection of all users currently in the Zone
See Also:
AbstractZone.getAllUsersInZone()

getBackgroundImage

private String getBackgroundImage()
Get the background image used to identify this Zone in the zone browser

Returns:
an image moniker

getBadgesForRoom

public Set<String> getBadgesForRoom(Room room)
Get any badges assigned to a room

Parameters:
room - the room in question
Returns:
the set of badge strings

getBuddiesForUser

private int getBuddiesForUser(AbstractUser user)
Discover how many of the user's buddies are online in a given zone

Parameters:
user - the user in question
Returns:
the number of buddies of that user in this Zone

getCensor

public AbstractCensor getCensor()
Description copied from interface: AbstractZone
WRITEME: Document this method brpocock@star-hope.org

Specified by:
getCensor in interface AbstractZone
Returns:
WRITEME
See Also:
AbstractZone.getCensor()

getDynamicRoomNumber

public int getDynamicRoomNumber()
Returns:
get the next room number to be used for a dynamic room

getGameEvents

public Set<GameEvent> getGameEvents()
get all game events tied to this Zone

Returns:
WRITEME

getHost

public String getHost()
Get the host on which this zone's server is running

Specified by:
getHost in interface AbstractZone
Returns:
the host on which this Zone's server is running

getMaxUsers

public int getMaxUsers()
This is an overriding method.

Specified by:
getMaxUsers in interface AbstractZone
Returns:
WRITEME
See Also:
AbstractZone.getMaxUsers()

getMyServer

public String getMyServer()
Returns:
myServer

getName

public String getName()
This is an overriding method.

Specified by:
getName in interface AbstractZone
Returns:
WRITEME
See Also:
AbstractZone.getName()

getNextLobby

public Room getNextLobby()

Get the next room which will accept an inbound user as the next lobby.

XXX: This contains Tootsville-specific code. There should instead be a room variable to indicate that a room is a lobby.

XXX: This code isn't used in Tootsville any more, anyways. Tootsville users get the map screen after logging in.

XXX: this throws out nulls anyways. BAD.

Specified by:
getNextLobby in interface AbstractZone
Returns:
The name of the room into which the user should join

getRoom

public Room getRoom(Integer room)
This is an overriding method.

Specified by:
getRoom in interface AbstractZone
Parameters:
room - WRITEME
Returns:
WRITEME
See Also:
AbstractZone.getRoom(java.lang.Integer)

getRoomByName

public Room getRoomByName(String moniker)
                   throws NotFoundException
This is an overriding method.

Specified by:
getRoomByName in interface AbstractZone
Parameters:
moniker - WRITEME
Returns:
WRITEME
Throws:
NotFoundException - if the room doesn't exist (and isn't set for autovivification)
See Also:
AbstractZone.getRoomByName(java.lang.String)

getRoomList

public Collection<Room> getRoomList()
This is an overriding method.

Specified by:
getRoomList in interface AbstractZone
Returns:
WRITEME
See Also:
AbstractZone.getRoomList()

getRoomList_JSON

public org.json.JSONObject getRoomList_JSON()
This is an overriding method.

Specified by:
getRoomList_JSON in interface AbstractZone
Returns:
WRITEME
See Also:
AbstractZone.getRoomList_JSON()

getRoomListSFSXML

public String getRoomListSFSXML()
This is an overriding method.

Specified by:
getRoomListSFSXML in interface AbstractZone
Returns:
a string of the SFS - XML format
See Also:
AbstractZone.getRoomListSFSXML()

getRoomMap

public Map<String,List<String>> getRoomMap()
Returns:
the room map

getRoomMaxUsers

public int getRoomMaxUsers()
This is an overriding method.

Specified by:
getRoomMaxUsers in interface AbstractZone
Returns:
WRITEME
See Also:
AbstractZone.getRoomMaxUsers()

getURL

public String getURL()
Get the Appius URL for this Zone

Specified by:
getURL in interface AbstractZone
Returns:
an URL for this Zone

getUserByName

public AbstractUser getUserByName(String buddy)
This is an overriding method.

Specified by:
getUserByName in interface AbstractZone
Parameters:
buddy - WRITEME
Returns:
WRITEME
See Also:
AbstractZone.getUserByName(java.lang.String)

getUserCount

public int getUserCount()
Description copied from interface: AbstractZone
WRITEME: Document this method brpocock@star-hope.org

Specified by:
getUserCount in interface AbstractZone
Returns:
WRITEME
See Also:
AbstractZone.getUserCount()

getUserRoom

@Deprecated
public Room getUserRoom(AbstractUser user)
Deprecated. use RoomListener.getRoom()

This is an overriding method.

Specified by:
getUserRoom in interface AbstractZone
Parameters:
user - WRITEME
Returns:
where the user is according to me
See Also:
AbstractZone.getUserRoom(AbstractUser)

getZoneData_JSON

public org.json.JSONObject getZoneData_JSON(AbstractUser user)
                                     throws org.json.JSONException
Gets the Zone data. The user passed in will be used to compute the “buddies” counter for the zone

Specified by:
getZoneData_JSON in interface AbstractZone
Parameters:
user - the user from whose perspective we're collecting the zone information
Returns:
JSON data
{ name: zone name,
  host: server hostname or IP address,
  usersOn: total number of active users,
  maxUsers: maximum number of users allowed,
  bg: zone icon background image,
  assetPath: path to resolve assets; default is "",
  buddies: number of online buddies for the selected user
Throws:
org.json.JSONException - if something can't be encoded in JSON

getZoneList_JSON

public org.json.JSONObject getZoneList_JSON(AbstractUser user)
Get the set of all zones active (and not hidden nor retired) in JSON form. Hidden zones begin with a “$”

Specified by:
getZoneList_JSON in interface AbstractZone
Parameters:
user - the user whose buddy list will be used to get the buddy counts on each zone
Returns:
a zoneList object to be passed to the client

handleServerReady

void handleServerReady()
Once the server indicates its readiness, begin spawning auto-spawning Zones

XXX: contains SQL


hashCode

public int hashCode()
This is an overriding method.

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

init

public void init()
This is an overriding method.

XXX: contains SQL

Specified by:
init in interface AbstractZone
See Also:
AbstractZone.init()

isItGood

boolean isItGood()
Check over Zone spawn

Returns:
WRITEME

loadGameEvents

void loadGameEvents()
Load game events specified in the database


readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Parameters:
in - object input stream
Throws:
IOException - if something bad happens
ClassNotFoundException - yeah. maybe.

remove

public void remove(AbstractUser thing)
This is an overriding method.

Specified by:
remove in interface AbstractZone
Parameters:
thing - WRITEME
See Also:
AbstractZone.remove(AbstractUser)

remove

public void remove(GameEvent ev)
Remove an event from this Zone

Parameters:
ev - event

retire

public void retire()
Stop accepting new users

Specified by:
retire in interface AbstractZone

sendBadges

private void sendBadges(AbstractUser user)
send badges to an given user in this zone

Parameters:
user - the user to whom to send badges

sendBadPassword

@Deprecated
protected void sendBadPassword(String nick,
                                          ServerThread channel,
                                          User user,
                                          String zoneName,
                                          String password)
Deprecated. Use ServerThread.sendBadPassword(Zone, User, String)

Send the user a notification that their password was incorrect

Parameters:
nick - nick
channel - server thread
user - user
zoneName - my name
password - password sha1

sendBuddyNotice

protected void sendBuddyNotice(String buddyName,
                               boolean isOnline,
                               String roomMoniker,
                               String roomTitle,
                               GeneralUser u,
                               int room)
                        throws org.json.JSONException

Sends a buddy notice message to the client

{ from: buddyNotice, status: true, notice: { buddy: name, online: boolean, room: moniker, roomName: title } }

XXX doesn't belong here

Parameters:
buddyName - WRITEME
isOnline - WRITEME
roomMoniker - WRITEME
roomTitle - WRITEME
u - WRITEME
room - WRITEME
Throws:
org.json.JSONException - WRITEME

sendErrorReply

@Deprecated
public void sendErrorReply(String source,
                                      String error,
                                      org.json.JSONObject result,
                                      User u,
                                      int room)
                    throws org.json.JSONException
Deprecated. use ServerThread.sendErrorReply(String, String, JSONObject, User, int)

send an error packet to the client.

Parameters:
source - The method returning the error message
error - The error message
result - The payload, if any. May be altered.
u - The user to whom to send the success reply
room - The room in which the user is standing
Throws:
org.json.JSONException - WRITEME

sendModMessage

public void sendModMessage(Room room,
                           GeneralUser user,
                           String message)

Sends an (anonymous) moderator message to the user

Parameters:
room - The room the user is in
user - The user to whom to send the message
message - The moderator message to be sent

sendNoSuchUser

@Deprecated
protected void sendNoSuchUser(LinkedList<ServerThread> recipients,
                                         String nick,
                                         String zoneName,
                                         String password)
Deprecated. use ServerThread.sendNoSuchUser(String,String,String)

Tell the user to bugger off, because they don't exist

Parameters:
recipients - WRITEME
nick - WRITEME
zoneName - WRITEME
password - WRITEME

sendOops

@Deprecated
public void sendOops(GeneralUser u)
Deprecated. use AbstractUser.sendOops()

Sends the user the private message /00p$

Parameters:
u - the user to whom we want to send the Oops message

sendSuccessReply

@Deprecated
public void sendSuccessReply(String source,
                                        org.json.JSONObject resultIn,
                                        AbstractUser u,
                                        int room)
Deprecated. Call AbstractUser.acceptSuccessReply(String, JSONObject, Room) directly

Send a reply with a success indicator to a list of recipients.

Parameters:
source - The method returning the success message
resultIn - The payload, if any. May be altered.
u - The user to whom to send the success reply
room - The room in which the user is standing

sendSuccessReply

@Deprecated
public void sendSuccessReply(String source,
                                        org.json.JSONObject resultIn,
                                        AbstractUser u,
                                        int room,
                                        ServerThread recipient)
                      throws org.json.JSONException
Deprecated. Use ServerThread.sendSuccessReply(String,JSONObject,AbstractUser,int) instead

Parameters:
source - WRITEME
resultIn - WRITEME
u - WRITEME
room - WRITEME
recipient - WRITEME
Throws:
org.json.JSONException - WRITEME
See Also:
ServerThread.sendSuccessReply(java.lang.String, org.json.JSONObject, org.starhope.appius.user.AbstractUser, int)

sendWardrobe

void sendWardrobe(AbstractUser user,
                  Object ignored,
                  int room)
            throws org.json.JSONException
Send a "from:wardrobe" message to the user

Parameters:
user - WRITEME
ignored - Ignored parameter. Null is a good answer.
room - WRITEME
Throws:
org.json.JSONException - WRITEME

setAutoJoinRoom

public void setAutoJoinRoom(int id)
This is an overriding method.

Specified by:
setAutoJoinRoom in interface AbstractZone
Parameters:
id - WRITEME
See Also:
AbstractZone.setAutoJoinRoom(int)

setBadge

public void setBadge(String badge,
                     Room room)
set a badge upon a room

Specified by:
setBadge in interface AbstractZone
Parameters:
badge - the badge to be set
room - the room upon which the badge is to be set

setMyServer

public void setMyServer(String server)
Parameters:
server - myServer

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

trace

public void trace(String string)
This is an overriding method.

Specified by:
trace in interface AbstractZone
Parameters:
string - WRITEME
See Also:
AbstractZone.trace(java.lang.String)