encap.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
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
00022
00023
00024
00026 bool TreeSocket::Encap(const std::string &prefix, std::deque<std::string> ¶ms)
00027 {
00028 if (params.size() > 1)
00029 {
00030 if (InspIRCd::Match(ServerInstance->Config->GetSID(), params[0]))
00031 {
00032 Event event((char*) ¶ms, (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