 api = require '../api'
 async = require 'async'
 winston = require 'winston'
-debug = (require 'debug')('Chatbot:handlers:joinMessages')
+debug = (require 'debug')('Chatbot:handlers:quotes')
 db = require '../db'
 { __, __n } = require '../i18n'
 


onLoad = (callback) ->
	db.serialize ->
		db.run "CREATE TABLE IF NOT EXISTS joinMessages (
			userID INT(10),
			value MEDIUMTEXT,
			PRIMARY KEY(userID)
		);"
		
		getQuery = db.prepare "SELECT value FROM joinMessages WHERE userID = ?"
		setQuery = db.prepare "INSERT OR REPLACE INTO joinMessages (userID, value) VALUES (?, ?)"
		delQuery = db.prepare "DELETE FROM joinMessages WHERE userID = ?"
		
handleMessage = (message, callback) ->
	# Don't match our own messages

					else
						api.replyTo message, __("Your quote has been deleted."), yes, callback
			when 'forcequote'
				db.checkPermissionByMessage message, 'quotes.forcequote', (hasPermission) ->
					if hasPermission
						[ username, quote... ] = parameters.split /,/
						username = username.trim()
