Move message size limit logic to base plugin
This is beneficial for all plugins so the bot doesn't accidentally spam things because the plugin writer didn't check their inputs Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -36,7 +36,7 @@ class Plugin:
|
||||
return self.server_config.nick
|
||||
|
||||
def send_to(self, conn: IrcProtocol, who: str, message: str):
|
||||
message = Message(None, None, "PRIVMSG", who, message)
|
||||
message = Message(None, None, "PRIVMSG", who, message[:1024])
|
||||
conn.send(str(message))
|
||||
|
||||
async def on_join(self, conn: IrcProtocol, channel: str, who: Prefix):
|
||||
|
||||
Reference in New Issue
Block a user