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

SpanningTreeProtocolInterface Class Reference

#include <protocolinterface.h>

Inheritance diagram for SpanningTreeProtocolInterface:

Inheritance graph
[legend]
Collaboration diagram for SpanningTreeProtocolInterface:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SpanningTreeProtocolInterface (ModuleSpanningTree *mod, SpanningTreeUtilities *util, InspIRCd *Instance)
virtual ~SpanningTreeProtocolInterface ()
virtual void SendEncapsulatedData (parameterlist &encap)
 Send an ENCAP message to one or more linked servers.
virtual void SendMetaData (void *target, TargetTypeFlags type, const std::string &key, const std::string &data)
 Send metadata for an object to other linked servers.
virtual void SendTopic (Channel *channel, std::string &topic)
 Send a topic change for a channel.
virtual void SendMode (const std::string &target, parameterlist &modedata)
 Send mode changes for an object.
virtual void SendModeNotice (const std::string &modes, const std::string &text)
 Send a notice to users with a given mode(s).
virtual void SendSNONotice (const std::string &snomask, const std::string &text)
 Send a notice to users with a given snomask.
virtual void PushToClient (User *target, const std::string &rawline)
 Send raw data to a remote client.
virtual void SendChannelPrivmsg (Channel *target, char status, const std::string &text)
 Send a message to a channel.
virtual void SendChannelNotice (Channel *target, char status, const std::string &text)
 Send a notice to a channel.
virtual void SendUserPrivmsg (User *target, const std::string &text)
 Send a message to a user.
virtual void SendUserNotice (User *target, const std::string &text)
 Send a notice to a user.
virtual void GetServerList (ProtoServerList &sl)
 Fill a list of servers and information about them.
virtual void Introduce (User *u)
 Send information about a user connection to linked servers.

Private Member Functions

void SendChannel (Channel *target, char status, const std::string &text)

Private Attributes

SpanningTreeUtilitiesUtils
ModuleSpanningTreeModule

Detailed Description

Definition at line 7 of file protocolinterface.h.


Constructor & Destructor Documentation

SpanningTreeProtocolInterface::SpanningTreeProtocolInterface ModuleSpanningTree mod,
SpanningTreeUtilities util,
InspIRCd Instance
[inline]
 

Definition at line 13 of file protocolinterface.h.

virtual SpanningTreeProtocolInterface::~SpanningTreeProtocolInterface  )  [inline, virtual]
 

Definition at line 14 of file protocolinterface.h.


Member Function Documentation

void SpanningTreeProtocolInterface::GetServerList ProtoServerList sl  )  [virtual]
 

Fill a list of servers and information about them.

Parameters:
sl The list of servers to fill. XXX: document me properly, this is shit.

Reimplemented from ProtocolInterface.

Definition at line 12 of file protocolinterface.cpp.

References ProtoServer::gecos, TreeServer::GetName(), ProtoServer::latencyms, ProtoServer::opercount, ProtoServer::parentname, SpanningTreeUtilities::serverlist, ProtoServer::servername, ProtoServer::usercount, and Utils.

void SpanningTreeProtocolInterface::Introduce User u  )  [virtual]
 

Send information about a user connection to linked servers.

Parameters:
u The user to send information about.

Reimplemented from ProtocolInterface.

Definition at line 183 of file protocolinterface.cpp.

References classbase::age, InspIRCd::Config, ConvToStr(), User::dhost, SpanningTreeUtilities::DoOneToMany(), SpanningTreeUtilities::FindServer(), User::FormatModes(), User::fullname, User::GetIPString(), ServerConfig::GetSID(), User::host, User::ident, IS_LOCAL, User::nick, User::server, ProtocolInterface::ServerInstance, TreeServer::SetUserCount(), User::signon, Utils, and User::uuid.

void SpanningTreeProtocolInterface::PushToClient User target,
const std::string rawline
[virtual]
 

Send raw data to a remote client.

Parameters:
target The user to push data to.
rawline The raw IRC protocol line to deliver (":me NOTICE you :foo", whatever).

Reimplemented from ProtocolInterface.

Definition at line 122 of file protocolinterface.cpp.

References InspIRCd::Config, SpanningTreeUtilities::DoOneToOne(), ServerConfig::GetSID(), User::server, ProtocolInterface::ServerInstance, Utils, and User::uuid.

void SpanningTreeProtocolInterface::SendChannel Channel target,
char  status,
const std::string text
[private]
 

Definition at line 130 of file protocolinterface.cpp.

References SpanningTreeUtilities::GetListOfServersForChannel(), Channel::name, Utils, and TreeSocket::WriteLine().

Referenced by SendChannelNotice(), and SendChannelPrivmsg().

void SpanningTreeProtocolInterface::SendChannelNotice Channel target,
char  status,
const std::string text
[virtual]
 

Send a notice to a channel.

Parameters:
target The channel to message.
status The status character (e.g. %) required to recieve.
text The message to send.

Reimplemented from ProtocolInterface.

Definition at line 152 of file protocolinterface.cpp.

References InspIRCd::Config, ServerConfig::GetSID(), Channel::name, SendChannel(), and ProtocolInterface::ServerInstance.

void SpanningTreeProtocolInterface::SendChannelPrivmsg Channel target,
char  status,
const std::string text
[virtual]
 

Send a message to a channel.

Parameters:
target The channel to message.
status The status character (e.g. %) required to recieve.
text The message to send.

Reimplemented from ProtocolInterface.

Definition at line 147 of file protocolinterface.cpp.

