Only send time on JOIN if time isn't CURRENT.
CURRENT/'i' should be taken as the default anyway, and it's much much less spammy like this. With large memos it's very easy to trigger flood protection if every handle sends a TIME>i whenever someone joins.
This commit is contained in:
parent
16625ba936
commit
5981a27817
2 changed files with 7 additions and 3 deletions
6
memos.py
6
memos.py
|
@ -1732,7 +1732,11 @@ class PesterMemo(PesterConvo):
|
|||
elif update == "join":
|
||||
self.addUser(h)
|
||||
time = self.time.getTime()
|
||||
serverText = "PESTERCHUM:TIME>" + delta2txt(time, "server")
|
||||
txt_time = delta2txt(time, "server")
|
||||
# Only send if time isn't CURRENT, it's very spammy otherwise.
|
||||
# CURRENT should be the default already.
|
||||
if txt_time != "i":
|
||||
serverText = "PESTERCHUM:TIME>" + txt_time
|
||||
self.messageSent.emit(serverText, self.title())
|
||||
elif update == "+q":
|
||||
for c in chums:
|
||||
|
|
|
@ -2106,7 +2106,7 @@ class PesterWindow(MovingWindow):
|
|||
self.setChannelMode.emit(channel, "+s", "")
|
||||
if invite:
|
||||
self.setChannelMode.emit(channel, "+i", "")
|
||||
memoWindow.sendTimeInfo()
|
||||
# memoWindow.sendTimeInfo()
|
||||
memoWindow.show()
|
||||
|
||||
def addChum(self, chum):
|
||||
|
|
Loading…
Reference in a new issue