This commit is contained in:
Ryan Hitchman 2010-02-22 16:49:30 -07:00
parent 923fdead1c
commit 9b25bc524f
2 changed files with 3 additions and 3 deletions

2
bot.py
View File

@ -58,8 +58,8 @@ while True:
for conn in bot.conns.itervalues(): for conn in bot.conns.itervalues():
try: try:
out = conn.out.get_nowait() out = conn.out.get_nowait()
main(conn, out)
except Queue.Empty: except Queue.Empty:
pass pass
main(conn, out)
while all(conn.out.empty() for conn in bot.conns.itervalues()): while all(conn.out.empty() for conn in bot.conns.itervalues()):
time.sleep(.3) time.sleep(.3)

View File

@ -89,7 +89,7 @@ class crlf_ssl_tcp(crlf_tcp):
def create_socket(self): def create_socket(self):
return wrap_socket(crlf_tcp.create_socket(self), server_side=False, return wrap_socket(crlf_tcp.create_socket(self), server_side=False,
cert_reqs = [CERT_NONE, CERT_REQUIRED][self.ignore_cert_errors]) cert_reqs = [CERT_REQUIRED, CERT_NONE][self.ignore_cert_errors])
def recv_from_socket(self, nbytes): def recv_from_socket(self, nbytes):
return self.socket.read(nbytes) return self.socket.read(nbytes)
@ -229,7 +229,7 @@ class FakeIRC(IRC):
class SSLIRC(IRC): class SSLIRC(IRC):
def __init__(self, server, nick, port=6667, channels=[], conf={}, def __init__(self, server, nick, port=6667, channels=[], conf={},
ignore_certificate_errors=True): ignore_certificate_errors=True):
self.ignore_cert_errors = ignore_cert_errors self.ignore_cert_errors = ignore_certificate_errors
IRC.__init__(self, server, nick, port, channels, conf) IRC.__init__(self, server, nick, port, channels, conf)
def create_connection(self): def create_connection(self):