After 60526f60a8 (#31), `irccat.tcp.Run(irccat.irc)` is called (if the config calls for it) before, rather than after, `irccat.connectIRC()`, which changes `irccat.irc` away from a nil pointer in the first place. This pointer is copied into the `irc` field of a TCPListener `l` by `irccat.tcp.Run()`. A panic won't actually happen until the TCP listener handles its first message, if it ever comes, and in doing so passes the nil pointer further down to `dispatcher.Send(l.irc, ...)`. To fix, bring the call to `irccat.connectIRC()` forward again, to before any listener setup is done at all. This probably makes sense stylistically too.master
|
|
||
70 |
|
70 |
|
71 |
|
71 |
|
72 |
|
72 |
|
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
73 |
|
80 |
|
74 |
|
81 |
|
75 |
|
82 |
|
|
|
||
79 |
|
86 |
|
80 |
|
87 |
|
81 |
|
88 |
|
82 |
|
|
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
|
|
|
89 |
|
89 |
|
90 |
|
90 |
|
91 |
|
91 |
|