24 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 ''' |
27 ''' |
28 |
28 |
29 import bt as Bt |
29 from __future__ import print_function |
|
30 import bt |
30 |
31 |
31 ModuleData = { |
32 ModuleData = { |
32 'commands': |
33 'commands': |
33 [ |
34 [ |
34 { |
35 { |
60 }, |
61 }, |
61 ] |
62 ] |
62 } |
63 } |
63 |
64 |
64 def cmd_ticket (bot, args, replyto, **rest): |
65 def cmd_ticket (bot, args, replyto, **rest): |
65 Bt.get_ticket_data (bot, replyto, args['ticket'], True) |
66 bt.get_ticket_data (bot, replyto, args['ticket'], True) |
66 |
67 |
67 def cmd_testannounce (bot, args, **rest): |
68 def cmd_testannounce (bot, args, **rest): |
68 Bt.announce_new_issue (bot, Bt.get_issue (args['ticket'])) |
69 bt.announce_new_issue (bot, bt.get_issue (args['ticket'])) |
69 |
70 |
70 def cmd_checkbt (bot, **rest): |
71 def cmd_checkbt (bot, **rest): |
71 Bt.poll() |
72 bt.poll() |
72 |
73 |
73 def cmd_btsoap (bot, args, reply, **rest): |
74 def cmd_btsoap (bot, args, reply, **rest): |
74 result = Bt.custom_query (args['func'], args['args'].split (' ') if 'args' in args else []) |
75 result = bt.custom_query (args['func'], args['args'].split (' ') if 'args' in args else []) |
75 |
76 |
76 for line in result.splitlines(): |
77 for line in result.splitlines(): |
77 reply (line) |
78 reply (line) |