53 g_idgamesSearchURL = 'http://www.doomworld.com/idgames/api/api.php?action=search&query=%s&type=title&sort=date&out=json' |
53 g_idgamesSearchURL = 'http://www.doomworld.com/idgames/api/api.php?action=search&query=%s&type=title&sort=date&out=json' |
54 |
54 |
55 # |
55 # |
56 # SOAP stuff |
56 # SOAP stuff |
57 # |
57 # |
58 suds_import = Import ('http://schemas.xmlsoap.org/soap/encoding/', \ |
58 suds_active = False |
59 'http://schemas.xmlsoap.org/soap/encoding/') |
59 |
60 suds_client = Client ('https://zandronum.com/tracker/api/soap/mantisconnect.php?wsdl', \ |
60 try: |
61 plugins=[ImportDoctor (suds_import)]) |
61 suds_import = Import ('http://schemas.xmlsoap.org/soap/encoding/', \ |
|
62 'http://schemas.xmlsoap.org/soap/encoding/') |
|
63 suds_client = Client ('https://zandronum.com/tracker/api/soap/mantisconnect.php?wsdl', \ |
|
64 plugins=[ImportDoctor (suds_import)]) |
|
65 suds_active = True |
|
66 except Exception: |
|
67 pass |
62 |
68 |
63 # |
69 # |
64 # irc_client flags |
70 # irc_client flags |
65 # |
71 # |
66 CLIF_CONTROL = (1 << 0) |
72 CLIF_CONTROL = (1 << 0) |
217 self.get_ticket_data (replyto, http_match.group (2), False) |
223 self.get_ticket_data (replyto, http_match.group (2), False) |
218 else: |
224 else: |
219 control ("Recieved bad PRIVMSG: %s" % line) |
225 control ("Recieved bad PRIVMSG: %s" % line) |
220 |
226 |
221 def get_ticket_data (self, replyto, ticket, withlink): |
227 def get_ticket_data (self, replyto, ticket, withlink): |
|
228 if suds_active == False: |
|
229 return |
|
230 |
222 data = {} |
231 data = {} |
223 try: |
232 try: |
224 data = suds_client.service.mc_issue_get (g_config['trackeruser'], g_config ['trackerpassword'], ticket) |
233 data = suds_client.service.mc_issue_get (g_config['trackeruser'], g_config ['trackerpassword'], ticket) |
225 except Exception, e: |
234 except Exception, e: |
226 self.privmsg (replyto, "Failed to get info for issue %s: %s" % (ticket, `e`)) |
235 self.privmsg (replyto, "Failed to get info for issue %s: %s" % (ticket, `e`)) |