The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

encap.cpp

Go to the documentation of this file.
00001 /*       +------------------------------------+
00002  *       | Inspire Internet Relay Chat Daemon |
00003  *       +------------------------------------+
00004  *
00005  *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
00006  * See: http://www.inspircd.org/wiki/index.php/Credits
00007  *
00008  * This program is free but copyrighted software; see
00009  *            the file COPYING for details.
00010  *
00011  * ---------------------------------------------------
00012  */
00013 
00014 #include "inspircd.h"
00015 #include "xline.h"
00016 
00017 #include "m_spanningtree/treesocket.h"
00018 #include "m_spanningtree/treeserver.h"
00019 #include "m_spanningtree/utils.h"
00020 
00021 /* $ModDep: m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */
00022 
00023 
00024 
00026 bool TreeSocket::Encap(const std::string &prefix, std::deque<std::string> &params)
00027 {
00028         if (params.size() > 1)
00029         {
00030                 if (InspIRCd::Match(ServerInstance->Config->GetSID(), params[0]))
00031                 {
00032                         Event event((char*) &params, (Module*)this->Utils->Creator, "encap_received");
00033                         event.Send(ServerInstance);
00034                 }
00035 
00036                 if (params[0].find('*') != std::string::npos)
00037                 {
00038                         Utils->DoOneToAllButSender(prefix, "ENCAP", params, prefix);
00039                 }
00040                 else
00041                         Utils->DoOneToOne(prefix, "ENCAP", params, params[0]);
00042         }
00043         return true;
00044 }
00045