XMPP last example for XMPPpy: различия между версиями
Материал из Linux Wiki
Перейти к навигацииПерейти к поиску
Rain (обсуждение | вклад) (Новая страница: «<source lang=python> def iq_last_handler(self, iq): repl = iq.buildReply('result') query = xmpp.Node('query', attrs={'xmlns':xmpp.NS_LAST, 'seconds': (int(time.time() - self.last))}) repl.setPayload([query]) self.jabber.send(repl) raise NodeProcessed </source> Category:Python») |
(нет различий)
|
Текущая версия на 20:26, 11 марта 2023
def iq_last_handler(self, iq):
repl = iq.buildReply('result')
query = xmpp.Node('query', attrs={'xmlns':xmpp.NS_LAST, 'seconds': (int(time.time() - self.last))})
repl.setPayload([query])
self.jabber.send(repl)
raise NodeProcessed