diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-02 00:47:45 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-02 00:47:45 +0000 |
commit | 94bb5343b1464cbec9f58ee9d90a3deae3ac5308 (patch) | |
tree | b472a590d1536d9dc23c47aa381429d00d16ed81 /src/modules/m_spanningtree | |
parent | 2455cd671f4dbc017cf7bb76fb7b29e9f95f3b40 (diff) |
Remove calls to strdup() in core, it is not better than std::string
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11623 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/addline.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/netburst.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/addline.cpp b/src/modules/m_spanningtree/addline.cpp index 858abe3a6..fe7ef6845 100644 --- a/src/modules/m_spanningtree/addline.cpp +++ b/src/modules/m_spanningtree/addline.cpp @@ -50,7 +50,7 @@ bool TreeSocket::AddLine(const std::string &prefix, parameterlist ¶ms) XLine* xl = NULL; try { - xl = xlf->Generate(ServerInstance->Time(), atoi(params[4].c_str()), params[2].c_str(), params[5].c_str(), params[1].c_str()); + xl = xlf->Generate(ServerInstance->Time(), atoi(params[4].c_str()), params[2], params[5], params[1]); } catch (ModuleException &e) { diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 2ecbd8a88..cb9d53b32 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -788,7 +788,7 @@ void ModuleSpanningTree::OnAddLine(User* user, XLine *x) char data[MAXBUF]; snprintf(data,MAXBUF,"%s %s %s %lu %lu :%s", x->type.c_str(), x->Displayable(), - ServerInstance->Config->ServerName, (unsigned long)x->set_time, (unsigned long)x->duration, x->reason); + ServerInstance->Config->ServerName, (unsigned long)x->set_time, (unsigned long)x->duration, x->reason.c_str()); parameterlist params; params.push_back(data); diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index eda627e3f..93e698dd4 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -193,10 +193,10 @@ void TreeSocket::SendXLines(TreeServer* Current) continue; snprintf(data,MAXBUF,":%s ADDLINE %s %s %s %lu %lu :%s",sn, it->c_str(), i->second->Displayable(), - i->second->source, + i->second->source.c_str(), (unsigned long)i->second->set_time, (unsigned long)i->second->duration, - i->second->reason); + i->second->reason.c_str()); this->WriteLine(data); } } |