References InspIRCd::Config, ServerConfig::GetSID(), Channel::name, SendChannel(), and ProtocolInterface::ServerInstance.

void SpanningTreeProtocolInterface::SendEncapsulatedData parameterlist encap  )  [virtual]
 

Send an ENCAP message to one or more linked servers.

See the protocol documentation for the purpose of ENCAP.

Parameters:
encap This is a list of string parameters, the first of which must be a server ID or glob matching servernames. The second must be a subcommand. All subsequent parameters are dependant on the subcommand. ENCAP (should) be used instead of creating new protocol messages for easier third party application support.

Reimplemented from ProtocolInterface.

Definition at line 29 of file protocolinterface.cpp.

References InspIRCd::Config, SpanningTreeUtilities::DoOneToMany(), ServerConfig::GetSID(), ProtocolInterface::ServerInstance, and Utils.

void SpanningTreeProtocolInterface::SendMetaData void *  target,
TargetTypeFlags  type,
const std::string key,
const std::string data
[virtual]
 

Send metadata for an object to other linked servers.

Parameters:
target The object to send metadata for.
type The type of metadata to send (TYPE_USER, TYPE_CHANNEL, etc)
key The 'key' of the data, e.g. "swhois" for swhois desc on a user
data The string representation of the data

Reimplemented from ProtocolInterface.

Definition at line 34 of file protocolinterface.cpp.

References InspIRCd::Config, SpanningTreeUtilities::DoOneToMany(), ServerConfig::GetSID(), ProtocolInterface::ServerInstance, TYPE_CHANNEL, TYPE_SERVER, TYPE_USER, and Utils.

void SpanningTreeProtocolInterface::SendMode const std::string target,
parameterlist modedata
[virtual]
 

Send mode changes for an object.

Parameters:
target The channel name or user to send mode changes for.
The mode changes to send.

Reimplemented from ProtocolInterface.

Definition at line 71 of file protocolinterface.cpp.

References classbase::age, InspIRCd::Config, ConvToStr(), SpanningTreeUtilities::DoOneToMany(), InspIRCd::FindChan(), InspIRCd::FindNick(), ServerConfig::GetSID(), InspIRCd::Parser, ProtocolInterface::ServerInstance, TR_NICK, CommandParser::TranslateUIDs(), and Utils.

void SpanningTreeProtocolInterface::SendModeNotice const std::string modes,
const std::string text
[virtual]
 

Send a notice to users with a given mode(s).

Parameters:
modes The modes required for the message to be sent.
text The message to send.

Reimplemented from ProtocolInterface.

Definition at line 106 of file protocolinterface.cpp.

References InspIRCd::Config, SpanningTreeUtilities::DoOneToMany(), ServerConfig::GetSID(), ProtocolInterface::ServerInstance, and Utils.

void SpanningTreeProtocolInterface::SendSNONotice const std::string snomask,
const std::string text
[virtual]
 

Send a notice to users with a given snomask.

Parameters:
snomask The snomask required for the message to be sent.
text The message to send.

Reimplemented from ProtocolInterface.

Definition at line 114 of file protocolinterface.cpp.

References InspIRCd::Config, SpanningTreeUtilities::DoOneToMany(), ServerConfig::GetSID(), ProtocolInterface::ServerInstance, and Utils.

void SpanningTreeProtocolInterface::SendTopic Channel channel,
std::string topic
[virtual]
 

Send a topic change for a channel.

Parameters:
channel The channel to change the topic for.
topic The new topic to use for the channel.

Reimplemented from ProtocolInterface.

Definition at line 59 of file protocolinterface.cpp.

References InspIRCd::Config, ConvToStr(), SpanningTreeUtilities::DoOneToMany(), ServerConfig::GetSID(), Channel::name, ProtocolInterface::ServerInstance, ServerConfig::ServerName, InspIRCd::Time(), and Utils.

void SpanningTreeProtocolInterface::SendUserNotice User target,
const std::string text
[virtual]
 

Send a notice to a user.

Parameters:
target The user to message.
text The message to send.

Reimplemented from ProtocolInterface.

Definition at line 170 of file protocolinterface.cpp.

References InspIRCd::Config, SpanningTreeUtilities::FindServer(), ServerConfig::GetSID(), TreeServer::GetSocket(), User::nick, User::server, ProtocolInterface::ServerInstance, Utils, and TreeSocket::WriteLine().

void SpanningTreeProtocolInterface::SendUserPrivmsg User target,
const std::string text
[virtual]
 

Send a message to a user.

Parameters:
target The user to message.
text The message to send.

Reimplemented from ProtocolInterface.

Definition at line 157 of file protocolinterface.cpp.

References InspIRCd::Config, SpanningTreeUtilities::FindServer(), ServerConfig::GetSID(), TreeServer::GetSocket(), User::nick, User::server, ProtocolInterface::ServerInstance, Utils, and TreeSocket::WriteLine().


Member Data Documentation

ModuleSpanningTree* SpanningTreeProtocolInterface::Module [private]
 

Definition at line 10 of file protocolinterface.h.

SpanningTreeUtilities* SpanningTreeProtocolInterface::Utils [private]
 

Definition at line 9 of file protocolinterface.h.

Referenced by GetServerList(), Introduce(), PushToClient(), SendChannel(), SendEncapsulatedData(), SendMetaData(), SendMode(), SendModeNotice(), SendSNONotice(), SendTopic(), SendUserNotice(), and SendUserPrivmsg().


The documentation for this class was generated from the following files: