plugin manhole: added "jid" module to globals

This commit is contained in:
Goffi 2019-03-03 17:17:07 +01:00
commit 6d7e6185ff

View file

@ -23,6 +23,7 @@ from sat.core.log import getLogger
from twisted.conch.insults import insults
from twisted.conch.telnet import TelnetTransport, TelnetBootstrapProtocol
from twisted.internet import reactor, protocol
from twisted.words.protocols.jabber import jid
from twisted.conch.manhole import ColoredManhole
log = getLogger(__name__)
@ -56,6 +57,7 @@ class Manhole(object):
f = protocol.ServerFactory()
namespace = {
u"host": self.host,
u"jid": jid,
}
f.protocol = lambda: TelnetTransport(TelnetBootstrapProtocol,
insults.ServerProtocol,