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

push.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 "commands/cmd_whois.h"
00016 #include "commands/cmd_stats.h"
00017 #include "socket.h"
00018 #include "xline.h"
00019 #include "transport.h"
00020 #include "socketengine.h"
00021 
00022 #include "m_spanningtree/main.h"
00023 #include "m_spanningtree/utils.h"
00024 #include "m_spanningtree/treeserver.h"
00025 #include "m_spanningtree/treesocket.h"
00026 
00027 /* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */
00028 
00029 bool TreeSocket::Push(const std::string &prefix, std::deque<std::string> &params)
00030 {
00031         if (params.size() < 2)
00032                 return true;
00033         User* u = this->ServerInstance->FindNick(params[0]);
00034         if (!u)
00035                 return true;
00036         if (IS_LOCAL(u))
00037         {
00038                 u->Write(params[1]);
00039         }
00040         else
00041         {
00042                 // continue the raw onwards
00043                 params[1] = ":" + params[1];
00044                 Utils->DoOneToOne(prefix,"PUSH",params,u->server);
00045         }
00046         return true;
00047 }
00048