mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
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:
parent
236a906328
commit
259aed3c66
3 changed files with 27 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue