/**
* @package AJAX_Chat
* @author Sebastian Tschan
* @copyright (c) Sebastian Tschan
* @license GNU Affero General Public License
* @link https://blueimp.net/ajax/
*/

// Return text replacements for custom commands
// text contains the whole message, textParts the message split up as words array
ajaxChat.replaceCustomCommands = function(text, textParts) {
	switch(textParts[0]) {
		case '/fake':
			text=text.replace('/fake', ' ');
			text=ajaxChat.replaceText(text);
			return '<span class="chatBotMessage">' + text + '</span>';

		case '/afk':
			return '<span class="chatBotMessage">' + this.lang['away'].replace(/%s/, textParts[1]) + '</span>';

		case '/deop':
			return '<span class="chatBotMessage">' + this.lang['opRemoved'].replace(/%s/, textParts[1]) + '</span>';

		case '/getop':
			return '<span class="chatBotMessage">' + this.lang['opAdded'].replace(/%s/, textParts[1]) + '</span>';

		case '/myip':
			return '<span class="chatBotMessage">' + this.lang['myip'].replace(/%s/, textParts[1]) + '</span>';

		case '/wb':
			return '<span class="chatBotMessage">' + this.lang['isBack'].replace(/%s/, textParts[1]) + '</span>';

		default:
			return text;
	}
}

ajaxChat.handleLogout = function() {
}