From fe3799248f7d4cf50b1ba704615d5952dede8917 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 28 Aug 2006 01:02:41 +0000 Subject: Add support for NAMESX Tidy up m_alias blank lines Add m_namesx.so to example conf (no extra config tags required for it, it "just works") git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5039 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 46 ++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 20 deletions(-) (limited to 'src/modules/m_spanningtree.cpp') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 95a6a97f2..cceaeb70d 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -4018,17 +4018,20 @@ class ModuleSpanningTree : public Module if (IS_LOCAL(user)) { chanrec *c = (chanrec*)dest; - std::string cname = c->name; - if (status) - cname = status + cname; - std::deque list; - GetListOfServersForChannel(c,list); - unsigned int ucount = list.size(); - for (unsigned int i = 0; i < ucount; i++) + if (c) { - TreeSocket* Sock = list[i]->GetSocket(); - if (Sock) - Sock->WriteLine(":"+std::string(user->nick)+" NOTICE "+cname+" :"+text); + std::string cname = c->name; + if (status) + cname = status + cname; + std::deque list; + GetListOfServersForChannel(c,list); + unsigned int ucount = list.size(); + for (unsigned int i = 0; i < ucount; i++) + { + TreeSocket* Sock = list[i]->GetSocket(); + if (Sock) + Sock->WriteLine(":"+std::string(user->nick)+" NOTICE "+cname+" :"+text); + } } } } @@ -4066,17 +4069,20 @@ class ModuleSpanningTree : public Module if (IS_LOCAL(user)) { chanrec *c = (chanrec*)dest; - std::string cname = c->name; - if (status) - cname = status + cname; - std::deque list; - GetListOfServersForChannel(c,list); - unsigned int ucount = list.size(); - for (unsigned int i = 0; i < ucount; i++) + if (c) { - TreeSocket* Sock = list[i]->GetSocket(); - if (Sock) - Sock->WriteLine(":"+std::string(user->nick)+" PRIVMSG "+cname+" :"+text); + std::string cname = c->name; + if (status) + cname = status + cname; + std::deque list; + GetListOfServersForChannel(c,list); + unsigned int ucount = list.size(); + for (unsigned int i = 0; i < ucount; i++) + { + TreeSocket* Sock = list[i]->GetSocket(); + if (Sock) + Sock->WriteLine(":"+std::string(user->nick)+" PRIVMSG "+cname+" :"+text); + } } } } -- cgit v1.3.1-10-gc9f91