'theme':(self.command_theme,_('Usage: /theme\nTheme: Reload the theme defined in the config file.'),None),
'theme':(self.command_theme,_('Usage: /theme\nTheme: Reload the theme defined in the config file.'),None),
'list':(self.command_list,_('Usage: /list\nList: get the list of public chatrooms on the specified server'),self.completion_list),
'list':(self.command_list,_('Usage: /list\nList: get the list of public chatrooms on the specified server'),self.completion_list),
'message':(self.command_message,_('Usage: /message <jid> [optional message]\nMessage: Open a conversation with the specified JID (even if it is not in our roster), and send a message to it, if specified'),None),
'message':(self.command_message,_('Usage: /message <jid> [optional message]\nMessage: Open a conversation with the specified JID (even if it is not in our roster), and send a message to it, if specified'),None),
'version':(self.command_version,_('Usage: /version <jid>\nVersion: get the software version of the given JID (usually its XMPP client and Operating System)'),None),
}
}
self.key_func={
self.key_func={
...
@@ -952,6 +953,23 @@ class Core(object):
...
@@ -952,6 +953,23 @@ class Core(object):
iflen(args)>1:
iflen(args)>1:
tab.command_say(arg.strip()[len(jid):])
tab.command_say(arg.strip()[len(jid):])
defcommand_version(self,arg):
"""
/version <jid>
"""
args=arg.split()
iflen(args)<1:
returnself.command_help('version')
jid=args[0]
res=self.xmpp.plugin['xep_0092'].get_version(jid)
ifnotres:
returnself.information('Could not get the software version from %s'%(jid,))