removed ClientXMPP.server in favor of ClientXMPP.domain
This commit is contained in:
@@ -33,7 +33,7 @@ class gmail_notify(base.base_plugin):
|
||||
|
||||
def handler_gmailcheck(self, payload):
|
||||
#TODO XEP 30 should cache results and have getFeature
|
||||
result = self.xmpp['xep_0030'].getInfo(self.xmpp.server)
|
||||
result = self.xmpp['xep_0030'].getInfo(self.xmpp.domain)
|
||||
features = []
|
||||
for feature in result.findall('{http://jabber.org/protocol/disco#info}query/{http://jabber.org/protocol/disco#info}feature'):
|
||||
features.append(feature.get('var'))
|
||||
|
||||
@@ -45,7 +45,7 @@ class xep_0078(base.base_plugin):
|
||||
logging.debug("Starting jabber:iq:auth Authentication")
|
||||
auth_request = self.xmpp.makeIqGet()
|
||||
auth_request_query = ET.Element('{jabber:iq:auth}query')
|
||||
auth_request.attrib['to'] = self.xmpp.server
|
||||
auth_request.attrib['to'] = self.xmpp.domain
|
||||
username = ET.Element('username')
|
||||
username.text = self.xmpp.username
|
||||
auth_request_query.append(username)
|
||||
|
||||
@@ -38,7 +38,7 @@ class xep_0092(base.base_plugin):
|
||||
|
||||
def report_version(self, xml):
|
||||
iq = self.xmpp.makeIqResult(xml.get('id', 'unknown'))
|
||||
iq.attrib['to'] = xml.get('from', self.xmpp.server)
|
||||
iq.attrib['to'] = xml.get('from', self.xmpp.domain)
|
||||
query = ET.Element('{jabber:iq:version}query')
|
||||
name = ET.Element('name')
|
||||
name.text = self.name
|
||||
|
||||
@@ -41,14 +41,14 @@ class xep_0199(base.base_plugin):
|
||||
def handler_pingserver(self, xml):
|
||||
if not self.running:
|
||||
time.sleep(self.config.get('frequency', 300))
|
||||
while self.sendPing(self.xmpp.server, self.config.get('timeout', 30)) is not False:
|
||||
while self.sendPing(self.xmpp.domain, self.config.get('timeout', 30)) is not False:
|
||||
time.sleep(self.config.get('frequency', 300))
|
||||
logging.debug("Did not recieve ping back in time. Requesting Reconnect.")
|
||||
self.xmpp.disconnect(reconnect=True)
|
||||
|
||||
def handler_ping(self, xml):
|
||||
iq = self.xmpp.makeIqResult(xml.get('id', 'unknown'))
|
||||
iq.attrib['to'] = xml.get('from', self.xmpp.server)
|
||||
iq.attrib['to'] = xml.get('from', self.xmpp.domain)
|
||||
self.xmpp.send(iq)
|
||||
|
||||
def sendPing(self, jid, timeout = 30):
|
||||
|
||||
Reference in New Issue
Block a user