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
8
memos.py
8
memos.py
|
@ -1732,8 +1732,12 @@ class PesterMemo(PesterConvo):
|
||||||
elif update == "join":
|
elif update == "join":
|
||||||
self.addUser(h)
|
self.addUser(h)
|
||||||
time = self.time.getTime()
|
time = self.time.getTime()
|
||||||
serverText = "PESTERCHUM:TIME>" + delta2txt(time, "server")
|
txt_time = delta2txt(time, "server")
|
||||||
self.messageSent.emit(serverText, self.title())
|
# 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":
|
elif update == "+q":
|
||||||
for c in chums:
|
for c in chums:
|
||||||
c.founder = True
|
c.founder = True
|
||||||
|
|
|
@ -2106,7 +2106,7 @@ class PesterWindow(MovingWindow):
|
||||||
self.setChannelMode.emit(channel, "+s", "")
|
self.setChannelMode.emit(channel, "+s", "")
|
||||||
if invite:
|
if invite:
|
||||||
self.setChannelMode.emit(channel, "+i", "")
|
self.setChannelMode.emit(channel, "+i", "")
|
||||||
memoWindow.sendTimeInfo()
|
# memoWindow.sendTimeInfo()
|
||||||
memoWindow.show()
|
memoWindow.show()
|
||||||
|
|
||||||
def addChum(self, chum):
|
def addChum(self, chum):
|
||||||
|
|
Loading…
Reference in a new issue