Пример #1
0
    def __init__(self, jid, password, authorized, reactor=reactor, port=5222, resource="JabberBot"):
        self.jabberid   = jid
        self.password   = password
        self.authorized = authorized
        self.servername = jid[jid.find('@')+1:]
        self.port       = port
        self.resource   = resource

        self._jid           = None
        self._factory       = None
        self._reactor       = reactor
        self._resource      = None
        self._xmlstream     = None
        self.tryandregister = 1
Пример #2
0
    def __init__(self, jid, password, reactor=reactor, port=5222, resource="ANTISPAM_BOT"):
        self.jid = jid
        self.list = []
	self.password = password
	self.n = 0
	self.servername = jid[jid.find('@')+1:]
	self.port = port
	self.resource = str(random.randrange(100,999))
	self._jid = None
	self._factory = None
	self._reactor = reactor
	self._resource = None
	self._xmlstream = None
	self.tryandregister = 1
	self.connect()
Пример #3
0
	def __init__(self, jid, password, servername=None, reactor=reactor, port=5222, resource="JabberBot"):

                if not servername:
                    servername = jid[jid.find('@')+1:]
                    print("servername: %s", servername)
 
		self.jabberid = jid
		self.password = password
		self.servername = servername
		self.port = port
		self.resource = resource
		
		# internal values
		self._jid = None
		self._factory = None
		self._reactor = reactor
		self._resource = None
		self._xmlstream = None
		self.tryandregister = 1