mirror of
				https://github.com/osmarks/autobotrobot
				synced 2025-10-31 16:02:59 +00:00 
			
		
		
		
	"deal with" invalid UTF-8
This commit is contained in:
		| @@ -6,6 +6,7 @@ import util | ||||
| import logging | ||||
| import hashlib | ||||
| import discord.ext.commands as commands | ||||
| from jaraco.stream import buffer | ||||
|  | ||||
| def scramble(text): | ||||
|     n = list(text) | ||||
| @@ -40,6 +41,7 @@ async def initialize(): | ||||
|     joined = set() | ||||
|  | ||||
|     loop = asyncio.get_event_loop() | ||||
|     irc.client.ServerConnection.buffer_class = buffer.LenientDecodingLineBuffer # should not crash in the face of invalid UTF-8 | ||||
|     reactor = irc.client_aio.AioReactor(loop=loop) | ||||
|     conn = await reactor.server().connect(util.config["irc"]["server"], util.config["irc"]["port"], util.config["irc"]["nick"]) | ||||
|     global global_conn | ||||
|   | ||||
		Reference in New Issue
	
	Block a user