From f5e4f5291134f8fbccc497931fbbecea296e6397 Mon Sep 17 00:00:00 2001 From: Dpeta <69427753+Dpeta@users.noreply.github.com> Date: Tue, 12 Sep 2023 22:25:48 +0200 Subject: [PATCH] Don't send begin/color to bots --- parsetools.py | 5 +++-- pesterchum.py | 8 ++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/parsetools.py b/parsetools.py index 777cfe1..b9a2bb3 100644 --- a/parsetools.py +++ b/parsetools.py @@ -17,6 +17,7 @@ from pnc import lexercon from generic import mysteryTime from quirks import ScriptQuirks from pyquirks import PythonQuirks +from scripts.services import BOTNAMES PchumLog = logging.getLogger("pchumLogger") @@ -851,8 +852,8 @@ def kxhandleInput(ctx, text=None, flavor=None, irc_compatible=False): if flavor == "convo": # if ceased, rebegin if hasattr(ctx, "chumopen") and not ctx.chumopen: - if not irc_compatible: - ctx.mainwindow.newConvoStarted.emit(str(ctx.title()), True) + if not irc_compatible and ctx.title().casefold() not in BOTNAMES: + ctx.mainwindow.newConvoStarted.emit(ctx.title(), True) ctx.setChumOpen(True) # Post-process and send the messages. diff --git a/pesterchum.py b/pesterchum.py index 00493ce..ec4baec 100755 --- a/pesterchum.py +++ b/pesterchum.py @@ -1903,12 +1903,8 @@ class PesterWindow(MovingWindow): if chum.handle.casefold() in BOTNAMES: convoWindow.toggleQuirks(True) convoWindow.quirksOff.setChecked(True) - if ( - not self.config.irc_compatibility_mode() - or chum.handle.casefold() in CUSTOMBOTS - ): - self.newConvoStarted.emit(chum.handle, initiated) - else: + elif not self.config.irc_compatibility_mode(): + # Send PESTERCHUM:BEGIN and color. self.newConvoStarted.emit(chum.handle, initiated) convoWindow.show()