From 17a80c5a8ef43675bf0d6937f35c950d7348f9ee Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 2 Nov 2007 14:01:55 +0000 Subject: Hopefully fix the bursting of xlines to work again (even with unknown types) and also add facility to enumerate them git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8461 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/main.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/modules/m_spanningtree/main.cpp') diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 87206ea2a..2e743689c 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -742,7 +742,7 @@ void ModuleSpanningTree::OnAddLine(XLine* line, User* user) { /* Server-set lines */ char data[MAXBUF]; - snprintf(data,MAXBUF,"%c %s %s %lu %lu :%s", line->type, line->Displayable(), ServerInstance->Config->ServerName, line->set_time, + snprintf(data,MAXBUF,"%s %s %s %lu %lu :%s", line->type.c_str(), line->Displayable(), ServerInstance->Config->ServerName, line->set_time, line->duration, line->reason); std::deque params; params.push_back(data); @@ -750,10 +750,13 @@ void ModuleSpanningTree::OnAddLine(XLine* line, User* user) } else { + /** XXX: This is WRONG and needs fixing. + * We need to implement a DELLINE + */ if (user && IS_LOCAL(user)) { char type[8]; - snprintf(type,8,"%cLINE",line->type); + snprintf(type,8,"%sLINE",line->type.c_str()); std::string stype(type); char sduration[MAXBUF]; snprintf(sduration,MAXBUF,"%ld",line->duration); @@ -770,8 +773,11 @@ void ModuleSpanningTree::OnDelLine(XLine* line, User* user) { if (user && IS_LOCAL(user)) { + /** XXX: This is WRONG and needs fixing. + * We need to implement a DELLINE + */ char type[8]; - snprintf(type,8,"%cLINE",line->type); + snprintf(type,8,"%sLINE",line->type.c_str()); std::string stype(type); std::deque params; params.push_back(line->Displayable()); -- cgit v1.3.1-10-gc9f91