require spam to be in multiple channels
i dont know why we are entertaining pasting multiple duplicate lines in a channel, but this commit will avoid banning for that.
This commit is contained in:
parent
d3935c53cf
commit
60d6d97160
1 changed files with 5 additions and 1 deletions
6
bam.py
6
bam.py
|
@ -37,7 +37,7 @@ class Server(BaseServer):
|
||||||
if line.params[1] in self.isoper:
|
if line.params[1] in self.isoper:
|
||||||
self.isoper.remove(line.params[1])
|
self.isoper.remove(line.params[1])
|
||||||
return
|
return
|
||||||
await self.send_raw(BADLINE.format(line.params[2].split()[3]))
|
await self.send_raw(BADLINE.format(line.params[2].split()[4]))
|
||||||
await self.send_raw(KILL.format(line.params[1]))
|
await self.send_raw(KILL.format(line.params[1]))
|
||||||
|
|
||||||
async def on_privmsg(self, line):
|
async def on_privmsg(self, line):
|
||||||
|
@ -55,10 +55,14 @@ class Server(BaseServer):
|
||||||
self.log[nick].pop(0)
|
self.log[nick].pop(0)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
channels = []
|
||||||
for msg in self.log[nick][:-1]:
|
for msg in self.log[nick][:-1]:
|
||||||
|
channels.append(msg[1])
|
||||||
if msg[2] != line.params[1]:
|
if msg[2] != line.params[1]:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if len(set(channels)) < 2:
|
||||||
|
return
|
||||||
|
|
||||||
await self.send(build("WHOIS",[nick,nick]))
|
await self.send(build("WHOIS",[nick,nick]))
|
||||||
await self.send_raw(LOG.format(nick,','.join(set([ln[1] for ln in self.log[nick]]))))
|
await self.send_raw(LOG.format(nick,','.join(set([ln[1] for ln in self.log[nick]]))))
|
||||||
|
|
Loading…
Reference in a new issue