summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-26 20:53:08 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-26 20:53:08 +0000
commitdeb290af0f0200d530ba10e4c6c3f6a45b4971c5 (patch)
treefbed86f98cbc733483079143523e8ed6e141221f /src/modules
parent99795271eb95232d826a55988748ca16081ba677 (diff)
Fix reiterpret_cast stuff that doesnt work right
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4548 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 9f02af689..f14cc69de 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -3923,12 +3923,21 @@ class ModuleSpanningTree : public Module
if (params->size() < 2)
return;
// Insert the TS value of the object, either userrec or chanrec
- classbase* a = reinterpret_cast<classbase*>(Srv->FindNick((*params)[0]));
- if (!a)
+ time_t ourTS = 0;
+ userrec* a = Srv->FindNick((*params)[0]);
+ if (a)
{
- a = reinterpret_cast<classbase*>(Srv->FindChannel((*params)[0]));
+ ourTS = a->age;
+ }
+ else
+ {
+ chanrec* a = Srv->FindChannel((*params)[0]);
+ if (a)
+ {
+ ourTS = a->age;
+ }
}
- params->insert(params->begin() + 1,ConvToStr(a->age));
+ params->insert(params->begin() + 1,ConvToStr(ourTS));
DoOneToMany(Srv->GetServerName(),"FMODE",*params);
}
}