 ###
 
 common = require '../common'
+crypto = require 'crypto'
 config = require '../config'
 handlers = require '../handlers'
 api = require '../api'

	, req.params.module
frontend.get '/opserv/loaded', (req, res) ->
	commands.loaded (handlers) -> res.send 200, handlers.join ', '

handleMessage = (message, callback) ->
	if message.message.substring(0, 1) isnt '?'

					, parameters
				else
					callback?()
		when "sesame"
			if parameters is adminKey
				adminKey = null
				db.givePermissionToUserID message.sender, 'opserv.setPermission', (rows) ->
					api.replyTo message, __("You received the opserv.setPermission permission. Have fun!"), no, callback
			else
				callback?()
		when "setPermission"
			db.checkPermissionByMessage message, 'opserv.setPermission', (hasPermission) ->
				if hasPermission
