Exemple #1
0
    def __init__(self, sock, host, port):
        """
    init the class
    """
        Telnet.__init__(self, host=host, port=port, sock=sock)

        self.ttype = 'Client'
        self.connectedtime = None
        self.pwtries = 0
        self.banned = False
        self.viewonly = False

        if sock:
            self.connected = True
            self.connectedtime = time.localtime()

        self.api('events.register')('to_client_event',
                                    self.addtooutbufferevent,
                                    prio=99)

        self.api('options.prepareclient')(self)

        self.state = PASSWORD
        self.addtooutbufferevent({
            'original':
            self.api('colors.convertcolors')(
                '@R#BP@w: @RPlease enter the proxy password:@w'),
            'dtype':
            'passwd'
        })
Exemple #2
0
  def __init__(self, sock, host, port):
    """
    init the class
    """
    Telnet.__init__(self, host=host, port=port, sock=sock)

    self.ttype = 'Client'
    self.connectedtime = None
    self.pwtries = 0
    self.banned = False
    self.viewonly = False

    if sock:
      self.connected = True
      self.connectedtime = time.localtime()

    self.api('events.register')('to_client_event',
                                self.addtooutbufferevent, prio=99)

    self.api('options.prepareclient')(self)

    self.state = PASSWORD
    self.addtooutbufferevent({'original':self.api('colors.convertcolors')(
        '@R#BP@w: @RPlease enter the proxy password:@w'),
                              'dtype':'passwd'})
Exemple #3
0
  def __init__(self):
    """
    init the class
    """
    Telnet.__init__(self)

    self.lastmsg = ''
    self.ttype = 'BastProxy'
    self.connectedtime = None
    self.api('events.register')('to_mud_event', self.addtooutbuffer,
                                prio=99)
    self.api('options.prepareserver')(self)
    self.api('managers.add')('mud', self)
    self.api('log.adddtype')('rawmud')
Exemple #4
0
    def __init__(self):
        """
    init the class
    """
        Telnet.__init__(self)

        self.lastmsg = ''
        self.ttype = 'BastProxy'
        self.connectedtime = None
        self.api('events.register')('to_mud_event',
                                    self.addtooutbuffer,
                                    prio=99)
        self.api('options.prepareserver')(self)
        self.api('managers.add')('mud', self)
        self.api('log.adddtype')('rawmud')
Exemple #5
0
    def __init__(self):
        """
    init the class
    """
        Telnet.__init__(self)

        self.username = None
        self.password = None
        self.api = API()
        self.lastmsg = ''
        self.clients = []
        self.vclients = []
        self.ttype = 'BastProxy'
        self.banned = {}
        self.connectedtime = None
        self.api('events.register')('to_mud_event',
                                    self.addtooutbuffer,
                                    prio=99)
        self.api('options.prepareserver')(self)