|
|
@@ -3,6 +3,7 @@
|
|
|
import sys, random, string, ssl
|
|
|
import irc.bot#, irc.strings
|
|
|
from irc.client import ip_numstr_to_quad#, ip_quad_to_numstr
|
|
|
+from jaraco.stream import buffer
|
|
|
from postgres import Postgres
|
|
|
import commands.public, commands.admin, commands.games, commands.statistics
|
|
|
import events.on_welcome, events.on_join, events.on_kick, events.on_mode, events.on_pubmsg, events.on_action, events.on_whoreply, events.on_nick
|
|
|
@@ -31,12 +32,15 @@ class PyRot(irc.bot.SingleServerIRCBot):
|
|
|
self.protectees = {}
|
|
|
self.channelkeys = {}
|
|
|
|
|
|
+ print("Starting pyRot, the third RotBot by tBkwtWS.")
|
|
|
+ log.info("Connecting to " + host + ":" + str(port) + "/" + self.homechannel)
|
|
|
+
|
|
|
if usessl:
|
|
|
factory = irc.connection.Factory(wrapper=ssl.wrap_socket)
|
|
|
else:
|
|
|
factory = irc.connection.Factory()
|
|
|
- print("Starting pyRot, the third RotBot by tBkwtWS.")
|
|
|
- log.info("Connecting to " + host + ":" + str(port) + "/" + self.homechannel)
|
|
|
+
|
|
|
+ irc.client.ServerConnection.buffer_class = buffer.LenientDecodingLineBuffer
|
|
|
try:
|
|
|
irc.bot.SingleServerIRCBot.__init__(self, [(host, port)], nickname, username, connect_factory=factory)
|
|
|
except irc.client.ServerConnectionError:
|