InspIRCd  3.0
Classes | Public Types | Public Member Functions | List of all members
ProtocolInterface Class Reference

Classes

class  ServerInfo
 

Public Types

typedef ProtocolServer Server
 
typedef std::vector< ServerInfoServerList
 

Public Member Functions

virtual bool SendEncapsulatedData (const std::string &targetmask, const std::string &cmd, const parameterlist &params, User *source=NULL)
 
virtual void BroadcastEncap (const std::string &cmd, const parameterlist &params, User *source=NULL, User *omit=NULL)
 
virtual void SendMetaData (Channel *chan, const std::string &key, const std::string &data)
 
virtual void SendMetaData (User *user, const std::string &key, const std::string &data)
 
virtual void SendMetaData (const std::string &key, const std::string &data)
 
virtual void SendSNONotice (char snomask, const std::string &text)
 
virtual void SendMessage (Channel *target, char status, const std::string &text, MessageType type=MSG_PRIVMSG)
 
virtual void SendMessage (User *target, const std::string &text, MessageType type=MSG_PRIVMSG)
 
void SendChannelNotice (Channel *target, char status, const std::string &text)
 
void SendUserNotice (User *target, const std::string &text)
 
virtual void GetServerList (ServerList &sl)
 

Member Function Documentation

◆ BroadcastEncap()

virtual void ProtocolInterface::BroadcastEncap ( const std::string &  cmd,
const parameterlist &  params,
User source = NULL,
User omit = NULL 
)
inlinevirtual

Send an ENCAP message to all servers. See the protocol documentation for the purpose of ENCAP.

Parameters
cmdThe ENCAP subcommand
paramsList of string parameters which are dependant on the subcommand
sourceThe source of the message (prefix), must be a local user or a user behind 'omit' or NULL which is equivalent to the local server
omitIf non-NULL the message won't be sent in the direction of this server, useful for forwarding messages

◆ GetServerList()

virtual void ProtocolInterface::GetServerList ( ServerList &  sl)
inlinevirtual

Fill a list of servers and information about them.

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

◆ SendChannelNotice()

void ProtocolInterface::SendChannelNotice ( Channel target,
char  status,
const std::string &  text 
)
inline

Send a notice to a channel.

Parameters
targetThe channel to message.
statusThe status character (e.g. %) required to recieve.
textThe message to send.

◆ SendEncapsulatedData()

virtual bool ProtocolInterface::SendEncapsulatedData ( const std::string &  targetmask,
const std::string &  cmd,
const parameterlist &  params,
User source = NULL 
)
inlinevirtual

Send an ENCAP message to all servers matching a wildcard string. See the protocol documentation for the purpose of ENCAP.

Parameters
targetmaskThe target server mask (can contain wildcards)
cmdThe ENCAP subcommand
paramsList of string parameters which are dependant on the subcommand
sourceThe source of the message (prefix), must be a local user or NULL which means use local server
Returns
Always true if the target mask contains wildcards; otherwise true if the server name was found, and the message was sent, false if it was not found. ENCAP (should) be used instead of creating new protocol messages for easier third party application support.

◆ SendMessage() [1/2]

virtual void ProtocolInterface::SendMessage ( Channel target,
char  status,
const std::string &  text,
MessageType  type = MSG_PRIVMSG 
)
inlinevirtual

Send a message to a channel.

Parameters
targetThe channel to message.
statusThe status character (e.g. %) required to recieve.
textThe message to send.
typeThe message type (MSG_PRIVMSG or MSG_NOTICE)

◆ SendMessage() [2/2]

virtual void ProtocolInterface::SendMessage ( User target,
const std::string &  text,
MessageType  type = MSG_PRIVMSG 
)
inlinevirtual

Send a message to a user.

Parameters
targetThe user to message.
textThe message to send.
typeThe message type (MSG_PRIVMSG or MSG_NOTICE)

◆ SendMetaData() [1/3]

virtual void ProtocolInterface::SendMetaData ( Channel chan,
const std::string &  key,
const std::string &  data 
)
inlinevirtual

Send metadata for a channel to other linked servers.

Parameters
chanThe channel to send metadata for
keyThe 'key' of the data, e.g. "swhois" for swhois desc on a user
dataThe string representation of the data

◆ SendMetaData() [2/3]

virtual void ProtocolInterface::SendMetaData ( User user,
const std::string &  key,
const std::string &  data 
)
inlinevirtual

Send metadata for a user to other linked servers.

Parameters
userThe user to send metadata for
keyThe 'key' of the data, e.g. "swhois" for swhois desc on a user
dataThe string representation of the data

◆ SendMetaData() [3/3]

virtual void ProtocolInterface::SendMetaData ( const std::string &  key,
const std::string &  data 
)
inlinevirtual

Send metadata related to the server to other linked servers.

Parameters
keyThe 'key' of the data
dataThe string representation of the data

◆ SendSNONotice()

virtual void ProtocolInterface::SendSNONotice ( char  snomask,
const std::string &  text 
)
inlinevirtual

Send a notice to users with a given snomask.

Parameters
snomaskThe snomask required for the message to be sent.
textThe message to send.

◆ SendUserNotice()

void ProtocolInterface::SendUserNotice ( User target,
const std::string &  text 
)
inline

Send a notice to a user.

Parameters
targetThe user to message.
textThe message to send.

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