pmarks-net / dtella

A decentralized Direct Connect "hub"
GNU General Public License v2.0
7 stars 2 forks source link

Kick of user causes loss of IRC connection #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There was an instance on 2008-04-16 21:10 where a user was kicked by
services (ModMan) and it caused the bridge to lose connection to IRC.

== IRC Transcript ==
...
[9:10pm] <|Rockzo> lol wisconsin law
[9:10pm] <|Rockzo> “IF YOU LEAVE A LOADED FIREARM WITHIN THE
[9:10pm] <|Rockzo> REACH OR EASY ACCESS OF A CHILD YOU MAY BE
[9:10pm] * |Rockzo was kicked by ModMan (Turn caps lock OFF!)
[9:10pm] |NICHOLAS «dtFFA9B1@dh-436995BD.resnet.purdue.edu» has Quit iRC
(nucleus.dhirc.com purdue.bridge.dtella.org) «626 people»
[9:10pm] |Face`we-H «dt623493@dh-CA36CE6B.resnet.purdue.edu» has Quit iRC
(nucleus.dhirc.com purdue.bridge.dtella.org) «625 people»
...

== Bridge Log ==
...
2009-04-16 21:10:25,675 - P - <: :536AAAUIK PRIVMSG #dtella :lol wisconsin law
2009-04-16 21:10:26,730 - P - <: :536AAAUIK PRIVMSG #dtella :IF YOU LEAVE A
LOADED FIREARM WITHIN THE
2009-04-16 21:10:26,734 - P - <: :536AAAUIK PRIVMSG #dtella :REACH OR EASY
ACCESS OF A CHILD YOU MAY BE
2009-04-16 21:10:26,762 - P - <: :536AAAUIK PRIVMSG #dtella :FINED OR
IMPRISONED OR BOTH IF THE CHILD
2009-04-16 21:10:26,763 - P - <: :536AAAUIK PRIVMSG #dtella :IMPROPERLY
DISCHARGES, POSSESSES, OR EXHIBITS
2009-04-16 21:10:26,766 - P - <: :536AAAUIK PRIVMSG #dtella :THE FIREARM.
2009-04-16 21:10:26,771 - P - >: :00AAAAAAH KICK #dtella 536AAAUIK :Turn
caps lock OFF!
2009-04-16 21:10:26,773 - D - Sign Time = 0.002079 sec
2009-04-16 21:10:26,774 - P - <: :536AAAUIK QUIT :Kicked
2009-04-16 21:10:26,775 - P - >: :00AAAAAAH KICK #dtella 536AAAUIK :Turn
caps lock OFF!
2009-04-16 21:10:26,796 - C - Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/twisted/python/log.py", line 51,
in callWithLogger
    return callWithContext({"system": lp}, func, *args, **kw)
  File "/usr/lib/python2.5/site-packages/twisted/python/log.py", line 36,
in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/usr/lib/python2.5/site-packages/twisted/python/context.py", line
59, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib/python2.5/site-packages/twisted/python/context.py", line
37, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File
"/usr/lib/python2.5/site-packages/twisted/internet/selectreactor.py", line
146, in _doReadOrWrite
    why = getattr(selectable, method)()
  File "/usr/lib/python2.5/site-packages/twisted/internet/tcp.py", line
362, in doRead
    return self.protocol.dataReceived(data)
  File "/usr/lib/python2.5/site-packages/twisted/protocols/basic.py", line
148, in dataReceived
    self.lineReceived(line)
  File "/home/dtella/bridge/dtella/bridge/inspircd.py", line 245, in
lineReceived
    f(prefix, args[1:])
  File "/home/dtella/bridge/dtella/bridge/inspircd.py", line 385, in
handleCmd_KICK
    n00b_u = self.ism.findUser(n00b)
  File "/home/dtella/bridge/dtella/bridge/bridge_server.py", line 431, in
findUser
    return self.users[inick.lower()]
exceptions.KeyError: '536aaauik'

2009-04-16 21:10:26,798 - I - Lost IRC connection.
...

Original issue reported on code.google.com by jacob.feisley on 17 Apr 2009 at 1:23

GoogleCodeExporter commented 9 years ago
The problem here is that there is an unavoidable race between the bridge 
sending a
QUIT to IRC, and IRC sending a message which references the nick who just left. 
 I'll
think about how to best resolve this.

Original comment by sparkm...@gmail.com on 17 Apr 2009 at 4:21

GoogleCodeExporter commented 9 years ago
I rewrote a lot of the nick-related stuff for InspIRCd a few months back.  As 
far as I 
know, this issue has been fixed for a while.

Original comment by sparkm...@gmail.com on 2 Sep 2009 at 4:24