From b868bb52c55fc902e0acab3c4a43576826817e85 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sat, 24 Oct 2009 03:29:58 +0000 Subject: Get rid of ModePair git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11963 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_invisible.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/modules/m_invisible.cpp') diff --git a/src/modules/m_invisible.cpp b/src/modules/m_invisible.cpp index 0c7cc4dc7..cc2080f7f 100644 --- a/src/modules/m_invisible.cpp +++ b/src/modules/m_invisible.cpp @@ -49,7 +49,11 @@ class InvisibleMode : public ModeHandler snprintf(tb,MAXBUF,":%s %s %s", dest->GetFullHost().c_str(), adding ? "PART" : "JOIN", (*f)->name.c_str()); std::string out = tb; - std::string n = ServerInstance->Modes->ModeString(dest, (*f)); + Membership* memb = (**f).GetUser(dest); + std::string ms = memb->modes; + for(unsigned int i=0; i < memb->modes.length(); i++) + ms.append(" ").append(dest->nick); + for (UserMembCIter i = ulist->begin(); i != ulist->end(); i++) { @@ -57,8 +61,8 @@ class InvisibleMode : public ModeHandler if (IS_LOCAL(i->first) && !IS_OPER(i->first)) { i->first->Write(out); - if (!n.empty() && !adding) - i->first->WriteServ("MODE %s +%s", (*f)->name.c_str(), n.c_str()); + if (!ms.empty() && !adding) + i->first->WriteServ("MODE %s +%s", (**f).name.c_str(), ms.c_str()); } } } -- cgit v1.2.3