# HG changeset patch
# User Santeri Piippo <crimsondusk64@gmail.com>
# Date 1402612493 -10800
# Node ID 1b726db7b0eccc1a3e7b450f5f8cf8136b856a6d
# Parent  0604f6b9f781a1cffd36aa690b7be73296af9d14
- respect the commandprefix option

diff -r 0604f6b9f781 -r 1b726db7b0ec cobalt.py
--- a/cobalt.py	Fri Jun 13 01:04:30 2014 +0300
+++ b/cobalt.py	Fri Jun 13 01:34:53 2014 +0300
@@ -146,6 +146,7 @@
 		self.cfg = cfg
 		self.mynick = ''
 		self.verbose = cfg['verbose'] if 'verbose' in cfg else False
+		self.commandprefix = g_config['commandprefix'] if 'commandprefix' in g_config else False
 
 		if not 'conflictsuffix' in self.cfg:
 			self.cfg['conflictsuffix'] = '`'
@@ -248,7 +249,7 @@
 			http_match = http_regex.match (line)
 
 			# Check for command.
-			if len(message) >= 2 and message[0] == '.' and message[1] != '.':
+			if len(message) >= 2 and message[0] == self.commandprefix and message[1] != self.commandprefix:
 				stuff = message[1:].split(' ')
 				command = stuff[0]
 				args = stuff[1:]