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

ProtocolInterface Class Reference

#include <protocol.h>

Inheritance diagram for ProtocolInterface:

Inheritance graph
[legend]
Collaboration diagram for ProtocolInterface:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ProtocolInterface (InspIRCd *Instance)
virtual ~ProtocolInterface ()
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 SendModeStr (const std::string &target, const std::string &modeline)
 Convenience function, string wrapper around the above.
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.

Protected Attributes

InspIRCdServerInstance

Detailed Description

Definition at line 37 of file protocol.h.


Constructor & Destructor Documentation

ProtocolInterface::ProtocolInterface InspIRCd Instance  )  [inline]
 

Definition at line 42 of file protocol.h.

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

Definition at line 43 of file protocol.h.


Member Function Documentation

virtual void ProtocolInterface::GetServerList ProtoServerList sl  )  [inline, 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 in SpanningTreeProtocolInterface.

Definition at line 133 of file protocol.h.

Referenced by ModuleHttpStats::OnEvent().

virtual void ProtocolInterface::Introduce User u  )  [inline, virtual]
 

Send information about a user connection to linked servers.

Parameters:
u The user to send information about.

Reimplemented in SpanningTreeProtocolInterface.

Definition at line 138 of file protocol.h.

Referenced by User::FullConnect(), ModuleSpanningTree::ModuleSpanningTree(), and TreeSocket::ParseUID().

virtual void ProtocolInterface::PushToClient User target,
const std::string rawline
[inline, 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 in SpanningTreeProtocolInterface.

Definition at line 101 of file protocol.h.

Referenced by CommandAlltime::Handle(), ModuleSpanningTree::HandleMap(), and ModuleShowwhois::OnWhois().

virtual void ProtocolInterface::SendChannelNotice Channel target,
char  status,
const std::string text
[inline, 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 in SpanningTreeProtocolInterface.

Definition at line 115 of file protocol.h.

virtual void ProtocolInterface::SendChannelPrivmsg Channel target,
char  status,
const std::string text
[inline, 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 in SpanningTreeProtocolInterface.

Definition at line 108 of file protocol.h.

Referenced by ModuleChanLog::OnSendSnotice().

virtual void ProtocolInterface::SendEncapsulatedData parameterlist encap  )  [inline, 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 in SpanningTreeProtocolInterface.

Definition at line 51 of file protocol.h.

Referenced by SaslAuthenticator::SaslAuthenticator(), and SaslAuthenticator::SendClientMessage().

virtual void ProtocolInterface::SendMetaData void *  target,
TargetTypeFlags  type,
const std::string key,
const std::string data
[inline, 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 in SpanningTreeProtocolInterface.

Definition at line 59 of file protocol.h.

Referenced by CommandSwhois::Handle(), CommandTitle::Handle(), ModuleSWhois::OnPostCommand(), ModuleSSLOpenSSL::OnPostConnect(), ModuleSSLGnuTLS::OnPostConnect(), and ModuleSASL::OnPostConnect().

virtual void ProtocolInterface::SendMode const std::string target,
parameterlist modedata
[inline, 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 in SpanningTreeProtocolInterface.

Definition at line 71 of file protocol.h.

Referenced by ModuleModesOnOper::ApplyModes(), CommandSamode::Handle(), and SendModeStr().

virtual void ProtocolInterface::SendModeNotice const std::string modes,
const std::string text
[inline, 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 in SpanningTreeProtocolInterface.

Definition at line 89 of file protocol.h.

virtual void ProtocolInterface::SendModeStr const std::string target,
const std::string modeline
[inline, virtual]
 

Convenience function, string wrapper around the above.

Definition at line 75 of file protocol.h.

References irc::sepstream::GetToken(), and SendMode().

Referenced by ModuleTimedBans::OnBackgroundTimer(), and ModuleMsgFlood::ProcessMessages().

virtual void ProtocolInterface::SendSNONotice const std::string snomask,
const std::string text
[inline, 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 in SpanningTreeProtocolInterface.

Definition at line 95 of file protocol.h.

Referenced by CommandSATopic::Handle().

virtual void ProtocolInterface::SendTopic Channel channel,
std::string topic
[inline, 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 in SpanningTreeProtocolInterface.

Definition at line 65 of file protocol.h.

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

Send a notice to a user.

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

Reimplemented in SpanningTreeProtocolInterface.

Definition at line 127 of file protocol.h.

Referenced by ModuleSpanningTree::RemoteMessage().

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

Send a message to a user.

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

Reimplemented in SpanningTreeProtocolInterface.

Definition at line 121 of file protocol.h.


Member Data Documentation

InspIRCd* ProtocolInterface::ServerInstance [protected]
 

Definition at line 40 of file protocol.h.

Referenced by SpanningTreeProtocolInterface::Introduce(), SpanningTreeProtocolInterface::PushToClient(), SpanningTreeProtocolInterface::SendChannelNotice(), SpanningTreeProtocolInterface::SendChannelPrivmsg(), SpanningTreeProtocolInterface::SendEncapsulatedData(), SpanningTreeProtocolInterface::SendMetaData(), SpanningTreeProtocolInterface::SendMode(), SpanningTreeProtocolInterface::SendModeNotice(), SpanningTreeProtocolInterface::SendSNONotice(), SpanningTreeProtocolInterface::SendTopic(), SpanningTreeProtocolInterface::SendUserNotice(), and SpanningTreeProtocolInterface::SendUserPrivmsg().


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