 eventHandlers = [
 	{
 		expectedType: "dm"
+		expectedArgs: ["dest"]
 		onMessage: (msg, source) ->
 
 	}
 ]
-setupHandlersForUser
+setupHandlersForUser = (conn, id) ->
+
 
 # Login procedure
 WSServer.on 'request', (req) ->

	wss: require('websocket').server
	sha: require('sha1')
	aes: require('aes256')

# Initialize modules
WebServer = https.createServer

	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)?

