From f13202da23167c8bf8ea457ba75a497d83806f34 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 24 Nov 2006 16:32:16 +0000 Subject: [PATCH] In answer to w00ts question, the channel might not exist, because of the following situation user A exists on both servers. When servers link, user A is collided, but one or both servers still get the FJOIN: FJOIN #chan 1234 :@,A of course, A is gone, the only join to the channel fails, so the channel actually doesnt exist at the end of the loop, so chan == NULL :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5790 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 9138e7ff1..b5c4ce92d 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1810,7 +1810,12 @@ class TreeSocket : public InspSocket { /* find created channel .. */ chan = this->Instance->FindChan(channel); - if (chan) /* shouldn't be needed, seems it is */ + if (chan) + /* w00t said this shouldnt be needed but it is. + * This isnt strictly true, as chan can be NULL + * if a nick collision has occured and therefore + * the channel was never created. + */ chan->age = TS; } -- 2.39.5