Refresh userlist on nick change
This commit is contained in:
parent
3d740658b0
commit
085efda62b
5 changed files with 24 additions and 8 deletions
|
@ -8,10 +8,11 @@
|
|||
- Send ping if we haven't received any data from the server in 30 seconds.
|
||||
- Show S3RV3R NOT R3SPOND1NG if the server hasn't responded in 45 seconds. (15 seconds after ping)
|
||||
- Close connection and try to reconnect if the server hasn't responded in 90 seconds. (60 seconds after ping)
|
||||
|
||||
|
||||
### Fixed
|
||||
- Error when manually moving group.
|
||||
- EOF on send not resulting in a disconnect.
|
||||
- Desynced memo userlist on handle change, userlist is now re-requested from server on handle change.
|
||||
|
||||
## [v2.4.1] - 2022-07-05
|
||||
|
||||
|
|
18
irc.py
18
irc.py
|
@ -754,14 +754,17 @@ class PesterHandler(DefaultCommandHandler):
|
|||
#self.parent.userPresentUpdate.emit("", channel, m+":%s" % (op))
|
||||
|
||||
def nick(self, oldnick, newnick, hopcount=0):
|
||||
# NICK from/to us
|
||||
PchumLog.info("%s, %s" % (oldnick, newnick))
|
||||
# svsnick
|
||||
if oldnick == self.mainwindow.profile().handle:
|
||||
# Server changed our handle, svsnick?
|
||||
self.parent.getSvsnickedOn.emit(oldnick, newnick)
|
||||
|
||||
# NICK from/to someone else
|
||||
# etc.
|
||||
oldhandle = oldnick[0:oldnick.find("!")]
|
||||
if oldhandle == self.mainwindow.profile().handle:
|
||||
if ((oldhandle == self.mainwindow.profile().handle)
|
||||
or (newnick == self.mainwindow.profile().handle)):
|
||||
#print('hewwo')
|
||||
self.parent.myHandleChanged.emit(newnick)
|
||||
newchum = PesterProfile(newnick, chumdb=self.mainwindow.chumdb)
|
||||
self.parent.moodUpdated.emit(oldhandle, Mood("offline"))
|
||||
|
@ -792,7 +795,14 @@ class PesterHandler(DefaultCommandHandler):
|
|||
# helpers.msg(self.client, "#pesterchum", getglub)
|
||||
|
||||
def endofnames(self, server, nick, channel, msg):
|
||||
namelist = self.channelnames[channel]
|
||||
try:
|
||||
namelist = self.channelnames[channel]
|
||||
except KeyError:
|
||||
# EON seems to return with wrong capitalization sometimes?
|
||||
for cn in self.channelnames.keys():
|
||||
if channel.lower() == cn.lower():
|
||||
channel = cn
|
||||
namelist = self.channelnames[channel]
|
||||
pl = PesterList(namelist)
|
||||
del self.channelnames[channel]
|
||||
self.parent.namesReceived.emit(channel, pl)
|
||||
|
|
|
@ -321,6 +321,7 @@ class IRCClient:
|
|||
|
||||
for el in data:
|
||||
tags, prefix, command, args = parse_raw_irc_command(el)
|
||||
print(tags, prefix, command, args)
|
||||
try:
|
||||
# Only need tags with tagmsg
|
||||
if command.upper() == "TAGMSG":
|
||||
|
|
|
@ -107,9 +107,10 @@ class CommandHandler(object):
|
|||
try:
|
||||
f(*args)
|
||||
except TypeError as e:
|
||||
logging.info("Failed to pass command, did the server pass an unsupported paramater? " + str(e))
|
||||
PchumLog.info("Failed to pass command, did the server pass an unsupported paramater? " + str(e))
|
||||
except Exception as e:
|
||||
logging.info("Failed to pass command, %s" % str(e))
|
||||
#logging.info("Failed to pass command, %s" % str(e))
|
||||
PchumLog.exception("Failed to pass command")
|
||||
|
||||
@protected
|
||||
def __unhandled__(self, cmd, *args):
|
||||
|
|
|
@ -1573,7 +1573,7 @@ class PesterWindow(MovingWindow):
|
|||
if self.sincerecv >= 30:
|
||||
self.pingServer.emit()
|
||||
|
||||
self.sincerecv += 15 # Only updating every 10s is better for performance.
|
||||
self.sincerecv += 15 # Only updating every 15s is better for performance.
|
||||
|
||||
def profile(self):
|
||||
return self.userprofile.chat
|
||||
|
@ -3316,6 +3316,9 @@ class PesterWindow(MovingWindow):
|
|||
self.changeProfile(svsnick=(oldhandle, newhandle))
|
||||
@QtCore.pyqtSlot(QString)
|
||||
def myHandleChanged(self, handle):
|
||||
# Update nick in channels
|
||||
for memo in self.memos.keys():
|
||||
self.requestNames.emit(memo)
|
||||
if self.profile().handle == handle:
|
||||
self.doAutoIdentify()
|
||||
self.doAutoJoins()
|
||||
|
|
Loading…
Reference in a new issue