Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mod_iq_version.py « modules - github.com/mrDoctorWho/vk4xmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: be9478281586eea7f9a0c8f35f58fc8916c86543 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# coding: utf-8
# This file is a part of VK4XMPP transport
# © simpleApps, 2014 — 2015.

from __main__ import *

def version_handler(cl, iq):
	jidTo = iq.getTo()
	if jidTo == TransportID:
		result = iq.buildReply("result")
		query = result.getTag("query")
		query.setTagData("name", IDENTIFIER["name"])
		query.setTagData("version", REVISION)
		query.setTagData("os", "%s / %s" % (OS, PYTHON_VERSION))
		sender(cl, result)


MOD_TYPE = "iq"
MOD_HANDLERS = ((version_handler, "get", xmpp.NS_VERSION, False),)
MOD_FEATURES = [xmpp.NS_VERSION]