Mercurial > libervia-backend
annotate sat/plugins/plugin_xep_0092.py @ 4037:524856bd7b19
massive refactoring to switch from camelCase to snake_case:
historically, Libervia (SàT before) was using camelCase as allowed by PEP8 when using a
pre-PEP8 code, to use the same coding style as in Twisted.
However, snake_case is more readable and it's better to follow PEP8 best practices, so it
has been decided to move on full snake_case. Because Libervia has a huge codebase, this
ended with a ugly mix of camelCase and snake_case.
To fix that, this patch does a big refactoring by renaming every function and method
(including bridge) that are not coming from Twisted or Wokkel, to use fully snake_case.
This is a massive change, and may result in some bugs.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 08 Apr 2023 13:54:42 +0200 |
parents | be6d91572633 |
children | e75827204fe0 |
rev | line source |
---|---|
3028 | 1 #!/usr/bin/env python3 |
3137 | 2 |
920
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
3 |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
4 # SàT plugin for Software Version (XEP-0092) |
3479 | 5 # Copyright (C) 2009-2021 Jérôme Poisson (goffi@goffi.org) |
920
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
6 |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
7 # This program is free software: you can redistribute it and/or modify |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
8 # it under the terms of the GNU Affero General Public License as published by |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
9 # the Free Software Foundation, either version 3 of the License, or |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
10 # (at your option) any later version. |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
11 |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
12 # This program is distributed in the hope that it will be useful, |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
15 # GNU Affero General Public License for more details. |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
16 |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
17 # You should have received a copy of the GNU Affero General Public License |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
19 |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
20 from sat.core.i18n import _ |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
21 from sat.core.constants import Const as C |
952
91836a647515
plugin XEP-0092: use of checkFeature instead of hasFeature + timeout + message adapted to failure if software version is not available
Goffi <goffi@goffi.org>
parents:
945
diff
changeset
|
22 from twisted.internet import reactor, defer |
971
8ca5c990ed92
jp: "disco" subcommand, moved into a new "info" subcommand + added "version" subcommand which get software version
Goffi <goffi@goffi.org>
parents:
952
diff
changeset
|
23 from twisted.words.protocols.jabber import jid |
945
899dc9cd0f35
plugin XEP-0092: feature check before requesting version
Goffi <goffi@goffi.org>
parents:
941
diff
changeset
|
24 from wokkel import compat |
920
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
25 from sat.core import exceptions |
993
301b342c697a
core: use of the new core.log module:
Goffi <goffi@goffi.org>
parents:
971
diff
changeset
|
26 from sat.core.log import getLogger |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
27 |
993
301b342c697a
core: use of the new core.log module:
Goffi <goffi@goffi.org>
parents:
971
diff
changeset
|
28 log = getLogger(__name__) |
920
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
29 |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
30 NS_VERSION = "jabber:iq:version" |
952
91836a647515
plugin XEP-0092: use of checkFeature instead of hasFeature + timeout + message adapted to failure if software version is not available
Goffi <goffi@goffi.org>
parents:
945
diff
changeset
|
31 TIMEOUT = 10 |
920
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
32 |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
33 PLUGIN_INFO = { |
2145
33c8c4973743
core (plugins): added missing contants + use of new constants in PLUGIN_INFO
Goffi <goffi@goffi.org>
parents:
1963
diff
changeset
|
34 C.PI_NAME: "Software Version Plugin", |
33c8c4973743
core (plugins): added missing contants + use of new constants in PLUGIN_INFO
Goffi <goffi@goffi.org>
parents:
1963
diff
changeset
|
35 C.PI_IMPORT_NAME: "XEP-0092", |
33c8c4973743
core (plugins): added missing contants + use of new constants in PLUGIN_INFO
Goffi <goffi@goffi.org>
parents:
1963
diff
changeset
|
36 C.PI_TYPE: "XEP", |
33c8c4973743
core (plugins): added missing contants + use of new constants in PLUGIN_INFO
Goffi <goffi@goffi.org>
parents:
1963
diff
changeset
|
37 C.PI_PROTOCOLS: ["XEP-0092"], |
33c8c4973743
core (plugins): added missing contants + use of new constants in PLUGIN_INFO
Goffi <goffi@goffi.org>
parents:
1963
diff
changeset
|
38 C.PI_DEPENDENCIES: [], |
33c8c4973743
core (plugins): added missing contants + use of new constants in PLUGIN_INFO
Goffi <goffi@goffi.org>
parents:
1963
diff
changeset
|
39 C.PI_RECOMMENDATIONS: [C.TEXT_CMDS], |
33c8c4973743
core (plugins): added missing contants + use of new constants in PLUGIN_INFO
Goffi <goffi@goffi.org>
parents:
1963
diff
changeset
|
40 C.PI_MAIN: "XEP_0092", |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
41 C.PI_HANDLER: "no", # version is already handler in core.xmpp module |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
42 C.PI_DESCRIPTION: _("""Implementation of Software Version"""), |
920
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
43 } |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
44 |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
45 |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
46 class XEP_0092(object): |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
47 def __init__(self, host): |
993
301b342c697a
core: use of the new core.log module:
Goffi <goffi@goffi.org>
parents:
971
diff
changeset
|
48 log.info(_("Plugin XEP_0092 initialization")) |
920
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
49 self.host = host |
4037
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
50 host.bridge.add_method( |
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
51 "software_version_get", |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
52 ".plugin", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
53 in_sign="ss", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
54 out_sign="(sss)", |
4037
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
55 method=self._get_version, |
3028 | 56 async_=True, |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
57 ) |
926
d609581bf74a
plugin text commands: refactoring, text now only contain main commands, and other plugin can add commands themselve:
Goffi <goffi@goffi.org>
parents:
920
diff
changeset
|
58 try: |
4037
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
59 self.host.plugins[C.TEXT_CMDS].add_who_is_cb(self._whois, 50) |
926
d609581bf74a
plugin text commands: refactoring, text now only contain main commands, and other plugin can add commands themselve:
Goffi <goffi@goffi.org>
parents:
920
diff
changeset
|
60 except KeyError: |
993
301b342c697a
core: use of the new core.log module:
Goffi <goffi@goffi.org>
parents:
971
diff
changeset
|
61 log.info(_("Text commands not available")) |
920
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
62 |
4037
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
63 def _get_version(self, entity_jid_s, profile_key): |
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
64 def prepare_for_bridge(data): |
971
8ca5c990ed92
jp: "disco" subcommand, moved into a new "info" subcommand + added "version" subcommand which get software version
Goffi <goffi@goffi.org>
parents:
952
diff
changeset
|
65 name, version, os = data |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
66 return (name or "", version or "", os or "") |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
67 |
4037
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
68 d = self.version_get(jid.JID(entity_jid_s), profile_key) |
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
69 d.addCallback(prepare_for_bridge) |
971
8ca5c990ed92
jp: "disco" subcommand, moved into a new "info" subcommand + added "version" subcommand which get software version
Goffi <goffi@goffi.org>
parents:
952
diff
changeset
|
70 return d |
8ca5c990ed92
jp: "disco" subcommand, moved into a new "info" subcommand + added "version" subcommand which get software version
Goffi <goffi@goffi.org>
parents:
952
diff
changeset
|
71 |
4037
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
72 def version_get(self, jid_, profile_key=C.PROF_KEY_NONE): |
920
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
73 """ Ask version of the client that jid_ is running |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
74 @param jid_: jid from who we want to know client's version |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
75 @param profile_key: %(doc_profile_key)s |
971
8ca5c990ed92
jp: "disco" subcommand, moved into a new "info" subcommand + added "version" subcommand which get software version
Goffi <goffi@goffi.org>
parents:
952
diff
changeset
|
76 @return (tuple): a defered which fire a tuple with the following data (None if not available): |
920
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
77 - name: Natural language name of the software |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
78 - version: specific version of the software |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
79 - os: operating system of the queried entity |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
80 """ |
4037
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
81 client = self.host.get_client(profile_key) |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
82 |
4037
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
83 def version_get(__): |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
84 iq_elt = compat.IQ(client.xmlstream, "get") |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
85 iq_elt["to"] = jid_.full() |
945
899dc9cd0f35
plugin XEP-0092: feature check before requesting version
Goffi <goffi@goffi.org>
parents:
941
diff
changeset
|
86 iq_elt.addElement("query", NS_VERSION) |
899dc9cd0f35
plugin XEP-0092: feature check before requesting version
Goffi <goffi@goffi.org>
parents:
941
diff
changeset
|
87 d = iq_elt.send() |
4037
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
88 d.addCallback(self._got_version) |
945
899dc9cd0f35
plugin XEP-0092: feature check before requesting version
Goffi <goffi@goffi.org>
parents:
941
diff
changeset
|
89 return d |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
90 |
4037
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
91 d = self.host.check_feature(client, NS_VERSION, jid_) |
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
92 d.addCallback(version_get) |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
93 reactor.callLater( |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
94 TIMEOUT, d.cancel |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
95 ) # XXX: timeout needed because some clients don't answer the IQ |
920
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
96 return d |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
97 |
4037
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
98 def _got_version(self, iq_elt): |
920
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
99 try: |
3028 | 100 query_elt = next(iq_elt.elements(NS_VERSION, "query")) |
920
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
101 except StopIteration: |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
102 raise exceptions.DataError |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
103 ret = [] |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
104 for name in ("name", "version", "os"): |
920
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
105 try: |
3028 | 106 data_elt = next(query_elt.elements(NS_VERSION, name)) |
107 ret.append(str(data_elt)) | |
920
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
108 except StopIteration: |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
109 ret.append(None) |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
110 |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
111 return tuple(ret) |
45dffd67a18a
plugin XEP-0092: new plugin (software version)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
112 |
1963
a2bc5089c2eb
backend, frontends: message refactoring (huge commit):
Goffi <goffi@goffi.org>
parents:
1934
diff
changeset
|
113 def _whois(self, client, whois_msg, mess_data, target_jid): |
926
d609581bf74a
plugin text commands: refactoring, text now only contain main commands, and other plugin can add commands themselve:
Goffi <goffi@goffi.org>
parents:
920
diff
changeset
|
114 """ Add software/OS information to whois """ |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
115 |
4037
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
116 def version_cb(version_data): |
926
d609581bf74a
plugin text commands: refactoring, text now only contain main commands, and other plugin can add commands themselve:
Goffi <goffi@goffi.org>
parents:
920
diff
changeset
|
117 name, version, os = version_data |
d609581bf74a
plugin text commands: refactoring, text now only contain main commands, and other plugin can add commands themselve:
Goffi <goffi@goffi.org>
parents:
920
diff
changeset
|
118 if name: |
d609581bf74a
plugin text commands: refactoring, text now only contain main commands, and other plugin can add commands themselve:
Goffi <goffi@goffi.org>
parents:
920
diff
changeset
|
119 whois_msg.append(_("Client name: %s") % name) |
d609581bf74a
plugin text commands: refactoring, text now only contain main commands, and other plugin can add commands themselve:
Goffi <goffi@goffi.org>
parents:
920
diff
changeset
|
120 if version: |
d609581bf74a
plugin text commands: refactoring, text now only contain main commands, and other plugin can add commands themselve:
Goffi <goffi@goffi.org>
parents:
920
diff
changeset
|
121 whois_msg.append(_("Client version: %s") % version) |
d609581bf74a
plugin text commands: refactoring, text now only contain main commands, and other plugin can add commands themselve:
Goffi <goffi@goffi.org>
parents:
920
diff
changeset
|
122 if os: |
d609581bf74a
plugin text commands: refactoring, text now only contain main commands, and other plugin can add commands themselve:
Goffi <goffi@goffi.org>
parents:
920
diff
changeset
|
123 whois_msg.append(_("Operating system: %s") % os) |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
124 |
4037
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
125 def version_eb(failure): |
952
91836a647515
plugin XEP-0092: use of checkFeature instead of hasFeature + timeout + message adapted to failure if software version is not available
Goffi <goffi@goffi.org>
parents:
945
diff
changeset
|
126 failure.trap(exceptions.FeatureNotFound, defer.CancelledError) |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
127 if failure.check(failure, exceptions.FeatureNotFound): |
952
91836a647515
plugin XEP-0092: use of checkFeature instead of hasFeature + timeout + message adapted to failure if software version is not available
Goffi <goffi@goffi.org>
parents:
945
diff
changeset
|
128 whois_msg.append(_("Software version not available")) |
91836a647515
plugin XEP-0092: use of checkFeature instead of hasFeature + timeout + message adapted to failure if software version is not available
Goffi <goffi@goffi.org>
parents:
945
diff
changeset
|
129 else: |
91836a647515
plugin XEP-0092: use of checkFeature instead of hasFeature + timeout + message adapted to failure if software version is not available
Goffi <goffi@goffi.org>
parents:
945
diff
changeset
|
130 whois_msg.append(_("Client software version request timeout")) |
926
d609581bf74a
plugin text commands: refactoring, text now only contain main commands, and other plugin can add commands themselve:
Goffi <goffi@goffi.org>
parents:
920
diff
changeset
|
131 |
4037
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
132 d = self.version_get(target_jid, client.profile) |
524856bd7b19
massive refactoring to switch from camelCase to snake_case:
Goffi <goffi@goffi.org>
parents:
3479
diff
changeset
|
133 d.addCallbacks(version_cb, version_eb) |
926
d609581bf74a
plugin text commands: refactoring, text now only contain main commands, and other plugin can add commands themselve:
Goffi <goffi@goffi.org>
parents:
920
diff
changeset
|
134 return d |