 		id: @id
 		passphrase: @passphrase
 		members: x.id for x in @members
-
+			
 # Set up common functions
 getUserById = (id) ->
 	for user in userRegistry

	for group in groupRegistry
		return group if group.id is id

User.fromJSON = (jsonExpression) -> new User(jsonExpression.id, jsonExpression.powerLevel, jsonExpression.auth)
Group.fromJSON = (jsonExpression) -> new Group(jsonExpression.id, getUserById userExp for userExp in jsonExpression.members, jsonExpression.passphrase)

# Set up variables
userRegistry.push User.fromJSON json for json in JSON.parse Modules.fs.readFileSync ResourceDir + "users.json"
groupRegistry.push Group.fromJSON json for json in JSON.parse Modules.fs.readFileSync ResourceDir + "groups.json"


containsUser = (id) -> (getUserById id)?
containsGroup = (id) -> (getGroupById id)?

# Event handler modules
eventHandlers = [
	{
		expectedType: "dm"
		expectedArgs: ["dest"]
		onMessage: (msg, source) ->

	}
]
setupHandlersForUser = (conn, id) ->


userRegistry = []
groupRegistry = []
messageRegistry = []
loggedUsers = []
hostBlacklist = JSON.parse Modules.fs.readFileSync ResourceDir + "blacklist.json"

