- added .die

Fri, 13 Jun 2014 00:17:21 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Fri, 13 Jun 2014 00:17:21 +0300
changeset 6
2c6265a99d32
parent 5
b6d2b7de0a6d
child 7
438dc247ceb9

- added .die

cobalt.py file | annotate | diff | comparison | revisions
--- a/cobalt.py	Fri Jun 13 00:14:42 2014 +0300
+++ b/cobalt.py	Fri Jun 13 00:17:21 2014 +0300
@@ -329,7 +329,6 @@
 				repo.hg_pull()
 				repo.hg_update('tip', True)
 				r2 = repo.hg_id()
-				self.privmsg (replyto, '%s <-> %s' % (r1, r2))
 				if r1 != r2:
 					self.privmsg (replyto, 'Updated to %s, restarting...' % r2)
 					excepterm('')
@@ -337,6 +336,9 @@
 					self.privmsg (replyto, 'Up to date at %s.' % r2)
 			except hgapi.HgException as e:
 				raise logical_exception ('Search failed: %s' % `e`)
+		elif command == 'die':
+			check_admin (sender, ident, host, command)
+			quit()
 #		else:
 #			raise logical_exception ("unknown command `.%s`" % command)
 

mercurial