28 { |
28 { |
29 'name': 'update', |
29 'name': 'update', |
30 'description': 'Checks for updates on the bot', |
30 'description': 'Checks for updates on the bot', |
31 'args': None, |
31 'args': None, |
32 'level': 'admin' |
32 'level': 'admin' |
33 } |
33 }, |
|
34 |
|
35 { |
|
36 'name': 'die', |
|
37 'description': 'Shuts the bot down', |
|
38 'args': None, |
|
39 'level': 'admin', |
|
40 }, |
34 ] |
41 ] |
35 } |
42 } |
36 |
43 |
37 def cmd_raw (bot, args, **rest): |
44 def cmd_raw (bot, args, **rest): |
38 bot.write (args['message']) |
45 bot.write (args['message']) |
40 def cmd_msg (bot, args, **rest): |
47 def cmd_msg (bot, args, **rest): |
41 bot.privmsg (args['recipient'], args['message']) |
48 bot.privmsg (args['recipient'], args['message']) |
42 |
49 |
43 def cmd_restart (bot, **rest): |
50 def cmd_restart (bot, **rest): |
44 bot.restart() |
51 bot.restart() |
|
52 |
|
53 def cmd_die (bot, **rest): |
|
54 quit() |
45 |
55 |
46 def cmd_update (bot, replyto, **rest): |
56 def cmd_update (bot, replyto, **rest): |
47 try: |
57 try: |
48 repo = hgapi.Repo ('.') |
58 repo = hgapi.Repo ('.') |
49 r1 = repo.hg_id() |
59 r1 = repo.hg_id() |