freenode: guard against Freenode impersonation "feature"

Freenode allows impersonating registered users for 30 seconds,
so don't consider users registered before we've known them
for at least a minute. And be a bit paranoid about it with
parts and joins.
This commit is contained in:
moneromooo 2018-05-04 19:12:02 +01:00
parent 236a906328
commit 259aed3c66
3 changed files with 27 additions and 1 deletions

View file

@ -28,6 +28,12 @@ class FreenodeNetwork(IRCNetwork):
def identify(self,link):
nick = link.user.nick
t = self.is_known(nick)
if t < 60:
log_info('%s is not known, or only time for %d seconds' % (nick, t))
if self.on_identified:
self.on_identified(link,False)
return
log_info('Asking nickserv whether %s is identified' % nick)
self.send_to('nickserv', "ACC " + nick)