Fix outdated PesterIRC args (+black)

This commit is contained in:
Dpeta 2023-02-12 18:28:21 +01:00
parent 3326d7af50
commit 34dacaea70
No known key found for this signature in database
GPG key ID: 51227517CEA0030C
2 changed files with 7 additions and 3 deletions

3
irc.py
View file

@ -787,8 +787,7 @@ class PesterIRC(QtCore.QThread):
cur = l
else:
modes.append("{}{}".format(cur, l))
for (i, m) in enumerate(modes):
for i, m in enumerate(modes):
# Server-set usermodes don't need to be passed.
if (handles == [""]) & (("x" in m) | ("z" in m) | ("o" in m)) != True:
try:

View file

@ -4320,6 +4320,7 @@ class MainProgram(QtCore.QObject):
self.attempts = 0
# but it's at least better than the way it was before.
# FIXME: we should not pass widget here
self.irc = PesterIRC(
self.widget,
self.widget.config.server(),
@ -4498,7 +4499,11 @@ class MainProgram(QtCore.QObject):
stop = None
if stop is None:
self.irc = PesterIRC(
self.widget.config, self.widget, verify_hostname=verify_hostname
self.widget,
self.widget.config.server(),
self.widget.config.port(),
self.widget.config.ssl(),
verify_hostname=verify_hostname,
)
self.connectWidgets(self.irc, self.widget)
self.irc.start()