- .update removed, no longer necessary

Sat, 29 Nov 2014 10:11:42 -0500

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Sat, 29 Nov 2014 10:11:42 -0500
changeset 103
e4891ab34fb1
parent 100
2a56ccf67782
child 104
27294de7b0d3

- .update removed, no longer necessary

mod_admin.py file | annotate | diff | comparison | revisions
--- a/mod_admin.py	Sat Nov 29 16:53:32 2014 +0200
+++ b/mod_admin.py	Sat Nov 29 10:11:42 2014 -0500
@@ -26,13 +26,6 @@
 		},
 
 		{
-			'name': 'update',
-			'description': 'Checks for updates on the bot',
-			'args': None,
-			'level': 'admin'
-		},
-		
-		{
 			'name': 'die',
 			'description': 'Shuts the bot down',
 			'args': None,
@@ -52,18 +45,3 @@
 
 def cmd_die (bot, **rest):
 	quit()
-
-def cmd_update (bot, replyto, **rest):
-	try:
-		repo = hgapi.Repo ('.')
-		r1 = repo.hg_id()
-		repo.hg_pull()
-		repo.hg_update('tip', True)
-		r2 = repo.hg_id()
-		if r1 != r2:
-			bot.privmsg (replyto, 'Updated to %s, restarting...' % r2)
-			bot.restart()
-		else:
-			bot.privmsg (replyto, 'Up to date at %s.' % r2)
-	except hgapi.HgException as e:
-		command_error ('Update failed: %s' % str (e))
\ No newline at end of file

mercurial