49 'name': 'checkbt', |
49 'name': 'checkbt', |
50 'description': 'Polls the bug tracker for new tickets', |
50 'description': 'Polls the bug tracker for new tickets', |
51 'args': None, |
51 'args': None, |
52 'level': 'admin', |
52 'level': 'admin', |
53 }, |
53 }, |
|
54 |
|
55 { |
|
56 'name': 'btsoap', |
|
57 'description': 'Sends a custom SOAP query', |
|
58 'args': '<func> [args...]', |
|
59 'level': 'admin', |
|
60 }, |
54 ] |
61 ] |
55 } |
62 } |
56 |
63 |
57 def cmd_ticket (bot, args, replyto, **rest): |
64 def cmd_ticket (bot, args, replyto, **rest): |
58 Bt.get_ticket_data (bot, replyto, args['ticket'], True) |
65 Bt.get_ticket_data (bot, replyto, args['ticket'], True) |
60 def cmd_testannounce (bot, args, **rest): |
67 def cmd_testannounce (bot, args, **rest): |
61 Bt.announce_new_issue (bot, Bt.get_issue (args['ticket'])) |
68 Bt.announce_new_issue (bot, Bt.get_issue (args['ticket'])) |
62 |
69 |
63 def cmd_checkbt (bot, **rest): |
70 def cmd_checkbt (bot, **rest): |
64 Bt.poll() |
71 Bt.poll() |
|
72 |
|
73 def cmd_btsoap (bot, args, reply, **rest): |
|
74 result = Bt.custom_query (args['func'], args['args'].split (' ') if 'args' in args else []) |
|
75 |
|
76 for line in result.splitlines(): |
|
77 reply (line) |