1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>InspIRCd: Server Class Reference</title>
4 <link href="inspircd.doxygen.css" rel="stylesheet" type="text/css">
6 <!-- Generated by Doxygen 1.4.4-20050815 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div>
8 <h1>Server Class Reference</h1><!-- doxytag: class="Server" --><!-- doxytag: inherits="classbase" -->Allows server output and query functions This class contains methods which allow a module to query the state of the irc server, and produce output to users and other servers.
9 <a href="#_details">More...</a>
11 <code>#include <<a class="el" href="modules_8h-source.html">modules.h</a>></code>
13 Inheritance diagram for Server:<p><center><img src="classServer__inherit__graph.gif" border="0" usemap="#Server__inherit__map" alt="Inheritance graph"></center>
14 <map name="Server__inherit__map">
15 <area href="classclassbase.html" shape="rect" coords="7,7,87,34" alt="">
17 <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for Server:<p><center><img src="classServer__coll__graph.gif" border="0" usemap="#Server__coll__map" alt="Collaboration graph"></center>
18 <map name="Server__coll__map">
19 <area href="classclassbase.html" shape="rect" coords="7,97,87,124" alt="">
21 <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center><a href="classServer-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
23 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
24 <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#Server_28_29">Server</a> ()</td></tr>
26 <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#Server_28_29"></a><br></td></tr>
27 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#_7EServer_28_29">~Server</a> ()</td></tr>
29 <tr><td class="mdescLeft"> </td><td class="mdescRight">Default destructor. <a href="#_7EServer_28_29"></a><br></td></tr>
30 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classServerConfig.html">ServerConfig</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#GetConfig_28_29">GetConfig</a> ()</td></tr>
32 <tr><td class="mdescLeft"> </td><td class="mdescRight">Obtains a pointer to the server's <a class="el" href="classServerConfig.html">ServerConfig</a> object. <a href="#GetConfig_28_29"></a><br></td></tr>
33 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#SendOpers_28std_3A_3Astring_20s_29">SendOpers</a> (<a class="el" href="namespaceirc.html#string">std::string</a> s)</td></tr>
35 <tr><td class="mdescLeft"> </td><td class="mdescRight">Sends text to all opers. <a href="#SendOpers_28std_3A_3Astring_20s_29"></a><br></td></tr>
36 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#Log_28int_20level_2C_20std_3A_3Astring_20s_29">Log</a> (int level, <a class="el" href="namespaceirc.html#string">std::string</a> s)</td></tr>
38 <tr><td class="mdescLeft"> </td><td class="mdescRight">Writes a log string. <a href="#Log_28int_20level_2C_20std_3A_3Astring_20s_29"></a><br></td></tr>
39 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#Send_28int_20Socket_2C_20std_3A_3Astring_20s_29">Send</a> (int Socket, <a class="el" href="namespaceirc.html#string">std::string</a> s)</td></tr>
41 <tr><td class="mdescLeft"> </td><td class="mdescRight">Sends a line of text down a TCP/IP socket. <a href="#Send_28int_20Socket_2C_20std_3A_3Astring_20s_29"></a><br></td></tr>
42 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#SendServ_28int_20Socket_2C_20std_3A_3Astring_20s_29">SendServ</a> (int Socket, <a class="el" href="namespaceirc.html#string">std::string</a> s)</td></tr>
44 <tr><td class="mdescLeft"> </td><td class="mdescRight">Sends text from the server to a socket. <a href="#SendServ_28int_20Socket_2C_20std_3A_3Astring_20s_29"></a><br></td></tr>
45 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#SendChannelServerNotice_28std_3A_3Astring_20ServName_2C_20chanrec_20_2AChannel_2C_20std_3A_3Astring_20text_29">SendChannelServerNotice</a> (<a class="el" href="namespaceirc.html#string">std::string</a> ServName, <a class="el" href="classchanrec.html">chanrec</a> *Channel, <a class="el" href="namespaceirc.html#string">std::string</a> text)</td></tr>
47 <tr><td class="mdescLeft"> </td><td class="mdescRight">Writes text to a channel, but from a server, including all. <a href="#SendChannelServerNotice_28std_3A_3Astring_20ServName_2C_20chanrec_20_2AChannel_2C_20std_3A_3Astring_20text_29"></a><br></td></tr>
48 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#SendFrom_28int_20Socket_2C_20userrec_20_2AUser_2C_20std_3A_3Astring_20s_29">SendFrom</a> (int Socket, <a class="el" href="classuserrec.html">userrec</a> *User, <a class="el" href="namespaceirc.html#string">std::string</a> s)</td></tr>
50 <tr><td class="mdescLeft"> </td><td class="mdescRight">Sends text from a user to a socket. <a href="#SendFrom_28int_20Socket_2C_20userrec_20_2AUser_2C_20std_3A_3Astring_20s_29"></a><br></td></tr>
51 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#SendTo_28userrec_20_2ASource_2C_20userrec_20_2ADest_2C_20std_3A_3Astring_20s_29">SendTo</a> (<a class="el" href="classuserrec.html">userrec</a> *Source, <a class="el" href="classuserrec.html">userrec</a> *Dest, <a class="el" href="namespaceirc.html#string">std::string</a> s)</td></tr>
53 <tr><td class="mdescLeft"> </td><td class="mdescRight">Sends text from a user to another user. <a href="#SendTo_28userrec_20_2ASource_2C_20userrec_20_2ADest_2C_20std_3A_3Astring_20s_29"></a><br></td></tr>
54 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#SendChannel_28userrec_20_2AUser_2C_20chanrec_20_2AChannel_2C_20std_3A_3Astring_20s_2C_20bool_20IncludeSender_29">SendChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *User, <a class="el" href="classchanrec.html">chanrec</a> *Channel, <a class="el" href="namespaceirc.html#string">std::string</a> s, bool IncludeSender)</td></tr>
56 <tr><td class="mdescLeft"> </td><td class="mdescRight">Sends text from a user to a channel (mulicast). <a href="#SendChannel_28userrec_20_2AUser_2C_20chanrec_20_2AChannel_2C_20std_3A_3Astring_20s_2C_20bool_20IncludeSender_29"></a><br></td></tr>
57 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#CommonChannels_28userrec_20_2Au_31_2C_20userrec_20_2Au_32_29">CommonChannels</a> (<a class="el" href="classuserrec.html">userrec</a> *u1, <a class="el" href="classuserrec.html">userrec</a> *u2)</td></tr>
59 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if two users share a common channel. <a href="#CommonChannels_28userrec_20_2Au_31_2C_20userrec_20_2Au_32_29"></a><br></td></tr>
60 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#SendCommon_28userrec_20_2AUser_2C_20std_3A_3Astring_20text_2C_20bool_20IncludeSender_29">SendCommon</a> (<a class="el" href="classuserrec.html">userrec</a> *User, <a class="el" href="namespaceirc.html#string">std::string</a> text, bool IncludeSender)</td></tr>
62 <tr><td class="mdescLeft"> </td><td class="mdescRight">Sends text from a user to one or more channels (mulicast). <a href="#SendCommon_28userrec_20_2AUser_2C_20std_3A_3Astring_20text_2C_20bool_20IncludeSender_29"></a><br></td></tr>
63 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#SendWallops_28userrec_20_2AUser_2C_20std_3A_3Astring_20text_29">SendWallops</a> (<a class="el" href="classuserrec.html">userrec</a> *User, <a class="el" href="namespaceirc.html#string">std::string</a> text)</td></tr>
65 <tr><td class="mdescLeft"> </td><td class="mdescRight">Sends a WALLOPS message. <a href="#SendWallops_28userrec_20_2AUser_2C_20std_3A_3Astring_20text_29"></a><br></td></tr>
66 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#IsNick_28std_3A_3Astring_20nick_29">IsNick</a> (<a class="el" href="namespaceirc.html#string">std::string</a> nick)</td></tr>
68 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if a nick is valid. <a href="#IsNick_28std_3A_3Astring_20nick_29"></a><br></td></tr>
69 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#CountUsers_28chanrec_20_2Ac_29">CountUsers</a> (<a class="el" href="classchanrec.html">chanrec</a> *c)</td></tr>
71 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a count of the number of users on a channel. <a href="#CountUsers_28chanrec_20_2Ac_29"></a><br></td></tr>
72 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classuserrec.html">userrec</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#FindNick_28std_3A_3Astring_20nick_29">FindNick</a> (<a class="el" href="namespaceirc.html#string">std::string</a> nick)</td></tr>
74 <tr><td class="mdescLeft"> </td><td class="mdescRight">Attempts to look up a nick and return a pointer to it. <a href="#FindNick_28std_3A_3Astring_20nick_29"></a><br></td></tr>
75 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classuserrec.html">userrec</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#FindDescriptor_28int_20socket_29">FindDescriptor</a> (int socket)</td></tr>
77 <tr><td class="mdescLeft"> </td><td class="mdescRight">Attempts to look up a nick using the file descriptor associated with that nick. <a href="#FindDescriptor_28int_20socket_29"></a><br></td></tr>
78 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classchanrec.html">chanrec</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#FindChannel_28std_3A_3Astring_20channel_29">FindChannel</a> (<a class="el" href="namespaceirc.html#string">std::string</a> channel)</td></tr>
80 <tr><td class="mdescLeft"> </td><td class="mdescRight">Attempts to look up a channel and return a pointer to it. <a href="#FindChannel_28std_3A_3Astring_20channel_29"></a><br></td></tr>
81 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="namespaceirc.html#string">std::string</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#ChanMode_28userrec_20_2AUser_2C_20chanrec_20_2AChan_29">ChanMode</a> (<a class="el" href="classuserrec.html">userrec</a> *User, <a class="el" href="classchanrec.html">chanrec</a> *Chan)</td></tr>
83 <tr><td class="mdescLeft"> </td><td class="mdescRight">Attempts to look up a user's privilages on a channel. <a href="#ChanMode_28userrec_20_2AUser_2C_20chanrec_20_2AChan_29"></a><br></td></tr>
84 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#IsOnChannel_28userrec_20_2AUser_2C_20chanrec_20_2AChan_29">IsOnChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *User, <a class="el" href="classchanrec.html">chanrec</a> *Chan)</td></tr>
86 <tr><td class="mdescLeft"> </td><td class="mdescRight">Checks if a user is on a channel. <a href="#IsOnChannel_28userrec_20_2AUser_2C_20chanrec_20_2AChan_29"></a><br></td></tr>
87 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="namespaceirc.html#string">std::string</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#GetServerName_28_29">GetServerName</a> ()</td></tr>
89 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the server name of the server where the module is loaded. <a href="#GetServerName_28_29"></a><br></td></tr>
90 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="namespaceirc.html#string">std::string</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#GetNetworkName_28_29">GetNetworkName</a> ()</td></tr>
92 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the network name, global to all linked servers. <a href="#GetNetworkName_28_29"></a><br></td></tr>
93 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="namespaceirc.html#string">std::string</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#GetServerDescription_28_29">GetServerDescription</a> ()</td></tr>
95 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the server description string of the local server. <a href="#GetServerDescription_28_29"></a><br></td></tr>
96 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classAdmin.html">Admin</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#GetAdmin_28_29">GetAdmin</a> ()</td></tr>
98 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the information of the server as returned by the /ADMIN command. <a href="#GetAdmin_28_29"></a><br></td></tr>
99 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#AddExtendedMode_28char_20modechar_2C_20int_20type_2C_20bool_20requires_5Foper_2C_20int_20params_5Fwhen_5Fon_2C_20int_20params_5Fwhen_5Foff_29">AddExtendedMode</a> (char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)</td></tr>
101 <tr><td class="mdescLeft"> </td><td class="mdescRight">Adds an extended mode letter which is parsed by a module. <a href="#AddExtendedMode_28char_20modechar_2C_20int_20type_2C_20bool_20requires_5Foper_2C_20int_20params_5Fwhen_5Fon_2C_20int_20params_5Fwhen_5Foff_29"></a><br></td></tr>
102 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#AddExtendedListMode_28char_20modechar_29">AddExtendedListMode</a> (char modechar)</td></tr>
104 <tr><td class="mdescLeft"> </td><td class="mdescRight">Adds an extended mode letter which is parsed by a module and handled in a list fashion. <a href="#AddExtendedListMode_28char_20modechar_29"></a><br></td></tr>
105 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#AddCommand_28char_20_2Acmd_2C_20handlerfunc_20f_2C_20char_20flags_2C_20int_20minparams_2C_20char_20_2Asource_29">AddCommand</a> (char *cmd, <a class="el" href="inspircd_8h.html#handlerfunc_29_28char_20_2A_2A_2C_20int_2C_20userrec_20_2A_29">handlerfunc</a> f, char flags, int minparams, char *source)</td></tr>
107 <tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a command to the command table. <a href="#AddCommand_28char_20_2Acmd_2C_20handlerfunc_20f_2C_20char_20flags_2C_20int_20minparams_2C_20char_20_2Asource_29"></a><br></td></tr>
108 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#SendMode_28char_20_2A_2Aparameters_2C_20int_20pcnt_2C_20userrec_20_2Auser_29">SendMode</a> (char **parameters, int pcnt, <a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
110 <tr><td class="mdescLeft"> </td><td class="mdescRight">Sends a servermode. <a href="#SendMode_28char_20_2A_2Aparameters_2C_20int_20pcnt_2C_20userrec_20_2Auser_29"></a><br></td></tr>
111 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#SendToModeMask_28std_3A_3Astring_20modes_2C_20int_20flags_2C_20std_3A_3Astring_20text_29">SendToModeMask</a> (<a class="el" href="namespaceirc.html#string">std::string</a> modes, int flags, <a class="el" href="namespaceirc.html#string">std::string</a> text)</td></tr>
113 <tr><td class="mdescLeft"> </td><td class="mdescRight">Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter. <a href="#SendToModeMask_28std_3A_3Astring_20modes_2C_20int_20flags_2C_20std_3A_3Astring_20text_29"></a><br></td></tr>
114 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classchanrec.html">chanrec</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#JoinUserToChannel_28userrec_20_2Auser_2C_20std_3A_3Astring_20cname_2C_20std_3A_3Astring_20key_29">JoinUserToChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *user, <a class="el" href="namespaceirc.html#string">std::string</a> cname, <a class="el" href="namespaceirc.html#string">std::string</a> key)</td></tr>
116 <tr><td class="mdescLeft"> </td><td class="mdescRight">Forces a user to join a channel. <a href="#JoinUserToChannel_28userrec_20_2Auser_2C_20std_3A_3Astring_20cname_2C_20std_3A_3Astring_20key_29"></a><br></td></tr>
117 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classchanrec.html">chanrec</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#PartUserFromChannel_28userrec_20_2Auser_2C_20std_3A_3Astring_20cname_2C_20std_3A_3Astring_20reason_29">PartUserFromChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *user, <a class="el" href="namespaceirc.html#string">std::string</a> cname, <a class="el" href="namespaceirc.html#string">std::string</a> reason)</td></tr>
119 <tr><td class="mdescLeft"> </td><td class="mdescRight">Forces a user to part a channel. <a href="#PartUserFromChannel_28userrec_20_2Auser_2C_20std_3A_3Astring_20cname_2C_20std_3A_3Astring_20reason_29"></a><br></td></tr>
120 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#ChangeUserNick_28userrec_20_2Auser_2C_20std_3A_3Astring_20nickname_29">ChangeUserNick</a> (<a class="el" href="classuserrec.html">userrec</a> *user, <a class="el" href="namespaceirc.html#string">std::string</a> nickname)</td></tr>
122 <tr><td class="mdescLeft"> </td><td class="mdescRight">Forces a user nickchange. <a href="#ChangeUserNick_28userrec_20_2Auser_2C_20std_3A_3Astring_20nickname_29"></a><br></td></tr>
123 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#QuitUser_28userrec_20_2Auser_2C_20std_3A_3Astring_20reason_29">QuitUser</a> (<a class="el" href="classuserrec.html">userrec</a> *user, <a class="el" href="namespaceirc.html#string">std::string</a> reason)</td></tr>
125 <tr><td class="mdescLeft"> </td><td class="mdescRight">Forces a user to quit with the specified reason. <a href="#QuitUser_28userrec_20_2Auser_2C_20std_3A_3Astring_20reason_29"></a><br></td></tr>
126 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#MatchText_28std_3A_3Astring_20sliteral_2C_20std_3A_3Astring_20spattern_29">MatchText</a> (<a class="el" href="namespaceirc.html#string">std::string</a> sliteral, <a class="el" href="namespaceirc.html#string">std::string</a> spattern)</td></tr>
128 <tr><td class="mdescLeft"> </td><td class="mdescRight">Matches text against a glob pattern. <a href="#MatchText_28std_3A_3Astring_20sliteral_2C_20std_3A_3Astring_20spattern_29"></a><br></td></tr>
129 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#CallCommandHandler_28std_3A_3Astring_20commandname_2C_20char_20_2A_2Aparameters_2C_20int_20pcnt_2C_20userrec_20_2Auser_29">CallCommandHandler</a> (<a class="el" href="namespaceirc.html#string">std::string</a> commandname, char **parameters, int pcnt, <a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
131 <tr><td class="mdescLeft"> </td><td class="mdescRight">Calls the handler for a command, either implemented by the core or by another module. <a href="#CallCommandHandler_28std_3A_3Astring_20commandname_2C_20char_20_2A_2Aparameters_2C_20int_20pcnt_2C_20userrec_20_2Auser_29"></a><br></td></tr>
132 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#IsValidModuleCommand_28std_3A_3Astring_20commandname_2C_20int_20pcnt_2C_20userrec_20_2Auser_29">IsValidModuleCommand</a> (<a class="el" href="namespaceirc.html#string">std::string</a> commandname, int pcnt, <a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
134 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#ChangeHost_28userrec_20_2Auser_2C_20std_3A_3Astring_20host_29">ChangeHost</a> (<a class="el" href="classuserrec.html">userrec</a> *user, <a class="el" href="namespaceirc.html#string">std::string</a> host)</td></tr>
136 <tr><td class="mdescLeft"> </td><td class="mdescRight">Change displayed hostname of a user. <a href="#ChangeHost_28userrec_20_2Auser_2C_20std_3A_3Astring_20host_29"></a><br></td></tr>
137 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#ChangeGECOS_28userrec_20_2Auser_2C_20std_3A_3Astring_20gecos_29">ChangeGECOS</a> (<a class="el" href="classuserrec.html">userrec</a> *user, <a class="el" href="namespaceirc.html#string">std::string</a> gecos)</td></tr>
139 <tr><td class="mdescLeft"> </td><td class="mdescRight">Change GECOS (fullname) of a user. <a href="#ChangeGECOS_28userrec_20_2Auser_2C_20std_3A_3Astring_20gecos_29"></a><br></td></tr>
140 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#IsUlined_28std_3A_3Astring_20server_29">IsUlined</a> (<a class="el" href="namespaceirc.html#string">std::string</a> server)</td></tr>
142 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the servername you give is ulined. <a href="#IsUlined_28std_3A_3Astring_20server_29"></a><br></td></tr>
143 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="modules_8h.html#chanuserlist">chanuserlist</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#GetUsers_28chanrec_20_2Achan_29">GetUsers</a> (<a class="el" href="classchanrec.html">chanrec</a> *chan)</td></tr>
145 <tr><td class="mdescLeft"> </td><td class="mdescRight">Fetches the userlist of a channel. <a href="#GetUsers_28chanrec_20_2Achan_29"></a><br></td></tr>
146 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#UserToPseudo_28userrec_20_2Auser_2C_20std_3A_3Astring_20message_29">UserToPseudo</a> (<a class="el" href="classuserrec.html">userrec</a> *user, <a class="el" href="namespaceirc.html#string">std::string</a> message)</td></tr>
148 <tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a user's connection to the irc server, but leave their client in existence in the user hash. <a href="#UserToPseudo_28userrec_20_2Auser_2C_20std_3A_3Astring_20message_29"></a><br></td></tr>
149 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#PseudoToUser_28userrec_20_2Aalive_2C_20userrec_20_2Azombie_2C_20std_3A_3Astring_20message_29">PseudoToUser</a> (<a class="el" href="classuserrec.html">userrec</a> *alive, <a class="el" href="classuserrec.html">userrec</a> *zombie, <a class="el" href="namespaceirc.html#string">std::string</a> message)</td></tr>
151 <tr><td class="mdescLeft"> </td><td class="mdescRight">This user takes one user, and switches their file descriptor with another user, so that one user "becomes" the other. <a href="#PseudoToUser_28userrec_20_2Aalive_2C_20userrec_20_2Azombie_2C_20std_3A_3Astring_20message_29"></a><br></td></tr>
152 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#AddGLine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20hostmask_29">AddGLine</a> (long duration, <a class="el" href="namespaceirc.html#string">std::string</a> source, <a class="el" href="namespaceirc.html#string">std::string</a> reason, <a class="el" href="namespaceirc.html#string">std::string</a> hostmask)</td></tr>
154 <tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a G-line The G-line is propogated to all of the servers in the mesh and enforced as soon as it is added. <a href="#AddGLine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20hostmask_29"></a><br></td></tr>
155 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#AddQLine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20nickname_29">AddQLine</a> (long duration, <a class="el" href="namespaceirc.html#string">std::string</a> source, <a class="el" href="namespaceirc.html#string">std::string</a> reason, <a class="el" href="namespaceirc.html#string">std::string</a> nickname)</td></tr>
157 <tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a Q-line The Q-line is propogated to all of the servers in the mesh and enforced as soon as it is added. <a href="#AddQLine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20nickname_29"></a><br></td></tr>
158 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#AddZLine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20ipaddr_29">AddZLine</a> (long duration, <a class="el" href="namespaceirc.html#string">std::string</a> source, <a class="el" href="namespaceirc.html#string">std::string</a> reason, <a class="el" href="namespaceirc.html#string">std::string</a> ipaddr)</td></tr>
160 <tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a Z-line The Z-line is propogated to all of the servers in the mesh and enforced as soon as it is added. <a href="#AddZLine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20ipaddr_29"></a><br></td></tr>
161 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#AddKLine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20hostmask_29">AddKLine</a> (long duration, <a class="el" href="namespaceirc.html#string">std::string</a> source, <a class="el" href="namespaceirc.html#string">std::string</a> reason, <a class="el" href="namespaceirc.html#string">std::string</a> hostmask)</td></tr>
163 <tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a K-line The K-line is enforced as soon as it is added. <a href="#AddKLine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20hostmask_29"></a><br></td></tr>
164 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#AddELine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20hostmask_29">AddELine</a> (long duration, <a class="el" href="namespaceirc.html#string">std::string</a> source, <a class="el" href="namespaceirc.html#string">std::string</a> reason, <a class="el" href="namespaceirc.html#string">std::string</a> hostmask)</td></tr>
166 <tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a E-line The E-line is enforced as soon as it is added. <a href="#AddELine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20hostmask_29"></a><br></td></tr>
167 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#DelGLine_28std_3A_3Astring_20hostmask_29">DelGLine</a> (<a class="el" href="namespaceirc.html#string">std::string</a> hostmask)</td></tr>
169 <tr><td class="mdescLeft"> </td><td class="mdescRight">Deletes a G-Line from all servers on the mesh. <a href="#DelGLine_28std_3A_3Astring_20hostmask_29"></a><br></td></tr>
170 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#DelQLine_28std_3A_3Astring_20nickname_29">DelQLine</a> (<a class="el" href="namespaceirc.html#string">std::string</a> nickname)</td></tr>
172 <tr><td class="mdescLeft"> </td><td class="mdescRight">Deletes a Q-Line from all servers on the mesh. <a href="#DelQLine_28std_3A_3Astring_20nickname_29"></a><br></td></tr>
173 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#DelZLine_28std_3A_3Astring_20ipaddr_29">DelZLine</a> (<a class="el" href="namespaceirc.html#string">std::string</a> ipaddr)</td></tr>
175 <tr><td class="mdescLeft"> </td><td class="mdescRight">Deletes a Z-Line from all servers on the mesh. <a href="#DelZLine_28std_3A_3Astring_20ipaddr_29"></a><br></td></tr>
176 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#DelKLine_28std_3A_3Astring_20hostmask_29">DelKLine</a> (<a class="el" href="namespaceirc.html#string">std::string</a> hostmask)</td></tr>
178 <tr><td class="mdescLeft"> </td><td class="mdescRight">Deletes a local K-Line. <a href="#DelKLine_28std_3A_3Astring_20hostmask_29"></a><br></td></tr>
179 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#DelELine_28std_3A_3Astring_20hostmask_29">DelELine</a> (<a class="el" href="namespaceirc.html#string">std::string</a> hostmask)</td></tr>
181 <tr><td class="mdescLeft"> </td><td class="mdescRight">Deletes a local E-Line. <a href="#DelELine_28std_3A_3Astring_20hostmask_29"></a><br></td></tr>
182 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual long </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#CalcDuration_28std_3A_3Astring_20duration_29">CalcDuration</a> (<a class="el" href="namespaceirc.html#string">std::string</a> duration)</td></tr>
184 <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates a duration This method will take a string containing a formatted duration (e.g. <a href="#CalcDuration_28std_3A_3Astring_20duration_29"></a><br></td></tr>
185 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#IsValidMask_28std_3A_3Astring_20mask_29">IsValidMask</a> (<a class="el" href="namespaceirc.html#string">std::string</a> mask)</td></tr>
187 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if a nick!ident string is correctly formatted, false if otherwise. <a href="#IsValidMask_28std_3A_3Astring_20mask_29"></a><br></td></tr>
188 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classModule.html">Module</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#FindModule_28std_3A_3Astring_20name_29">FindModule</a> (<a class="el" href="namespaceirc.html#string">std::string</a> name)</td></tr>
190 <tr><td class="mdescLeft"> </td><td class="mdescRight">This function finds a module by name. <a href="#FindModule_28std_3A_3Astring_20name_29"></a><br></td></tr>
191 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#AddSocket_28InspSocket_20_2Asock_29">AddSocket</a> (<a class="el" href="classInspSocket.html">InspSocket</a> *sock)</td></tr>
193 <tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a class derived from <a class="el" href="classInspSocket.html">InspSocket</a> to the server's socket engine. <a href="#AddSocket_28InspSocket_20_2Asock_29"></a><br></td></tr>
194 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#DelSocket_28InspSocket_20_2Asock_29">DelSocket</a> (<a class="el" href="classInspSocket.html">InspSocket</a> *sock)</td></tr>
196 <tr><td class="mdescLeft"> </td><td class="mdescRight">Deletes a class derived from <a class="el" href="classInspSocket.html">InspSocket</a> from the server's socket engine. <a href="#DelSocket_28InspSocket_20_2Asock_29"></a><br></td></tr>
197 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#RehashServer_28_29">RehashServer</a> ()</td></tr>
200 <hr><a name="_details"></a><h2>Detailed Description</h2>
201 Allows server output and query functions This class contains methods which allow a module to query the state of the irc server, and produce output to users and other servers.
203 All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks.
207 Definition at line <a class="el" href="modules_8h-source.html#l01096">1096</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor & Destructor Documentation</h2>
208 <a class="anchor" name="Server_28_29"></a><!-- doxytag: member="Server::Server" ref="Server_28_29" args="()" --><p>
209 <table class="mdTable" cellpadding="2" cellspacing="0">
212 <table cellpadding="0" cellspacing="0" border="0">
214 <td class="md" nowrap valign="top">Server::Server </td>
215 <td class="md" valign="top">( </td>
216 <td class="mdname1" valign="top" nowrap> </td>
217 <td class="md" valign="top"> ) </td>
218 <td class="md" nowrap></td>
224 <table cellspacing="5" cellpadding="0" border="0">
234 Creates a Server object.
236 Definition at line <a class="el" href="modules_8cpp-source.html#l00305">305</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00306"></a>00306 {
237 <a name="l00307"></a>00307 }
243 <a class="anchor" name="_7EServer_28_29"></a><!-- doxytag: member="Server::~Server" ref="_7EServer_28_29" args="()" --><p>
244 <table class="mdTable" cellpadding="2" cellspacing="0">
247 <table cellpadding="0" cellspacing="0" border="0">
249 <td class="md" nowrap valign="top">Server::~Server </td>
250 <td class="md" valign="top">( </td>
251 <td class="mdname1" valign="top" nowrap> </td>
252 <td class="md" valign="top"> ) </td>
253 <td class="md" nowrap><code> [virtual]</code></td>
259 <table cellspacing="5" cellpadding="0" border="0">
269 Destroys a Server object.
271 Definition at line <a class="el" href="modules_8cpp-source.html#l00309">309</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00310"></a>00310 {
272 <a name="l00311"></a>00311 }
278 <hr><h2>Member Function Documentation</h2>
279 <a class="anchor" name="AddCommand_28char_20_2Acmd_2C_20handlerfunc_20f_2C_20char_20flags_2C_20int_20minparams_2C_20char_20_2Asource_29"></a><!-- doxytag: member="Server::AddCommand" ref="AddCommand_28char_20_2Acmd_2C_20handlerfunc_20f_2C_20char_20flags_2C_20int_20minparams_2C_20char_20_2Asource_29" args="(char *cmd, handlerfunc f, char flags, int minparams, char *source)" --><p>
280 <table class="mdTable" cellpadding="2" cellspacing="0">
283 <table cellpadding="0" cellspacing="0" border="0">
285 <td class="md" nowrap valign="top">void Server::AddCommand </td>
286 <td class="md" valign="top">( </td>
287 <td class="md" nowrap valign="top">char * </td>
288 <td class="mdname" nowrap> <em>cmd</em>, </td>
291 <td class="md" nowrap align="right"></td>
293 <td class="md" nowrap><a class="el" href="inspircd_8h.html#handlerfunc_29_28char_20_2A_2A_2C_20int_2C_20userrec_20_2A_29">handlerfunc</a> </td>
294 <td class="mdname" nowrap> <em>f</em>, </td>
297 <td class="md" nowrap align="right"></td>
299 <td class="md" nowrap>char </td>
300 <td class="mdname" nowrap> <em>flags</em>, </td>
303 <td class="md" nowrap align="right"></td>
305 <td class="md" nowrap>int </td>
306 <td class="mdname" nowrap> <em>minparams</em>, </td>
309 <td class="md" nowrap align="right"></td>
311 <td class="md" nowrap>char * </td>
312 <td class="mdname" nowrap> <em>source</em></td>
316 <td class="md">) </td>
317 <td class="md" colspan="2"><code> [virtual]</code></td>
323 <table cellspacing="5" cellpadding="0" border="0">
331 Adds a command to the command table.
333 This allows modules to add extra commands into the command table. You must place a function within your module which is is of type handlerfunc:<p>
334 typedef void (handlerfunc) (char**, int, userrec*); ... void <a class="el" href="commands_8h.html#handle_5Fkill_28char_20_2A_2Aparameters_2C_20int_20pcnt_2C_20userrec_20_2Auser_29">handle_kill(char **parameters, int pcnt, userrec *user)</a><p>
335 When the command is typed, the parameters will be placed into the parameters array (similar to argv) and the parameter count will be placed into pcnt (similar to argv). There will never be any less parameters than the 'minparams' value you specified when creating the command. The *user parameter is the class of the user which caused the command to trigger, who will always have the flag you specified in 'flags' when creating the initial command. For example to create an oper only command create the commands with flags='o'. The source parameter is used for resource tracking, and should contain the name of your module (with file extension) e.g. "m_blarp.so". If you place the wrong identifier here, you can cause crashes if your module is unloaded.
337 Definition at line <a class="el" href="modules_8cpp-source.html#l00411">411</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
339 References <a class="el" href="modules_8h.html#createcommand_28char_20_2Acmd_2C_20handlerfunc_20f_2C_20char_20flags_2C_20int_20minparams_2C_20char_20_2Asource_29">createcommand()</a>.<div class="fragment"><pre class="fragment"><a name="l00412"></a>00412 {
340 <a name="l00413"></a>00413 <a class="code" href="modules_8h.html#createcommand_28char_20_2Acmd_2C_20handlerfunc_20f_2C_20char_20flags_2C_20int_20minparams_2C_20char_20_2Asource_29">createcommand</a>(cmd,f,flags,minparams,source);
341 <a name="l00414"></a>00414 }
347 <a class="anchor" name="AddELine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20hostmask_29"></a><!-- doxytag: member="Server::AddELine" ref="AddELine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20hostmask_29" args="(long duration, std::string source, std::string reason, std::string hostmask)" --><p>
348 <table class="mdTable" cellpadding="2" cellspacing="0">
351 <table cellpadding="0" cellspacing="0" border="0">
353 <td class="md" nowrap valign="top">void Server::AddELine </td>
354 <td class="md" valign="top">( </td>
355 <td class="md" nowrap valign="top">long </td>
356 <td class="mdname" nowrap> <em>duration</em>, </td>
359 <td class="md" nowrap align="right"></td>
361 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
362 <td class="mdname" nowrap> <em>source</em>, </td>
365 <td class="md" nowrap align="right"></td>
367 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
368 <td class="mdname" nowrap> <em>reason</em>, </td>
371 <td class="md" nowrap align="right"></td>
373 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
374 <td class="mdname" nowrap> <em>hostmask</em></td>
378 <td class="md">) </td>
379 <td class="md" colspan="2"><code> [virtual]</code></td>
385 <table cellspacing="5" cellpadding="0" border="0">
393 Adds a E-line The E-line is enforced as soon as it is added.
395 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#CalcDuration_28std_3A_3Astring_20duration_29">Server::CalcDuration</a> method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.
397 Definition at line <a class="el" href="modules_8cpp-source.html#l00655">655</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
399 References <a class="el" href="xline_8h.html#add_5Feline_28long_20duration_2C_20const_20char_20_2Asource_2C_20const_20char_20_2Areason_2C_20const_20char_20_2Ahostmask_29">add_eline()</a>.<div class="fragment"><pre class="fragment"><a name="l00656"></a>00656 {
400 <a name="l00657"></a>00657 <a class="code" href="xline_8h.html#add_5Feline_28long_20duration_2C_20const_20char_20_2Asource_2C_20const_20char_20_2Areason_2C_20const_20char_20_2Ahostmask_29">add_eline</a>(<a class="code" href="commands_8h.html#duration_28const_20char_20_2Astr_29">duration</a>, source.c_str(), reason.c_str(), hostmask.c_str());
401 <a name="l00658"></a>00658 }
407 <a class="anchor" name="AddExtendedListMode_28char_20modechar_29"></a><!-- doxytag: member="Server::AddExtendedListMode" ref="AddExtendedListMode_28char_20modechar_29" args="(char modechar)" --><p>
408 <table class="mdTable" cellpadding="2" cellspacing="0">
411 <table cellpadding="0" cellspacing="0" border="0">
413 <td class="md" nowrap valign="top">bool Server::AddExtendedListMode </td>
414 <td class="md" valign="top">( </td>
415 <td class="md" nowrap valign="top">char </td>
416 <td class="mdname1" valign="top" nowrap> <em>modechar</em> </td>
417 <td class="md" valign="top"> ) </td>
418 <td class="md" nowrap><code> [virtual]</code></td>
424 <table cellspacing="5" cellpadding="0" border="0">
432 Adds an extended mode letter which is parsed by a module and handled in a list fashion.
434 This call is used to implement modes like +q and +a. The characteristics of these modes are as follows:<p>
435 (1) They are ALWAYS on channels, not on users, therefore their type is MT_CHANNEL<p>
436 (2) They always take exactly one parameter when being added or removed<p>
437 (3) They can be set multiple times, usually on users in channels<p>
438 (4) The mode and its parameter are NOT stored in the channels modes structure<p>
439 It is down to the module handling the mode to maintain state and determine what 'items' (e.g. users, or a banlist) have the mode set on them, and process the modes at the correct times, e.g. during access checks on channels, etc. When the extended mode is triggered the OnExtendedMode method will be triggered as above. Note that the target you are given will be a channel, if for example your mode is set 'on a user' (in for example +a) you must use <a class="el" href="globals_8h.html#Find_28std_3A_3Astring_20nick_29">Server::Find</a> to locate the user the mode is operating on. Your mode handler may return 1 to handle the mode AND tell the core to display the mode change, e.g. '+aaa one two three' in the case of the mode for 'two', or it may return -1 to 'eat' the mode change, so the above example would become '+aa one three' after processing.
441 Definition at line <a class="el" href="modules_8cpp-source.html#l00579">579</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
443 References <a class="el" href="modules_8cpp-source.html#l00134">DoAddExtendedMode()</a>, <a class="el" href="modules_8cpp-source.html#l00144">ModeMakeList()</a>, and <a class="el" href="modules_8h-source.html#l00031">MT_CHANNEL</a>.<div class="fragment"><pre class="fragment"><a name="l00580"></a>00580 {
444 <a name="l00581"></a>00581 <span class="keywordtype">bool</span> res = <a class="code" href="modules_8cpp.html#DoAddExtendedMode_28char_20modechar_2C_20int_20type_2C_20bool_20requires_5Foper_2C_20int_20params_5Fon_2C_20int_20params_5Foff_29">DoAddExtendedMode</a>(modechar,<a class="code" href="modules_8h.html#MT_5FCHANNEL">MT_CHANNEL</a>,<span class="keyword">false</span>,1,1);
445 <a name="l00582"></a>00582 <span class="keywordflow">if</span> (res)
446 <a name="l00583"></a>00583 <a class="code" href="modules_8cpp.html#ModeMakeList_28char_20modechar_29">ModeMakeList</a>(modechar);
447 <a name="l00584"></a>00584 <span class="keywordflow">return</span> res;
448 <a name="l00585"></a>00585 }
454 <a class="anchor" name="AddExtendedMode_28char_20modechar_2C_20int_20type_2C_20bool_20requires_5Foper_2C_20int_20params_5Fwhen_5Fon_2C_20int_20params_5Fwhen_5Foff_29"></a><!-- doxytag: member="Server::AddExtendedMode" ref="AddExtendedMode_28char_20modechar_2C_20int_20type_2C_20bool_20requires_5Foper_2C_20int_20params_5Fwhen_5Fon_2C_20int_20params_5Fwhen_5Foff_29" args="(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)" --><p>
455 <table class="mdTable" cellpadding="2" cellspacing="0">
458 <table cellpadding="0" cellspacing="0" border="0">
460 <td class="md" nowrap valign="top">bool Server::AddExtendedMode </td>
461 <td class="md" valign="top">( </td>
462 <td class="md" nowrap valign="top">char </td>
463 <td class="mdname" nowrap> <em>modechar</em>, </td>
466 <td class="md" nowrap align="right"></td>
468 <td class="md" nowrap>int </td>
469 <td class="mdname" nowrap> <em>type</em>, </td>
472 <td class="md" nowrap align="right"></td>
474 <td class="md" nowrap>bool </td>
475 <td class="mdname" nowrap> <em>requires_oper</em>, </td>
478 <td class="md" nowrap align="right"></td>
480 <td class="md" nowrap>int </td>
481 <td class="mdname" nowrap> <em>params_when_on</em>, </td>
484 <td class="md" nowrap align="right"></td>
486 <td class="md" nowrap>int </td>
487 <td class="mdname" nowrap> <em>params_when_off</em></td>
491 <td class="md">) </td>
492 <td class="md" colspan="2"><code> [virtual]</code></td>
498 <table cellspacing="5" cellpadding="0" border="0">
506 Adds an extended mode letter which is parsed by a module.
508 This allows modules to add extra mode letters, e.g. +x for hostcloak. the "type" parameter is either MT_CHANNEL, MT_CLIENT, or MT_SERVER, to indicate wether the mode is a channel mode, a client mode, or a server mode. requires_oper is used with MT_CLIENT type modes only to indicate the mode can only be set or unset by an oper. If this is used for MT_CHANNEL type modes it is ignored. params_when_on is the number of modes to expect when the mode is turned on (for type MT_CHANNEL only), e.g. with mode +k, this would have a value of 1. the params_when_off value has a similar value to params_when_on, except it indicates the number of parameters to expect when the mode is disabled. Modes which act in a similar way to channel mode +l (e.g. require a parameter to enable, but not to disable) should use this parameter. The function returns false if the mode is unavailable, and will not attempt to allocate another character, as this will confuse users. This also means that as only one module can claim a specific mode character, the core does not need to keep track of which modules own which modes, which speeds up operation of the server. In this version, a mode can have at most one parameter, attempting to use more parameters will have undefined effects.
510 Definition at line <a class="el" href="modules_8cpp-source.html#l00551">551</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
512 References <a class="el" href="inspircd__io_8h-source.html#l00028">DEBUG</a>, <a class="el" href="modules_8cpp-source.html#l00134">DoAddExtendedMode()</a>, <a class="el" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log()</a>, <a class="el" href="modules_8h-source.html#l00032">MT_CLIENT</a>, and <a class="el" href="modules_8h-source.html#l00033">MT_SERVER</a>.<div class="fragment"><pre class="fragment"><a name="l00552"></a>00552 {
513 <a name="l00553"></a>00553 <span class="keywordflow">if</span> (((modechar >= <span class="charliteral">'A'</span>) && (modechar <= <span class="charliteral">'Z'</span>)) || ((modechar >= <span class="charliteral">'a'</span>) && (modechar <= <span class="charliteral">'z'</span>)))
514 <a name="l00554"></a>00554 {
515 <a name="l00555"></a>00555 <span class="keywordflow">if</span> (type == <a class="code" href="modules_8h.html#MT_5FSERVER">MT_SERVER</a>)
516 <a name="l00556"></a>00556 {
517 <a name="l00557"></a>00557 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"</span>);
518 <a name="l00558"></a>00558 <span class="keywordflow">return</span> <span class="keyword">false</span>;
519 <a name="l00559"></a>00559 }
520 <a name="l00560"></a>00560 <span class="keywordflow">if</span> (((params_when_on>0) || (params_when_off>0)) && (type == <a class="code" href="modules_8h.html#MT_5FCLIENT">MT_CLIENT</a>))
521 <a name="l00561"></a>00561 {
522 <a name="l00562"></a>00562 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"</span>);
523 <a name="l00563"></a>00563 <span class="keywordflow">return</span> <span class="keyword">false</span>;
524 <a name="l00564"></a>00564 }
525 <a name="l00565"></a>00565 <span class="keywordflow">if</span> ((params_when_on>1) || (params_when_off>1))
526 <a name="l00566"></a>00566 {
527 <a name="l00567"></a>00567 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"</span>);
528 <a name="l00568"></a>00568 <span class="keywordflow">return</span> <span class="keyword">false</span>;
529 <a name="l00569"></a>00569 }
530 <a name="l00570"></a>00570 <span class="keywordflow">return</span> <a class="code" href="modules_8cpp.html#DoAddExtendedMode_28char_20modechar_2C_20int_20type_2C_20bool_20requires_5Foper_2C_20int_20params_5Fon_2C_20int_20params_5Foff_29">DoAddExtendedMode</a>(modechar,type,requires_oper,params_when_on,params_when_off);
531 <a name="l00571"></a>00571 }
532 <a name="l00572"></a>00572 <span class="keywordflow">else</span>
533 <a name="l00573"></a>00573 {
534 <a name="l00574"></a>00574 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"*** API ERROR *** Muppet modechar detected."</span>);
535 <a name="l00575"></a>00575 }
536 <a name="l00576"></a>00576 <span class="keywordflow">return</span> <span class="keyword">false</span>;
537 <a name="l00577"></a>00577 }
543 <a class="anchor" name="AddGLine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20hostmask_29"></a><!-- doxytag: member="Server::AddGLine" ref="AddGLine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20hostmask_29" args="(long duration, std::string source, std::string reason, std::string hostmask)" --><p>
544 <table class="mdTable" cellpadding="2" cellspacing="0">
547 <table cellpadding="0" cellspacing="0" border="0">
549 <td class="md" nowrap valign="top">void Server::AddGLine </td>
550 <td class="md" valign="top">( </td>
551 <td class="md" nowrap valign="top">long </td>
552 <td class="mdname" nowrap> <em>duration</em>, </td>
555 <td class="md" nowrap align="right"></td>
557 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
558 <td class="mdname" nowrap> <em>source</em>, </td>
561 <td class="md" nowrap align="right"></td>
563 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
564 <td class="mdname" nowrap> <em>reason</em>, </td>
567 <td class="md" nowrap align="right"></td>
569 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
570 <td class="mdname" nowrap> <em>hostmask</em></td>
574 <td class="md">) </td>
575 <td class="md" colspan="2"><code> [virtual]</code></td>
581 <table cellspacing="5" cellpadding="0" border="0">
589 Adds a G-line The G-line is propogated to all of the servers in the mesh and enforced as soon as it is added.
591 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#CalcDuration_28std_3A_3Astring_20duration_29">Server::CalcDuration</a> method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.
593 Definition at line <a class="el" href="modules_8cpp-source.html#l00635">635</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
595 References <a class="el" href="xline_8h.html#add_5Fgline_28long_20duration_2C_20const_20char_20_2Asource_2C_20const_20char_20_2Areason_2C_20const_20char_20_2Ahostmask_29">add_gline()</a>.<div class="fragment"><pre class="fragment"><a name="l00636"></a>00636 {
596 <a name="l00637"></a>00637 <a class="code" href="xline_8h.html#add_5Fgline_28long_20duration_2C_20const_20char_20_2Asource_2C_20const_20char_20_2Areason_2C_20const_20char_20_2Ahostmask_29">add_gline</a>(<a class="code" href="commands_8h.html#duration_28const_20char_20_2Astr_29">duration</a>, source.c_str(), reason.c_str(), hostmask.c_str());
597 <a name="l00638"></a>00638 }
603 <a class="anchor" name="AddKLine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20hostmask_29"></a><!-- doxytag: member="Server::AddKLine" ref="AddKLine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20hostmask_29" args="(long duration, std::string source, std::string reason, std::string hostmask)" --><p>
604 <table class="mdTable" cellpadding="2" cellspacing="0">
607 <table cellpadding="0" cellspacing="0" border="0">
609 <td class="md" nowrap valign="top">void Server::AddKLine </td>
610 <td class="md" valign="top">( </td>
611 <td class="md" nowrap valign="top">long </td>
612 <td class="mdname" nowrap> <em>duration</em>, </td>
615 <td class="md" nowrap align="right"></td>
617 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
618 <td class="mdname" nowrap> <em>source</em>, </td>
621 <td class="md" nowrap align="right"></td>
623 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
624 <td class="mdname" nowrap> <em>reason</em>, </td>
627 <td class="md" nowrap align="right"></td>
629 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
630 <td class="mdname" nowrap> <em>hostmask</em></td>
634 <td class="md">) </td>
635 <td class="md" colspan="2"><code> [virtual]</code></td>
641 <table cellspacing="5" cellpadding="0" border="0">
649 Adds a K-line The K-line is enforced as soon as it is added.
651 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#CalcDuration_28std_3A_3Astring_20duration_29">Server::CalcDuration</a> method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.
653 Definition at line <a class="el" href="modules_8cpp-source.html#l00650">650</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
655 References <a class="el" href="xline_8h.html#add_5Fkline_28long_20duration_2C_20const_20char_20_2Asource_2C_20const_20char_20_2Areason_2C_20const_20char_20_2Ahostmask_29">add_kline()</a>.<div class="fragment"><pre class="fragment"><a name="l00651"></a>00651 {
656 <a name="l00652"></a>00652 <a class="code" href="xline_8h.html#add_5Fkline_28long_20duration_2C_20const_20char_20_2Asource_2C_20const_20char_20_2Areason_2C_20const_20char_20_2Ahostmask_29">add_kline</a>(<a class="code" href="commands_8h.html#duration_28const_20char_20_2Astr_29">duration</a>, source.c_str(), reason.c_str(), hostmask.c_str());
657 <a name="l00653"></a>00653 }
663 <a class="anchor" name="AddQLine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20nickname_29"></a><!-- doxytag: member="Server::AddQLine" ref="AddQLine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20nickname_29" args="(long duration, std::string source, std::string reason, std::string nickname)" --><p>
664 <table class="mdTable" cellpadding="2" cellspacing="0">
667 <table cellpadding="0" cellspacing="0" border="0">
669 <td class="md" nowrap valign="top">void Server::AddQLine </td>
670 <td class="md" valign="top">( </td>
671 <td class="md" nowrap valign="top">long </td>
672 <td class="mdname" nowrap> <em>duration</em>, </td>
675 <td class="md" nowrap align="right"></td>
677 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
678 <td class="mdname" nowrap> <em>source</em>, </td>
681 <td class="md" nowrap align="right"></td>
683 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
684 <td class="mdname" nowrap> <em>reason</em>, </td>
687 <td class="md" nowrap align="right"></td>
689 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
690 <td class="mdname" nowrap> <em>nickname</em></td>
694 <td class="md">) </td>
695 <td class="md" colspan="2"><code> [virtual]</code></td>
701 <table cellspacing="5" cellpadding="0" border="0">
709 Adds a Q-line The Q-line is propogated to all of the servers in the mesh and enforced as soon as it is added.
711 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#CalcDuration_28std_3A_3Astring_20duration_29">Server::CalcDuration</a> method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.
713 Definition at line <a class="el" href="modules_8cpp-source.html#l00640">640</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
715 References <a class="el" href="xline_8h.html#add_5Fqline_28long_20duration_2C_20const_20char_20_2Asource_2C_20const_20char_20_2Areason_2C_20const_20char_20_2Anickname_29">add_qline()</a>.<div class="fragment"><pre class="fragment"><a name="l00641"></a>00641 {
716 <a name="l00642"></a>00642 <a class="code" href="xline_8h.html#add_5Fqline_28long_20duration_2C_20const_20char_20_2Asource_2C_20const_20char_20_2Areason_2C_20const_20char_20_2Anickname_29">add_qline</a>(<a class="code" href="commands_8h.html#duration_28const_20char_20_2Astr_29">duration</a>, source.c_str(), reason.c_str(), nickname.c_str());
717 <a name="l00643"></a>00643 }
723 <a class="anchor" name="AddSocket_28InspSocket_20_2Asock_29"></a><!-- doxytag: member="Server::AddSocket" ref="AddSocket_28InspSocket_20_2Asock_29" args="(InspSocket *sock)" --><p>
724 <table class="mdTable" cellpadding="2" cellspacing="0">
727 <table cellpadding="0" cellspacing="0" border="0">
729 <td class="md" nowrap valign="top">void Server::AddSocket </td>
730 <td class="md" valign="top">( </td>
731 <td class="md" nowrap valign="top"><a class="el" href="classInspSocket.html">InspSocket</a> * </td>
732 <td class="mdname1" valign="top" nowrap> <em>sock</em> </td>
733 <td class="md" valign="top"> ) </td>
734 <td class="md" nowrap><code> [virtual]</code></td>
740 <table cellspacing="5" cellpadding="0" border="0">
748 Adds a class derived from <a class="el" href="classInspSocket.html">InspSocket</a> to the server's socket engine.
752 Definition at line <a class="el" href="modules_8cpp-source.html#l00313">313</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
754 References <a class="el" href="modules_8cpp.html#module_5Fsockets">module_sockets</a>.<div class="fragment"><pre class="fragment"><a name="l00314"></a>00314 {
755 <a name="l00315"></a>00315 <a class="code" href="modules_8cpp.html#module_5Fsockets">module_sockets</a>.push_back(sock);
756 <a name="l00316"></a>00316 }
762 <a class="anchor" name="AddZLine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20ipaddr_29"></a><!-- doxytag: member="Server::AddZLine" ref="AddZLine_28long_20duration_2C_20std_3A_3Astring_20source_2C_20std_3A_3Astring_20reason_2C_20std_3A_3Astring_20ipaddr_29" args="(long duration, std::string source, std::string reason, std::string ipaddr)" --><p>
763 <table class="mdTable" cellpadding="2" cellspacing="0">
766 <table cellpadding="0" cellspacing="0" border="0">
768 <td class="md" nowrap valign="top">void Server::AddZLine </td>
769 <td class="md" valign="top">( </td>
770 <td class="md" nowrap valign="top">long </td>
771 <td class="mdname" nowrap> <em>duration</em>, </td>
774 <td class="md" nowrap align="right"></td>
776 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
777 <td class="mdname" nowrap> <em>source</em>, </td>
780 <td class="md" nowrap align="right"></td>
782 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
783 <td class="mdname" nowrap> <em>reason</em>, </td>
786 <td class="md" nowrap align="right"></td>
788 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
789 <td class="mdname" nowrap> <em>ipaddr</em></td>
793 <td class="md">) </td>
794 <td class="md" colspan="2"><code> [virtual]</code></td>
800 <table cellspacing="5" cellpadding="0" border="0">
808 Adds a Z-line The Z-line is propogated to all of the servers in the mesh and enforced as soon as it is added.
810 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#CalcDuration_28std_3A_3Astring_20duration_29">Server::CalcDuration</a> method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.
812 Definition at line <a class="el" href="modules_8cpp-source.html#l00645">645</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
814 References <a class="el" href="xline_8h.html#add_5Fzline_28long_20duration_2C_20const_20char_20_2Asource_2C_20const_20char_20_2Areason_2C_20const_20char_20_2Aipaddr_29">add_zline()</a>.<div class="fragment"><pre class="fragment"><a name="l00646"></a>00646 {
815 <a name="l00647"></a>00647 <a class="code" href="xline_8h.html#add_5Fzline_28long_20duration_2C_20const_20char_20_2Asource_2C_20const_20char_20_2Areason_2C_20const_20char_20_2Aipaddr_29">add_zline</a>(<a class="code" href="commands_8h.html#duration_28const_20char_20_2Astr_29">duration</a>, source.c_str(), reason.c_str(), ipaddr.c_str());
816 <a name="l00648"></a>00648 }
822 <a class="anchor" name="CalcDuration_28std_3A_3Astring_20duration_29"></a><!-- doxytag: member="Server::CalcDuration" ref="CalcDuration_28std_3A_3Astring_20duration_29" args="(std::string duration)" --><p>
823 <table class="mdTable" cellpadding="2" cellspacing="0">
826 <table cellpadding="0" cellspacing="0" border="0">
828 <td class="md" nowrap valign="top">long Server::CalcDuration </td>
829 <td class="md" valign="top">( </td>
830 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
831 <td class="mdname1" valign="top" nowrap> <em>duration</em> </td>
832 <td class="md" valign="top"> ) </td>
833 <td class="md" nowrap><code> [virtual]</code></td>
839 <table cellspacing="5" cellpadding="0" border="0">
847 Calculates a duration This method will take a string containing a formatted duration (e.g.
849 "1w2d") and return its value as a total number of seconds. This is the same function used internally by /GLINE etc to set the ban times.
851 Definition at line <a class="el" href="modules_8cpp-source.html#l00685">685</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
853 References <a class="el" href="commands_8h.html#duration_28const_20char_20_2Astr_29">duration()</a>.<div class="fragment"><pre class="fragment"><a name="l00686"></a>00686 {
854 <a name="l00687"></a>00687 <span class="keywordflow">return</span> <a class="code" href="commands_8h.html#duration_28const_20char_20_2Astr_29">duration</a>(delta.c_str());
855 <a name="l00688"></a>00688 }
861 <a class="anchor" name="CallCommandHandler_28std_3A_3Astring_20commandname_2C_20char_20_2A_2Aparameters_2C_20int_20pcnt_2C_20userrec_20_2Auser_29"></a><!-- doxytag: member="Server::CallCommandHandler" ref="CallCommandHandler_28std_3A_3Astring_20commandname_2C_20char_20_2A_2Aparameters_2C_20int_20pcnt_2C_20userrec_20_2Auser_29" args="(std::string commandname, char **parameters, int pcnt, userrec *user)" --><p>
862 <table class="mdTable" cellpadding="2" cellspacing="0">
865 <table cellpadding="0" cellspacing="0" border="0">
867 <td class="md" nowrap valign="top">void Server::CallCommandHandler </td>
868 <td class="md" valign="top">( </td>
869 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
870 <td class="mdname" nowrap> <em>commandname</em>, </td>
873 <td class="md" nowrap align="right"></td>
875 <td class="md" nowrap>char ** </td>
876 <td class="mdname" nowrap> <em>parameters</em>, </td>
879 <td class="md" nowrap align="right"></td>
881 <td class="md" nowrap>int </td>
882 <td class="mdname" nowrap> <em>pcnt</em>, </td>
885 <td class="md" nowrap align="right"></td>
887 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
888 <td class="mdname" nowrap> <em>user</em></td>
892 <td class="md">) </td>
893 <td class="md" colspan="2"><code> [virtual]</code></td>
899 <table cellspacing="5" cellpadding="0" border="0">
907 Calls the handler for a command, either implemented by the core or by another module.
909 You can use this function to trigger other commands in the ircd, such as PRIVMSG, JOIN, KICK etc, or even as a method of callback. By defining command names that are untypeable for users on irc (e.g. those which contain a or <br>
910 ) you may use them as callback identifiers. The first parameter to this method is the name of the command handler you wish to call, e.g. PRIVMSG. This will be a command handler previously registered by the core or wih <a class="el" href="classServer.html#AddCommand_28char_20_2Acmd_2C_20handlerfunc_20f_2C_20char_20flags_2C_20int_20minparams_2C_20char_20_2Asource_29">AddCommand()</a>. The second parameter is an array of parameters, and the third parameter is a count of parameters in the array. If you do not pass enough parameters to meet the minimum needed by the handler, the functiom will silently ignore it. The final parameter is the user executing the command handler, used for privilage checks, etc.
912 Definition at line <a class="el" href="modules_8cpp-source.html#l00396">396</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
914 References <a class="el" href="inspircd_8h.html#call_5Fhandler_28const_20char_20_2Acommandname_2C_20char_20_2A_2Aparameters_2C_20int_20pcnt_2C_20userrec_20_2Auser_29">call_handler()</a>.<div class="fragment"><pre class="fragment"><a name="l00397"></a>00397 {
915 <a name="l00398"></a>00398 <a class="code" href="inspircd_8h.html#call_5Fhandler_28const_20char_20_2Acommandname_2C_20char_20_2A_2Aparameters_2C_20int_20pcnt_2C_20userrec_20_2Auser_29">call_handler</a>(commandname.c_str(),parameters,pcnt,user);
916 <a name="l00399"></a>00399 }
922 <a class="anchor" name="ChangeGECOS_28userrec_20_2Auser_2C_20std_3A_3Astring_20gecos_29"></a><!-- doxytag: member="Server::ChangeGECOS" ref="ChangeGECOS_28userrec_20_2Auser_2C_20std_3A_3Astring_20gecos_29" args="(userrec *user, std::string gecos)" --><p>
923 <table class="mdTable" cellpadding="2" cellspacing="0">
926 <table cellpadding="0" cellspacing="0" border="0">
928 <td class="md" nowrap valign="top">void Server::ChangeGECOS </td>
929 <td class="md" valign="top">( </td>
930 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
931 <td class="mdname" nowrap> <em>user</em>, </td>
934 <td class="md" nowrap align="right"></td>
936 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
937 <td class="mdname" nowrap> <em>gecos</em></td>
941 <td class="md">) </td>
942 <td class="md" colspan="2"><code> [virtual]</code></td>
948 <table cellspacing="5" cellpadding="0" border="0">
956 Change GECOS (fullname) of a user.
958 You should always call this method to change a user's GECOS rather than writing directly to the fullname member of userrec, as any change applied via this method will be propogated to any linked servers.
960 Definition at line <a class="el" href="modules_8cpp-source.html#l00494">494</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
962 References <a class="el" href="message_8h.html#ChangeName_28userrec_20_2Auser_2C_20const_20char_20_2Agecos_29">ChangeName()</a>.<div class="fragment"><pre class="fragment"><a name="l00495"></a>00495 {
963 <a name="l00496"></a>00496 <a class="code" href="message_8h.html#ChangeName_28userrec_20_2Auser_2C_20const_20char_20_2Agecos_29">ChangeName</a>(user,gecos.c_str());
964 <a name="l00497"></a>00497 }
970 <a class="anchor" name="ChangeHost_28userrec_20_2Auser_2C_20std_3A_3Astring_20host_29"></a><!-- doxytag: member="Server::ChangeHost" ref="ChangeHost_28userrec_20_2Auser_2C_20std_3A_3Astring_20host_29" args="(userrec *user, std::string host)" --><p>
971 <table class="mdTable" cellpadding="2" cellspacing="0">
974 <table cellpadding="0" cellspacing="0" border="0">
976 <td class="md" nowrap valign="top">void Server::ChangeHost </td>
977 <td class="md" valign="top">( </td>
978 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
979 <td class="mdname" nowrap> <em>user</em>, </td>
982 <td class="md" nowrap align="right"></td>
984 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
985 <td class="mdname" nowrap> <em>host</em></td>
989 <td class="md">) </td>
990 <td class="md" colspan="2"><code> [virtual]</code></td>
996 <table cellspacing="5" cellpadding="0" border="0">
1004 Change displayed hostname of a user.
1006 You should always call this method to change a user's host rather than writing directly to the dhost member of userrec, as any change applied via this method will be propogated to any linked servers.
1008 Definition at line <a class="el" href="modules_8cpp-source.html#l00489">489</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1010 References <a class="el" href="message_8h.html#ChangeDisplayedHost_28userrec_20_2Auser_2C_20const_20char_20_2Ahost_29">ChangeDisplayedHost()</a>.<div class="fragment"><pre class="fragment"><a name="l00490"></a>00490 {
1011 <a name="l00491"></a>00491 <a class="code" href="message_8h.html#ChangeDisplayedHost_28userrec_20_2Auser_2C_20const_20char_20_2Ahost_29">ChangeDisplayedHost</a>(user,host.c_str());
1012 <a name="l00492"></a>00492 }
1018 <a class="anchor" name="ChangeUserNick_28userrec_20_2Auser_2C_20std_3A_3Astring_20nickname_29"></a><!-- doxytag: member="Server::ChangeUserNick" ref="ChangeUserNick_28userrec_20_2Auser_2C_20std_3A_3Astring_20nickname_29" args="(userrec *user, std::string nickname)" --><p>
1019 <table class="mdTable" cellpadding="2" cellspacing="0">
1022 <table cellpadding="0" cellspacing="0" border="0">
1024 <td class="md" nowrap valign="top">void Server::ChangeUserNick </td>
1025 <td class="md" valign="top">( </td>
1026 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1027 <td class="mdname" nowrap> <em>user</em>, </td>
1030 <td class="md" nowrap align="right"></td>
1031 <td class="md"></td>
1032 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1033 <td class="mdname" nowrap> <em>nickname</em></td>
1036 <td class="md"></td>
1037 <td class="md">) </td>
1038 <td class="md" colspan="2"><code> [virtual]</code></td>
1044 <table cellspacing="5" cellpadding="0" border="0">
1052 Forces a user nickchange.
1054 This command works similarly to SVSNICK, and can be used to implement Q-lines etc. If you specify an invalid nickname, the nick change will be dropped and the target user will receive the error numeric for it.
1056 Definition at line <a class="el" href="modules_8cpp-source.html#l00381">381</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1058 References <a class="el" href="inspircd_8h.html#force_5Fnickchange_28userrec_20_2Auser_2C_20const_20char_20_2Anewnick_29">force_nickchange()</a>.<div class="fragment"><pre class="fragment"><a name="l00382"></a>00382 {
1059 <a name="l00383"></a>00383 <a class="code" href="inspircd_8h.html#force_5Fnickchange_28userrec_20_2Auser_2C_20const_20char_20_2Anewnick_29">force_nickchange</a>(user,nickname.c_str());
1060 <a name="l00384"></a>00384 }
1066 <a class="anchor" name="ChanMode_28userrec_20_2AUser_2C_20chanrec_20_2AChan_29"></a><!-- doxytag: member="Server::ChanMode" ref="ChanMode_28userrec_20_2AUser_2C_20chanrec_20_2AChan_29" args="(userrec *User, chanrec *Chan)" --><p>
1067 <table class="mdTable" cellpadding="2" cellspacing="0">
1070 <table cellpadding="0" cellspacing="0" border="0">
1072 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> Server::ChanMode </td>
1073 <td class="md" valign="top">( </td>
1074 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1075 <td class="mdname" nowrap> <em>User</em>, </td>
1078 <td class="md" nowrap align="right"></td>
1079 <td class="md"></td>
1080 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
1081 <td class="mdname" nowrap> <em>Chan</em></td>
1084 <td class="md"></td>
1085 <td class="md">) </td>
1086 <td class="md" colspan="2"><code> [virtual]</code></td>
1092 <table cellspacing="5" cellpadding="0" border="0">
1100 Attempts to look up a user's privilages on a channel.
1102 This function will return a string containing either @, %, +, or an empty string, representing the user's privilages upon the channel you specify.
1104 Definition at line <a class="el" href="modules_8cpp-source.html#l00519">519</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1106 References <a class="el" href="globals_8h.html#cmode_28userrec_20_2Auser_2C_20chanrec_20_2Achan_29">cmode()</a>.<div class="fragment"><pre class="fragment"><a name="l00520"></a>00520 {
1107 <a name="l00521"></a>00521 <span class="keywordflow">return</span> <a class="code" href="globals_8h.html#cmode_28userrec_20_2Auser_2C_20chanrec_20_2Achan_29">cmode</a>(User,Chan);
1108 <a name="l00522"></a>00522 }
1114 <a class="anchor" name="CommonChannels_28userrec_20_2Au_31_2C_20userrec_20_2Au_32_29"></a><!-- doxytag: member="Server::CommonChannels" ref="CommonChannels_28userrec_20_2Au_31_2C_20userrec_20_2Au_32_29" args="(userrec *u1, userrec *u2)" --><p>
1115 <table class="mdTable" cellpadding="2" cellspacing="0">
1118 <table cellpadding="0" cellspacing="0" border="0">
1120 <td class="md" nowrap valign="top">bool Server::CommonChannels </td>
1121 <td class="md" valign="top">( </td>
1122 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1123 <td class="mdname" nowrap> <em>u1</em>, </td>
1126 <td class="md" nowrap align="right"></td>
1127 <td class="md"></td>
1128 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
1129 <td class="mdname" nowrap> <em>u2</em></td>
1132 <td class="md"></td>
1133 <td class="md">) </td>
1134 <td class="md" colspan="2"><code> [virtual]</code></td>
1140 <table cellspacing="5" cellpadding="0" border="0">
1148 Returns true if two users share a common channel.
1150 This method is used internally by the NICK and QUIT commands, and the <a class="el" href="classServer.html#SendCommon_28userrec_20_2AUser_2C_20std_3A_3Astring_20text_2C_20bool_20IncludeSender_29">Server::SendCommon</a> method.
1152 Definition at line <a class="el" href="modules_8cpp-source.html#l00467">467</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1154 References <a class="el" href="globals_8h.html#common_5Fchannels_28userrec_20_2Au_2C_20userrec_20_2Au_32_29">common_channels()</a>.<div class="fragment"><pre class="fragment"><a name="l00468"></a>00468 {
1155 <a name="l00469"></a>00469 <span class="keywordflow">return</span> (<a class="code" href="globals_8h.html#common_5Fchannels_28userrec_20_2Au_2C_20userrec_20_2Au_32_29">common_channels</a>(u1,u2) != 0);
1156 <a name="l00470"></a>00470 }
1162 <a class="anchor" name="CountUsers_28chanrec_20_2Ac_29"></a><!-- doxytag: member="Server::CountUsers" ref="CountUsers_28chanrec_20_2Ac_29" args="(chanrec *c)" --><p>
1163 <table class="mdTable" cellpadding="2" cellspacing="0">
1166 <table cellpadding="0" cellspacing="0" border="0">
1168 <td class="md" nowrap valign="top">int Server::CountUsers </td>
1169 <td class="md" valign="top">( </td>
1170 <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> * </td>
1171 <td class="mdname1" valign="top" nowrap> <em>c</em> </td>
1172 <td class="md" valign="top"> ) </td>
1173 <td class="md" nowrap><code> [virtual]</code></td>
1179 <table cellspacing="5" cellpadding="0" border="0">
1187 Returns a count of the number of users on a channel.
1189 This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel.
1191 Definition at line <a class="el" href="modules_8cpp-source.html#l00587">587</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00588"></a>00588 {
1192 <a name="l00589"></a>00589 <span class="keywordflow">return</span> usercount(c);
1193 <a name="l00590"></a>00590 }
1199 <a class="anchor" name="DelELine_28std_3A_3Astring_20hostmask_29"></a><!-- doxytag: member="Server::DelELine" ref="DelELine_28std_3A_3Astring_20hostmask_29" args="(std::string hostmask)" --><p>
1200 <table class="mdTable" cellpadding="2" cellspacing="0">
1203 <table cellpadding="0" cellspacing="0" border="0">
1205 <td class="md" nowrap valign="top">bool Server::DelELine </td>
1206 <td class="md" valign="top">( </td>
1207 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1208 <td class="mdname1" valign="top" nowrap> <em>hostmask</em> </td>
1209 <td class="md" valign="top"> ) </td>
1210 <td class="md" nowrap><code> [virtual]</code></td>
1216 <table cellspacing="5" cellpadding="0" border="0">
1224 Deletes a local E-Line.
1228 Definition at line <a class="el" href="modules_8cpp-source.html#l00680">680</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1230 References <a class="el" href="xline_8h.html#del_5Feline_28const_20char_20_2Ahostmask_29">del_eline()</a>.<div class="fragment"><pre class="fragment"><a name="l00681"></a>00681 {
1231 <a name="l00682"></a>00682 <span class="keywordflow">return</span> <a class="code" href="xline_8h.html#del_5Feline_28const_20char_20_2Ahostmask_29">del_eline</a>(hostmask.c_str());
1232 <a name="l00683"></a>00683 }
1238 <a class="anchor" name="DelGLine_28std_3A_3Astring_20hostmask_29"></a><!-- doxytag: member="Server::DelGLine" ref="DelGLine_28std_3A_3Astring_20hostmask_29" args="(std::string hostmask)" --><p>
1239 <table class="mdTable" cellpadding="2" cellspacing="0">
1242 <table cellpadding="0" cellspacing="0" border="0">
1244 <td class="md" nowrap valign="top">bool Server::DelGLine </td>
1245 <td class="md" valign="top">( </td>
1246 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1247 <td class="mdname1" valign="top" nowrap> <em>hostmask</em> </td>
1248 <td class="md" valign="top"> ) </td>
1249 <td class="md" nowrap><code> [virtual]</code></td>
1255 <table cellspacing="5" cellpadding="0" border="0">
1263 Deletes a G-Line from all servers on the mesh.
1267 Definition at line <a class="el" href="modules_8cpp-source.html#l00660">660</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1269 References <a class="el" href="xline_8h.html#del_5Fgline_28const_20char_20_2Ahostmask_29">del_gline()</a>.<div class="fragment"><pre class="fragment"><a name="l00661"></a>00661 {
1270 <a name="l00662"></a>00662 <span class="keywordflow">return</span> <a class="code" href="xline_8h.html#del_5Fgline_28const_20char_20_2Ahostmask_29">del_gline</a>(hostmask.c_str());
1271 <a name="l00663"></a>00663 }
1277 <a class="anchor" name="DelKLine_28std_3A_3Astring_20hostmask_29"></a><!-- doxytag: member="Server::DelKLine" ref="DelKLine_28std_3A_3Astring_20hostmask_29" args="(std::string hostmask)" --><p>
1278 <table class="mdTable" cellpadding="2" cellspacing="0">
1281 <table cellpadding="0" cellspacing="0" border="0">
1283 <td class="md" nowrap valign="top">bool Server::DelKLine </td>
1284 <td class="md" valign="top">( </td>
1285 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1286 <td class="mdname1" valign="top" nowrap> <em>hostmask</em> </td>
1287 <td class="md" valign="top"> ) </td>
1288 <td class="md" nowrap><code> [virtual]</code></td>
1294 <table cellspacing="5" cellpadding="0" border="0">
1302 Deletes a local K-Line.
1306 Definition at line <a class="el" href="modules_8cpp-source.html#l00675">675</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1308 References <a class="el" href="xline_8h.html#del_5Fkline_28const_20char_20_2Ahostmask_29">del_kline()</a>.<div class="fragment"><pre class="fragment"><a name="l00676"></a>00676 {
1309 <a name="l00677"></a>00677 <span class="keywordflow">return</span> <a class="code" href="xline_8h.html#del_5Fkline_28const_20char_20_2Ahostmask_29">del_kline</a>(hostmask.c_str());
1310 <a name="l00678"></a>00678 }
1316 <a class="anchor" name="DelQLine_28std_3A_3Astring_20nickname_29"></a><!-- doxytag: member="Server::DelQLine" ref="DelQLine_28std_3A_3Astring_20nickname_29" args="(std::string nickname)" --><p>
1317 <table class="mdTable" cellpadding="2" cellspacing="0">
1320 <table cellpadding="0" cellspacing="0" border="0">
1322 <td class="md" nowrap valign="top">bool Server::DelQLine </td>
1323 <td class="md" valign="top">( </td>
1324 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1325 <td class="mdname1" valign="top" nowrap> <em>nickname</em> </td>
1326 <td class="md" valign="top"> ) </td>
1327 <td class="md" nowrap><code> [virtual]</code></td>
1333 <table cellspacing="5" cellpadding="0" border="0">
1341 Deletes a Q-Line from all servers on the mesh.
1345 Definition at line <a class="el" href="modules_8cpp-source.html#l00665">665</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1347 References <a class="el" href="xline_8h.html#del_5Fqline_28const_20char_20_2Anickname_29">del_qline()</a>.<div class="fragment"><pre class="fragment"><a name="l00666"></a>00666 {
1348 <a name="l00667"></a>00667 <span class="keywordflow">return</span> <a class="code" href="xline_8h.html#del_5Fqline_28const_20char_20_2Anickname_29">del_qline</a>(nickname.c_str());
1349 <a name="l00668"></a>00668 }
1355 <a class="anchor" name="DelSocket_28InspSocket_20_2Asock_29"></a><!-- doxytag: member="Server::DelSocket" ref="DelSocket_28InspSocket_20_2Asock_29" args="(InspSocket *sock)" --><p>
1356 <table class="mdTable" cellpadding="2" cellspacing="0">
1359 <table cellpadding="0" cellspacing="0" border="0">
1361 <td class="md" nowrap valign="top">void Server::DelSocket </td>
1362 <td class="md" valign="top">( </td>
1363 <td class="md" nowrap valign="top"><a class="el" href="classInspSocket.html">InspSocket</a> * </td>
1364 <td class="mdname1" valign="top" nowrap> <em>sock</em> </td>
1365 <td class="md" valign="top"> ) </td>
1366 <td class="md" nowrap><code> [virtual]</code></td>
1372 <table cellspacing="5" cellpadding="0" border="0">
1380 Deletes a class derived from <a class="el" href="classInspSocket.html">InspSocket</a> from the server's socket engine.
1384 Definition at line <a class="el" href="modules_8cpp-source.html#l00329">329</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1386 References <a class="el" href="modules_8cpp.html#module_5Fsockets">module_sockets</a>.<div class="fragment"><pre class="fragment"><a name="l00330"></a>00330 {
1387 <a name="l00331"></a>00331 <span class="keywordflow">for</span> (std::vector<InspSocket*>::iterator a = <a class="code" href="modules_8cpp.html#module_5Fsockets">module_sockets</a>.begin(); a < <a class="code" href="modules_8cpp.html#module_5Fsockets">module_sockets</a>.end(); a++)
1388 <a name="l00332"></a>00332 {
1389 <a name="l00333"></a>00333 <span class="keywordflow">if</span> (*a == sock)
1390 <a name="l00334"></a>00334 {
1391 <a name="l00335"></a>00335 <a class="code" href="modules_8cpp.html#module_5Fsockets">module_sockets</a>.erase(a);
1392 <a name="l00336"></a>00336 <span class="keywordflow">return</span>;
1393 <a name="l00337"></a>00337 }
1394 <a name="l00338"></a>00338 }
1395 <a name="l00339"></a>00339 }
1401 <a class="anchor" name="DelZLine_28std_3A_3Astring_20ipaddr_29"></a><!-- doxytag: member="Server::DelZLine" ref="DelZLine_28std_3A_3Astring_20ipaddr_29" args="(std::string ipaddr)" --><p>
1402 <table class="mdTable" cellpadding="2" cellspacing="0">
1405 <table cellpadding="0" cellspacing="0" border="0">
1407 <td class="md" nowrap valign="top">bool Server::DelZLine </td>
1408 <td class="md" valign="top">( </td>
1409 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1410 <td class="mdname1" valign="top" nowrap> <em>ipaddr</em> </td>
1411 <td class="md" valign="top"> ) </td>
1412 <td class="md" nowrap><code> [virtual]</code></td>
1418 <table cellspacing="5" cellpadding="0" border="0">
1426 Deletes a Z-Line from all servers on the mesh.
1430 Definition at line <a class="el" href="modules_8cpp-source.html#l00670">670</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1432 References <a class="el" href="xline_8h.html#del_5Fzline_28const_20char_20_2Aipaddr_29">del_zline()</a>.<div class="fragment"><pre class="fragment"><a name="l00671"></a>00671 {
1433 <a name="l00672"></a>00672 <span class="keywordflow">return</span> <a class="code" href="xline_8h.html#del_5Fzline_28const_20char_20_2Aipaddr_29">del_zline</a>(ipaddr.c_str());
1434 <a name="l00673"></a>00673 }
1440 <a class="anchor" name="FindChannel_28std_3A_3Astring_20channel_29"></a><!-- doxytag: member="Server::FindChannel" ref="FindChannel_28std_3A_3Astring_20channel_29" args="(std::string channel)" --><p>
1441 <table class="mdTable" cellpadding="2" cellspacing="0">
1444 <table cellpadding="0" cellspacing="0" border="0">
1446 <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> * Server::FindChannel </td>
1447 <td class="md" valign="top">( </td>
1448 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1449 <td class="mdname1" valign="top" nowrap> <em>channel</em> </td>
1450 <td class="md" valign="top"> ) </td>
1451 <td class="md" nowrap><code> [virtual]</code></td>
1457 <table cellspacing="5" cellpadding="0" border="0">
1465 Attempts to look up a channel and return a pointer to it.
1467 This function will return NULL if the channel does not exist.
1469 Definition at line <a class="el" href="modules_8cpp-source.html#l00514">514</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1471 References <a class="el" href="globals_8h.html#FindChan_28const_20char_20_2Achan_29">FindChan()</a>.<div class="fragment"><pre class="fragment"><a name="l00515"></a>00515 {
1472 <a name="l00516"></a>00516 <span class="keywordflow">return</span> <a class="code" href="globals_8h.html#FindChan_28const_20char_20_2Achan_29">FindChan</a>(channel.c_str());
1473 <a name="l00517"></a>00517 }
1479 <a class="anchor" name="FindDescriptor_28int_20socket_29"></a><!-- doxytag: member="Server::FindDescriptor" ref="FindDescriptor_28int_20socket_29" args="(int socket)" --><p>
1480 <table class="mdTable" cellpadding="2" cellspacing="0">
1483 <table cellpadding="0" cellspacing="0" border="0">
1485 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * Server::FindDescriptor </td>
1486 <td class="md" valign="top">( </td>
1487 <td class="md" nowrap valign="top">int </td>
1488 <td class="mdname1" valign="top" nowrap> <em>socket</em> </td>
1489 <td class="md" valign="top"> ) </td>
1490 <td class="md" nowrap><code> [virtual]</code></td>
1496 <table cellspacing="5" cellpadding="0" border="0">
1504 Attempts to look up a nick using the file descriptor associated with that nick.
1506 This function will return NULL if the file descriptor is not associated with a valid user.
1508 Definition at line <a class="el" href="modules_8cpp-source.html#l00509">509</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00510"></a>00510 {
1509 <a name="l00511"></a>00511 <span class="keywordflow">return</span> (socket < 65536 ? fd_ref_table[socket] : NULL);
1510 <a name="l00512"></a>00512 }
1516 <a class="anchor" name="FindModule_28std_3A_3Astring_20name_29"></a><!-- doxytag: member="Server::FindModule" ref="FindModule_28std_3A_3Astring_20name_29" args="(std::string name)" --><p>
1517 <table class="mdTable" cellpadding="2" cellspacing="0">
1520 <table cellpadding="0" cellspacing="0" border="0">
1522 <td class="md" nowrap valign="top"><a class="el" href="classModule.html">Module</a> * Server::FindModule </td>
1523 <td class="md" valign="top">( </td>
1524 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1525 <td class="mdname1" valign="top" nowrap> <em>name</em> </td>
1526 <td class="md" valign="top"> ) </td>
1527 <td class="md" nowrap><code> [virtual]</code></td>
1533 <table cellspacing="5" cellpadding="0" border="0">
1541 This function finds a module by name.
1543 You must provide the filename of the module. If the module cannot be found (is not loaded) the function will return NULL.
1545 Definition at line <a class="el" href="modules_8cpp-source.html#l00719">719</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1547 References <a class="el" href="modules_8cpp-source.html#l00930">MODCOUNT</a>, <a class="el" href="inspircd__io_8h-source.html#l00247">ServerConfig::module_names</a>, and <a class="el" href="channels_8cpp.html#modules">modules</a>.<div class="fragment"><pre class="fragment"><a name="l00720"></a>00720 {
1548 <a name="l00721"></a>00721 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i <= <a class="code" href="channels_8cpp.html#MODCOUNT">MODCOUNT</a>; i++)
1549 <a name="l00722"></a>00722 {
1550 <a name="l00723"></a>00723 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#Config">Config</a>-><a class="code" href="classServerConfig.html#module_5Fnames">module_names</a>[i] == name)
1551 <a name="l00724"></a>00724 {
1552 <a name="l00725"></a>00725 <span class="keywordflow">return</span> <a class="code" href="channels_8cpp.html#modules">modules</a>[i];
1553 <a name="l00726"></a>00726 }
1554 <a name="l00727"></a>00727 }
1555 <a name="l00728"></a>00728 <span class="keywordflow">return</span> NULL;
1556 <a name="l00729"></a>00729 }
1562 <a class="anchor" name="FindNick_28std_3A_3Astring_20nick_29"></a><!-- doxytag: member="Server::FindNick" ref="FindNick_28std_3A_3Astring_20nick_29" args="(std::string nick)" --><p>
1563 <table class="mdTable" cellpadding="2" cellspacing="0">
1566 <table cellpadding="0" cellspacing="0" border="0">
1568 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * Server::FindNick </td>
1569 <td class="md" valign="top">( </td>
1570 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1571 <td class="mdname1" valign="top" nowrap> <em>nick</em> </td>
1572 <td class="md" valign="top"> ) </td>
1573 <td class="md" nowrap><code> [virtual]</code></td>
1579 <table cellspacing="5" cellpadding="0" border="0">
1587 Attempts to look up a nick and return a pointer to it.
1589 This function will return NULL if the nick does not exist.
1591 Definition at line <a class="el" href="modules_8cpp-source.html#l00504">504</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1593 References <a class="el" href="globals_8h.html#Find_28std_3A_3Astring_20nick_29">Find()</a>.<div class="fragment"><pre class="fragment"><a name="l00505"></a>00505 {
1594 <a name="l00506"></a>00506 <span class="keywordflow">return</span> <a class="code" href="globals_8h.html#Find_28std_3A_3Astring_20nick_29">Find</a>(nick);
1595 <a name="l00507"></a>00507 }
1601 <a class="anchor" name="GetAdmin_28_29"></a><!-- doxytag: member="Server::GetAdmin" ref="GetAdmin_28_29" args="()" --><p>
1602 <table class="mdTable" cellpadding="2" cellspacing="0">
1605 <table cellpadding="0" cellspacing="0" border="0">
1607 <td class="md" nowrap valign="top"><a class="el" href="classAdmin.html">Admin</a> Server::GetAdmin </td>
1608 <td class="md" valign="top">( </td>
1609 <td class="mdname1" valign="top" nowrap> </td>
1610 <td class="md" valign="top"> ) </td>
1611 <td class="md" nowrap><code> [virtual]</code></td>
1617 <table cellspacing="5" cellpadding="0" border="0">
1625 Returns the information of the server as returned by the /ADMIN command.
1627 See the <a class="el" href="classAdmin.html">Admin</a> class for further information of the return value. The members <a class="el" href="classAdmin.html#Nick">Admin::Nick</a>, <a class="el" href="classAdmin.html#Email">Admin::Email</a> and <a class="el" href="classAdmin.html#Name">Admin::Name</a> contain the information for the server where the module is loaded.
1629 Definition at line <a class="el" href="modules_8cpp-source.html#l00544">544</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1631 References <a class="el" href="inspircd__io_8h-source.html#l00089">ServerConfig::AdminEmail</a>, <a class="el" href="inspircd__io_8h-source.html#l00084">ServerConfig::AdminName</a>, and <a class="el" href="inspircd__io_8h-source.html#l00094">ServerConfig::AdminNick</a>.<div class="fragment"><pre class="fragment"><a name="l00545"></a>00545 {
1632 <a name="l00546"></a>00546 <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(<a class="code" href="channels_8cpp.html#Config">Config</a>-><a class="code" href="classServerConfig.html#AdminName_5BMAXBUF_5D">AdminName</a>,<a class="code" href="channels_8cpp.html#Config">Config</a>-><a class="code" href="classServerConfig.html#AdminEmail_5BMAXBUF_5D">AdminEmail</a>,<a class="code" href="channels_8cpp.html#Config">Config</a>-><a class="code" href="classServerConfig.html#AdminNick_5BMAXBUF_5D">AdminNick</a>);
1633 <a name="l00547"></a>00547 }
1639 <a class="anchor" name="GetConfig_28_29"></a><!-- doxytag: member="Server::GetConfig" ref="GetConfig_28_29" args="()" --><p>
1640 <table class="mdTable" cellpadding="2" cellspacing="0">
1643 <table cellpadding="0" cellspacing="0" border="0">
1645 <td class="md" nowrap valign="top"><a class="el" href="classServerConfig.html">ServerConfig</a> * Server::GetConfig </td>
1646 <td class="md" valign="top">( </td>
1647 <td class="mdname1" valign="top" nowrap> </td>
1648 <td class="md" valign="top"> ) </td>
1649 <td class="md" nowrap></td>
1655 <table cellspacing="5" cellpadding="0" border="0">
1663 Obtains a pointer to the server's <a class="el" href="classServerConfig.html">ServerConfig</a> object.
1665 The <a class="el" href="classServerConfig.html">ServerConfig</a> object contains most of the configuration data of the IRC server, as read from the config file by the core.
1667 Definition at line <a class="el" href="modules_8cpp-source.html#l00324">324</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00325"></a>00325 {
1668 <a name="l00326"></a>00326 <span class="keywordflow">return</span> <a class="code" href="channels_8cpp.html#Config">Config</a>;
1669 <a name="l00327"></a>00327 }
1675 <a class="anchor" name="GetNetworkName_28_29"></a><!-- doxytag: member="Server::GetNetworkName" ref="GetNetworkName_28_29" args="()" --><p>
1676 <table class="mdTable" cellpadding="2" cellspacing="0">
1679 <table cellpadding="0" cellspacing="0" border="0">
1681 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> Server::GetNetworkName </td>
1682 <td class="md" valign="top">( </td>
1683 <td class="mdname1" valign="top" nowrap> </td>
1684 <td class="md" valign="top"> ) </td>
1685 <td class="md" nowrap><code> [virtual]</code></td>
1691 <table cellspacing="5" cellpadding="0" border="0">
1699 Returns the network name, global to all linked servers.
1703 Definition at line <a class="el" href="modules_8cpp-source.html#l00534">534</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1705 References <a class="el" href="inspircd__io_8h-source.html#l00074">ServerConfig::Network</a>.<div class="fragment"><pre class="fragment"><a name="l00535"></a>00535 {
1706 <a name="l00536"></a>00536 <span class="keywordflow">return</span> <a class="code" href="channels_8cpp.html#Config">Config</a>-><a class="code" href="classServerConfig.html#Network_5BMAXBUF_5D">Network</a>;
1707 <a name="l00537"></a>00537 }
1713 <a class="anchor" name="GetServerDescription_28_29"></a><!-- doxytag: member="Server::GetServerDescription" ref="GetServerDescription_28_29" args="()" --><p>
1714 <table class="mdTable" cellpadding="2" cellspacing="0">
1717 <table cellpadding="0" cellspacing="0" border="0">
1719 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> Server::GetServerDescription </td>
1720 <td class="md" valign="top">( </td>
1721 <td class="mdname1" valign="top" nowrap> </td>
1722 <td class="md" valign="top"> ) </td>
1723 <td class="md" nowrap><code> [virtual]</code></td>
1729 <table cellspacing="5" cellpadding="0" border="0">
1737 Returns the server description string of the local server.
1741 Definition at line <a class="el" href="modules_8cpp-source.html#l00539">539</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1743 References <a class="el" href="inspircd__io_8h-source.html#l00079">ServerConfig::ServerDesc</a>.<div class="fragment"><pre class="fragment"><a name="l00540"></a>00540 {
1744 <a name="l00541"></a>00541 <span class="keywordflow">return</span> <a class="code" href="channels_8cpp.html#Config">Config</a>-><a class="code" href="classServerConfig.html#ServerDesc_5BMAXBUF_5D">ServerDesc</a>;
1745 <a name="l00542"></a>00542 }
1751 <a class="anchor" name="GetServerName_28_29"></a><!-- doxytag: member="Server::GetServerName" ref="GetServerName_28_29" args="()" --><p>
1752 <table class="mdTable" cellpadding="2" cellspacing="0">
1755 <table cellpadding="0" cellspacing="0" border="0">
1757 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> Server::GetServerName </td>
1758 <td class="md" valign="top">( </td>
1759 <td class="mdname1" valign="top" nowrap> </td>
1760 <td class="md" valign="top"> ) </td>
1761 <td class="md" nowrap><code> [virtual]</code></td>
1767 <table cellspacing="5" cellpadding="0" border="0">
1775 Returns the server name of the server where the module is loaded.
1779 Definition at line <a class="el" href="modules_8cpp-source.html#l00529">529</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1781 References <a class="el" href="inspircd__io_8h-source.html#l00068">ServerConfig::ServerName</a>.<div class="fragment"><pre class="fragment"><a name="l00530"></a>00530 {
1782 <a name="l00531"></a>00531 <span class="keywordflow">return</span> <a class="code" href="channels_8cpp.html#Config">Config</a>-><a class="code" href="classServerConfig.html#ServerName_5BMAXBUF_5D">ServerName</a>;
1783 <a name="l00532"></a>00532 }
1789 <a class="anchor" name="GetUsers_28chanrec_20_2Achan_29"></a><!-- doxytag: member="Server::GetUsers" ref="GetUsers_28chanrec_20_2Achan_29" args="(chanrec *chan)" --><p>
1790 <table class="mdTable" cellpadding="2" cellspacing="0">
1793 <table cellpadding="0" cellspacing="0" border="0">
1795 <td class="md" nowrap valign="top"><a class="el" href="modules_8h.html#chanuserlist">chanuserlist</a> Server::GetUsers </td>
1796 <td class="md" valign="top">( </td>
1797 <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> * </td>
1798 <td class="mdname1" valign="top" nowrap> <em>chan</em> </td>
1799 <td class="md" valign="top"> ) </td>
1800 <td class="md" nowrap><code> [virtual]</code></td>
1806 <table cellspacing="5" cellpadding="0" border="0">
1814 Fetches the userlist of a channel.
1816 This function must be here and not a member of userrec or chanrec due to include constraints.
1818 Definition at line <a class="el" href="modules_8cpp-source.html#l00369">369</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1820 References <a class="el" href="channels_8cpp-source.html#l00187">chanrec::GetUsers()</a>.<div class="fragment"><pre class="fragment"><a name="l00370"></a>00370 {
1821 <a name="l00371"></a>00371 <a class="code" href="modules_8h.html#chanuserlist">chanuserlist</a> userl;
1822 <a name="l00372"></a>00372 userl.clear();
1823 <a name="l00373"></a>00373 std::vector<char*> *list = chan-><a class="code" href="classchanrec.html#GetUsers_28_29">GetUsers</a>();
1824 <a name="l00374"></a>00374 <span class="keywordflow">for</span> (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
1825 <a name="l00375"></a>00375 {
1826 <a name="l00376"></a>00376 <span class="keywordtype">char</span>* o = *i;
1827 <a name="l00377"></a>00377 userl.push_back((<a class="code" href="classuserrec.html">userrec</a>*)o);
1828 <a name="l00378"></a>00378 }
1829 <a name="l00379"></a>00379 <span class="keywordflow">return</span> userl;
1830 <a name="l00380"></a>00380 }
1836 <a class="anchor" name="IsNick_28std_3A_3Astring_20nick_29"></a><!-- doxytag: member="Server::IsNick" ref="IsNick_28std_3A_3Astring_20nick_29" args="(std::string nick)" --><p>
1837 <table class="mdTable" cellpadding="2" cellspacing="0">
1840 <table cellpadding="0" cellspacing="0" border="0">
1842 <td class="md" nowrap valign="top">bool Server::IsNick </td>
1843 <td class="md" valign="top">( </td>
1844 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1845 <td class="mdname1" valign="top" nowrap> <em>nick</em> </td>
1846 <td class="md" valign="top"> ) </td>
1847 <td class="md" nowrap><code> [virtual]</code></td>
1853 <table cellspacing="5" cellpadding="0" border="0">
1861 Returns true if a nick is valid.
1863 Nicks for unregistered connections will return false.
1865 Definition at line <a class="el" href="modules_8cpp-source.html#l00499">499</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1867 References <a class="el" href="globals_8h.html#isnick_28const_20char_20_2An_29">isnick()</a>.<div class="fragment"><pre class="fragment"><a name="l00500"></a>00500 {
1868 <a name="l00501"></a>00501 <span class="keywordflow">return</span> (<a class="code" href="globals_8h.html#isnick_28const_20char_20_2An_29">isnick</a>(nick.c_str()) != 0);
1869 <a name="l00502"></a>00502 }
1875 <a class="anchor" name="IsOnChannel_28userrec_20_2AUser_2C_20chanrec_20_2AChan_29"></a><!-- doxytag: member="Server::IsOnChannel" ref="IsOnChannel_28userrec_20_2AUser_2C_20chanrec_20_2AChan_29" args="(userrec *User, chanrec *Chan)" --><p>
1876 <table class="mdTable" cellpadding="2" cellspacing="0">
1879 <table cellpadding="0" cellspacing="0" border="0">
1881 <td class="md" nowrap valign="top">bool Server::IsOnChannel </td>
1882 <td class="md" valign="top">( </td>
1883 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1884 <td class="mdname" nowrap> <em>User</em>, </td>
1887 <td class="md" nowrap align="right"></td>
1888 <td class="md"></td>
1889 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
1890 <td class="mdname" nowrap> <em>Chan</em></td>
1893 <td class="md"></td>
1894 <td class="md">) </td>
1895 <td class="md" colspan="2"><code> [virtual]</code></td>
1901 <table cellspacing="5" cellpadding="0" border="0">
1909 Checks if a user is on a channel.
1911 This function will return true or false to indicate if user 'User' is on channel 'Chan'.
1913 Definition at line <a class="el" href="modules_8cpp-source.html#l00524">524</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1915 References <a class="el" href="message_8h.html#has_5Fchannel_28userrec_20_2Au_2C_20chanrec_20_2Ac_29">has_channel()</a>.<div class="fragment"><pre class="fragment"><a name="l00525"></a>00525 {
1916 <a name="l00526"></a>00526 <span class="keywordflow">return</span> <a class="code" href="message_8h.html#has_5Fchannel_28userrec_20_2Au_2C_20chanrec_20_2Ac_29">has_channel</a>(User,Chan);
1917 <a name="l00527"></a>00527 }
1923 <a class="anchor" name="IsUlined_28std_3A_3Astring_20server_29"></a><!-- doxytag: member="Server::IsUlined" ref="IsUlined_28std_3A_3Astring_20server_29" args="(std::string server)" --><p>
1924 <table class="mdTable" cellpadding="2" cellspacing="0">
1927 <table cellpadding="0" cellspacing="0" border="0">
1929 <td class="md" nowrap valign="top">bool Server::IsUlined </td>
1930 <td class="md" valign="top">( </td>
1931 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1932 <td class="mdname1" valign="top" nowrap> <em>server</em> </td>
1933 <td class="md" valign="top"> ) </td>
1934 <td class="md" nowrap><code> [virtual]</code></td>
1940 <table cellspacing="5" cellpadding="0" border="0">
1948 Returns true if the servername you give is ulined.
1950 ULined servers have extra privilages. They are allowed to change nicknames on remote servers, change modes of clients which are on remote servers and set modes of channels where there are no channel operators for that channel on the ulined server, amongst other things. Ulined server data is also broadcast across the mesh at all times as opposed to selectively messaged in the case of normal servers, as many ulined server types (such as services) do not support meshed links and must operate in this manner.
1952 Definition at line <a class="el" href="modules_8cpp-source.html#l00391">391</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1954 References <a class="el" href="commands_8h.html#is_5Fuline_28const_20char_20_2Aserver_29">is_uline()</a>.<div class="fragment"><pre class="fragment"><a name="l00392"></a>00392 {
1955 <a name="l00393"></a>00393 <span class="keywordflow">return</span> <a class="code" href="commands_8h.html#is_5Fuline_28const_20char_20_2Aserver_29">is_uline</a>(server.c_str());
1956 <a name="l00394"></a>00394 }
1962 <a class="anchor" name="IsValidMask_28std_3A_3Astring_20mask_29"></a><!-- doxytag: member="Server::IsValidMask" ref="IsValidMask_28std_3A_3Astring_20mask_29" args="(std::string mask)" --><p>
1963 <table class="mdTable" cellpadding="2" cellspacing="0">
1966 <table cellpadding="0" cellspacing="0" border="0">
1968 <td class="md" nowrap valign="top">bool Server::IsValidMask </td>
1969 <td class="md" valign="top">( </td>
1970 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1971 <td class="mdname1" valign="top" nowrap> <em>mask</em> </td>
1972 <td class="md" valign="top"> ) </td>
1973 <td class="md" nowrap><code> [virtual]</code></td>
1979 <table cellspacing="5" cellpadding="0" border="0">
1987 Returns true if a nick!ident string is correctly formatted, false if otherwise.
1991 Definition at line <a class="el" href="modules_8cpp-source.html#l00690">690</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00691"></a>00691 {
1992 <a name="l00692"></a>00692 <span class="keyword">const</span> <span class="keywordtype">char</span>* dest = mask.c_str();
1993 <a name="l00693"></a>00693 <span class="keywordflow">if</span> (strchr(dest,<span class="charliteral">'!'</span>)==0)
1994 <a name="l00694"></a>00694 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1995 <a name="l00695"></a>00695 <span class="keywordflow">if</span> (strchr(dest,<span class="charliteral">'@'</span>)==0)
1996 <a name="l00696"></a>00696 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1997 <a name="l00697"></a>00697 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < strlen(dest); i++)
1998 <a name="l00698"></a>00698 <span class="keywordflow">if</span> (dest[i] < 32)
1999 <a name="l00699"></a>00699 <span class="keywordflow">return</span> <span class="keyword">false</span>;
2000 <a name="l00700"></a>00700 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < strlen(dest); i++)
2001 <a name="l00701"></a>00701 <span class="keywordflow">if</span> (dest[i] > 126)
2002 <a name="l00702"></a>00702 <span class="keywordflow">return</span> <span class="keyword">false</span>;
2003 <a name="l00703"></a>00703 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> c = 0;
2004 <a name="l00704"></a>00704 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < strlen(dest); i++)
2005 <a name="l00705"></a>00705 <span class="keywordflow">if</span> (dest[i] == <span class="charliteral">'!'</span>)
2006 <a name="l00706"></a>00706 c++;
2007 <a name="l00707"></a>00707 <span class="keywordflow">if</span> (c>1)
2008 <a name="l00708"></a>00708 <span class="keywordflow">return</span> <span class="keyword">false</span>;
2009 <a name="l00709"></a>00709 c = 0;
2010 <a name="l00710"></a>00710 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < strlen(dest); i++)
2011 <a name="l00711"></a>00711 <span class="keywordflow">if</span> (dest[i] == <span class="charliteral">'@'</span>)
2012 <a name="l00712"></a>00712 c++;
2013 <a name="l00713"></a>00713 <span class="keywordflow">if</span> (c>1)
2014 <a name="l00714"></a>00714 <span class="keywordflow">return</span> <span class="keyword">false</span>;
2015 <a name="l00715"></a>00715
2016 <a name="l00716"></a>00716 <span class="keywordflow">return</span> <span class="keyword">true</span>;
2017 <a name="l00717"></a>00717 }
2023 <a class="anchor" name="IsValidModuleCommand_28std_3A_3Astring_20commandname_2C_20int_20pcnt_2C_20userrec_20_2Auser_29"></a><!-- doxytag: member="Server::IsValidModuleCommand" ref="IsValidModuleCommand_28std_3A_3Astring_20commandname_2C_20int_20pcnt_2C_20userrec_20_2Auser_29" args="(std::string commandname, int pcnt, userrec *user)" --><p>
2024 <table class="mdTable" cellpadding="2" cellspacing="0">
2027 <table cellpadding="0" cellspacing="0" border="0">
2029 <td class="md" nowrap valign="top">bool Server::IsValidModuleCommand </td>
2030 <td class="md" valign="top">( </td>
2031 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2032 <td class="mdname" nowrap> <em>commandname</em>, </td>
2035 <td class="md" nowrap align="right"></td>
2036 <td class="md"></td>
2037 <td class="md" nowrap>int </td>
2038 <td class="mdname" nowrap> <em>pcnt</em>, </td>
2041 <td class="md" nowrap align="right"></td>
2042 <td class="md"></td>
2043 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
2044 <td class="mdname" nowrap> <em>user</em></td>
2047 <td class="md"></td>
2048 <td class="md">) </td>
2049 <td class="md" colspan="2"><code> [virtual]</code></td>
2055 <table cellspacing="5" cellpadding="0" border="0">
2065 Definition at line <a class="el" href="modules_8cpp-source.html#l00401">401</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2067 References <a class="el" href="inspircd_8h.html#is_5Fvalid_5Fcmd_28const_20char_20_2Acommandname_2C_20int_20pcnt_2C_20userrec_20_2Auser_29">is_valid_cmd()</a>.<div class="fragment"><pre class="fragment"><a name="l00402"></a>00402 {
2068 <a name="l00403"></a>00403 <span class="keywordflow">return</span> <a class="code" href="inspircd_8h.html#is_5Fvalid_5Fcmd_28const_20char_20_2Acommandname_2C_20int_20pcnt_2C_20userrec_20_2Auser_29">is_valid_cmd</a>(commandname.c_str(), pcnt, user);
2069 <a name="l00404"></a>00404 }
2075 <a class="anchor" name="JoinUserToChannel_28userrec_20_2Auser_2C_20std_3A_3Astring_20cname_2C_20std_3A_3Astring_20key_29"></a><!-- doxytag: member="Server::JoinUserToChannel" ref="JoinUserToChannel_28userrec_20_2Auser_2C_20std_3A_3Astring_20cname_2C_20std_3A_3Astring_20key_29" args="(userrec *user, std::string cname, std::string key)" --><p>
2076 <table class="mdTable" cellpadding="2" cellspacing="0">
2079 <table cellpadding="0" cellspacing="0" border="0">
2081 <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> * Server::JoinUserToChannel </td>
2082 <td class="md" valign="top">( </td>
2083 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
2084 <td class="mdname" nowrap> <em>user</em>, </td>
2087 <td class="md" nowrap align="right"></td>
2088 <td class="md"></td>
2089 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2090 <td class="mdname" nowrap> <em>cname</em>, </td>
2093 <td class="md" nowrap align="right"></td>
2094 <td class="md"></td>
2095 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2096 <td class="mdname" nowrap> <em>key</em></td>
2099 <td class="md"></td>
2100 <td class="md">) </td>
2101 <td class="md" colspan="2"><code> [virtual]</code></td>
2107 <table cellspacing="5" cellpadding="0" border="0">
2115 Forces a user to join a channel.
2117 This is similar to svsjoin and can be used to implement redirection, etc. On success, the return value is a valid pointer to a chanrec* of the channel the user was joined to. On failure, the result is NULL.
2119 Definition at line <a class="el" href="modules_8cpp-source.html#l00359">359</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2121 References <a class="el" href="channels_8cpp-source.html#l00195">add_channel()</a>.<div class="fragment"><pre class="fragment"><a name="l00360"></a>00360 {
2122 <a name="l00361"></a>00361 <span class="keywordflow">return</span> <a class="code" href="channels_8cpp.html#add_5Fchannel_28userrec_20_2Auser_2C_20const_20char_20_2Acn_2C_20const_20char_20_2Akey_2C_20bool_20override_29">add_channel</a>(user,cname.c_str(),key.c_str(),<span class="keyword">false</span>);
2123 <a name="l00362"></a>00362 }
2129 <a class="anchor" name="Log_28int_20level_2C_20std_3A_3Astring_20s_29"></a><!-- doxytag: member="Server::Log" ref="Log_28int_20level_2C_20std_3A_3Astring_20s_29" args="(int level, std::string s)" --><p>
2130 <table class="mdTable" cellpadding="2" cellspacing="0">
2133 <table cellpadding="0" cellspacing="0" border="0">
2135 <td class="md" nowrap valign="top">void Server::Log </td>
2136 <td class="md" valign="top">( </td>
2137 <td class="md" nowrap valign="top">int </td>
2138 <td class="mdname" nowrap> <em>level</em>, </td>
2141 <td class="md" nowrap align="right"></td>
2142 <td class="md"></td>
2143 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2144 <td class="mdname" nowrap> <em>s</em></td>
2147 <td class="md"></td>
2148 <td class="md">) </td>
2149 <td class="md" colspan="2"><code> [virtual]</code></td>
2155 <table cellspacing="5" cellpadding="0" border="0">
2163 Writes a log string.
2165 This method writes a line of text to the log. If the level given is lower than the level given in the configuration, this command has no effect.
2167 Definition at line <a class="el" href="modules_8cpp-source.html#l00406">406</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2169 References <a class="el" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log()</a>.<div class="fragment"><pre class="fragment"><a name="l00407"></a>00407 {
2170 <a name="l00408"></a>00408 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(level,<span class="stringliteral">"%s"</span>,s.c_str());
2171 <a name="l00409"></a>00409 }
2177 <a class="anchor" name="MatchText_28std_3A_3Astring_20sliteral_2C_20std_3A_3Astring_20spattern_29"></a><!-- doxytag: member="Server::MatchText" ref="MatchText_28std_3A_3Astring_20sliteral_2C_20std_3A_3Astring_20spattern_29" args="(std::string sliteral, std::string spattern)" --><p>
2178 <table class="mdTable" cellpadding="2" cellspacing="0">
2181 <table cellpadding="0" cellspacing="0" border="0">
2183 <td class="md" nowrap valign="top">bool Server::MatchText </td>
2184 <td class="md" valign="top">( </td>
2185 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2186 <td class="mdname" nowrap> <em>sliteral</em>, </td>
2189 <td class="md" nowrap align="right"></td>
2190 <td class="md"></td>
2191 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2192 <td class="mdname" nowrap> <em>spattern</em></td>
2195 <td class="md"></td>
2196 <td class="md">) </td>
2197 <td class="md" colspan="2"><code> [virtual]</code></td>
2203 <table cellspacing="5" cellpadding="0" border="0">
2211 Matches text against a glob pattern.
2213 Uses the ircd's internal matching function to match string against a globbing pattern, e.g. *!*@*.com Returns true if the literal successfully matches the pattern, false if otherwise.
2215 Definition at line <a class="el" href="modules_8cpp-source.html#l00346">346</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00347"></a>00347 {
2216 <a name="l00348"></a>00348 <span class="keywordtype">char</span> literal[MAXBUF],pattern[MAXBUF];
2217 <a name="l00349"></a>00349 strlcpy(literal,sliteral.c_str(),MAXBUF);
2218 <a name="l00350"></a>00350 strlcpy(pattern,spattern.c_str(),MAXBUF);
2219 <a name="l00351"></a>00351 <span class="keywordflow">return</span> match(literal,pattern);
2220 <a name="l00352"></a>00352 }
2226 <a class="anchor" name="PartUserFromChannel_28userrec_20_2Auser_2C_20std_3A_3Astring_20cname_2C_20std_3A_3Astring_20reason_29"></a><!-- doxytag: member="Server::PartUserFromChannel" ref="PartUserFromChannel_28userrec_20_2Auser_2C_20std_3A_3Astring_20cname_2C_20std_3A_3Astring_20reason_29" args="(userrec *user, std::string cname, std::string reason)" --><p>
2227 <table class="mdTable" cellpadding="2" cellspacing="0">
2230 <table cellpadding="0" cellspacing="0" border="0">
2232 <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> * Server::PartUserFromChannel </td>
2233 <td class="md" valign="top">( </td>
2234 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
2235 <td class="mdname" nowrap> <em>user</em>, </td>
2238 <td class="md" nowrap align="right"></td>
2239 <td class="md"></td>
2240 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2241 <td class="mdname" nowrap> <em>cname</em>, </td>
2244 <td class="md" nowrap align="right"></td>
2245 <td class="md"></td>
2246 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2247 <td class="mdname" nowrap> <em>reason</em></td>
2250 <td class="md"></td>
2251 <td class="md">) </td>
2252 <td class="md" colspan="2"><code> [virtual]</code></td>
2258 <table cellspacing="5" cellpadding="0" border="0">
2266 Forces a user to part a channel.
2268 This is similar to svspart and can be used to implement redirection, etc. Although the return value of this function is a pointer to a channel record, the returned data is undefined and should not be read or written to. This behaviour may be changed in a future version.
2270 Definition at line <a class="el" href="modules_8cpp-source.html#l00364">364</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2272 References <a class="el" href="channels_8cpp-source.html#l00401">del_channel()</a>.<div class="fragment"><pre class="fragment"><a name="l00365"></a>00365 {
2273 <a name="l00366"></a>00366 <span class="keywordflow">return</span> <a class="code" href="channels_8cpp.html#del_5Fchannel_28userrec_20_2Auser_2C_20const_20char_20_2Acname_2C_20const_20char_20_2Areason_2C_20bool_20local_29">del_channel</a>(user,cname.c_str(),reason.c_str(),<span class="keyword">false</span>);
2274 <a name="l00367"></a>00367 }
2280 <a class="anchor" name="PseudoToUser_28userrec_20_2Aalive_2C_20userrec_20_2Azombie_2C_20std_3A_3Astring_20message_29"></a><!-- doxytag: member="Server::PseudoToUser" ref="PseudoToUser_28userrec_20_2Aalive_2C_20userrec_20_2Azombie_2C_20std_3A_3Astring_20message_29" args="(userrec *alive, userrec *zombie, std::string message)" --><p>
2281 <table class="mdTable" cellpadding="2" cellspacing="0">
2284 <table cellpadding="0" cellspacing="0" border="0">
2286 <td class="md" nowrap valign="top">bool Server::PseudoToUser </td>
2287 <td class="md" valign="top">( </td>
2288 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
2289 <td class="mdname" nowrap> <em>alive</em>, </td>
2292 <td class="md" nowrap align="right"></td>
2293 <td class="md"></td>
2294 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
2295 <td class="mdname" nowrap> <em>zombie</em>, </td>
2298 <td class="md" nowrap align="right"></td>
2299 <td class="md"></td>
2300 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2301 <td class="mdname" nowrap> <em>message</em></td>
2304 <td class="md"></td>
2305 <td class="md">) </td>
2306 <td class="md" colspan="2"><code> [virtual]</code></td>
2312 <table cellspacing="5" cellpadding="0" border="0">
2320 This user takes one user, and switches their file descriptor with another user, so that one user "becomes" the other.
2322 The user in 'alive' is booted off the server with the given message. The user referred to by 'zombie' should have previously been locked with Server::ZombifyUser, otherwise stale sockets and file descriptor leaks can occur. After this call, the pointer to alive will be invalid, and the pointer to zombie will be equivalent in effect to the old pointer to alive.
2324 Definition at line <a class="el" href="modules_8cpp-source.html#l00605">605</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2326 References <a class="el" href="users_8h-source.html#l00149">userrec::chans</a>, <a class="el" href="users_8cpp-source.html#l00232">userrec::ClearBuffer()</a>, <a class="el" href="connection_8h-source.html#l00042">connection::fd</a>, <a class="el" href="modules_8h-source.html#l00101">FD_MAGIC_NUMBER</a>, <a class="el" href="connection_8h-source.html#l00046">connection::host</a>, <a class="el" href="users_8h-source.html#l00129">userrec::ident</a>, <a class="el" href="inspircd_8h.html#kill_5Flink_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29">kill_link()</a>, <a class="el" href="channels_8h-source.html#l00108">chanrec::name</a>, <a class="el" href="users_8h-source.html#l00124">userrec::nick</a>, <a class="el" href="channels_8h-source.html#l00133">chanrec::setby</a>, <a class="el" href="channels_8h-source.html#l00122">chanrec::topic</a>, <a class="el" href="channels_8h-source.html#l00129">chanrec::topicset</a>, <a class="el" href="globals_8h.html#Write_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">Write()</a>, <a class="el" href="globals_8h.html#WriteFrom_28int_20sock_2C_20userrec_20_2Auser_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteFrom()</a>, and <a class="el" href="globals_8h.html#WriteServ_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteServ()</a>.<div class="fragment"><pre class="fragment"><a name="l00606"></a>00606 {
2327 <a name="l00607"></a>00607 zombie-><a class="code" href="classconnection.html#fd">fd</a> = alive-><a class="code" href="classconnection.html#fd">fd</a>;
2328 <a name="l00608"></a>00608 alive-><a class="code" href="classconnection.html#fd">fd</a> = <a class="code" href="modules_8h.html#FD_5FMAGIC_5FNUMBER">FD_MAGIC_NUMBER</a>;
2329 <a name="l00609"></a>00609 alive-><a class="code" href="classuserrec.html#ClearBuffer_28_29">ClearBuffer</a>();
2330 <a name="l00610"></a>00610 <a class="code" href="globals_8h.html#Write_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">Write</a>(zombie-><a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">":%s!%s@%s NICK %s"</span>,alive-><a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>,alive-><a class="code" href="classuserrec.html#ident_5BIDENTMAX_2B_32_5D">ident</a>,alive-><a class="code" href="classconnection.html#host_5B_31_36_30_5D">host</a>,zombie-><a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>);
2331 <a name="l00611"></a>00611 <a class="code" href="inspircd_8h.html#kill_5Flink_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29">kill_link</a>(alive,message.c_str());
2332 <a name="l00612"></a>00612 <a class="code" href="modules_8cpp.html#fd_5Fref_5Ftable_5B_36_35_35_33_36_5D">fd_ref_table</a>[zombie-><a class="code" href="classconnection.html#fd">fd</a>] = zombie;
2333 <a name="l00613"></a>00613 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < zombie->chans.size(); i++)
2334 <a name="l00614"></a>00614 {
2335 <a name="l00615"></a>00615 <span class="keywordflow">if</span> (zombie-><a class="code" href="classuserrec.html#chans">chans</a>[i].channel != NULL)
2336 <a name="l00616"></a>00616 {
2337 <a name="l00617"></a>00617 <span class="keywordflow">if</span> (zombie-><a class="code" href="classuserrec.html#chans">chans</a>[i].channel->name)
2338 <a name="l00618"></a>00618 {
2339 <a name="l00619"></a>00619 <a class="code" href="classchanrec.html">chanrec</a>* Ptr = zombie-><a class="code" href="classuserrec.html#chans">chans</a>[i].channel;
2340 <a name="l00620"></a>00620 <a class="code" href="globals_8h.html#WriteFrom_28int_20sock_2C_20userrec_20_2Auser_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteFrom</a>(zombie-><a class="code" href="classconnection.html#fd">fd</a>,zombie,<span class="stringliteral">"JOIN %s"</span>,Ptr-><a class="code" href="classchanrec.html#name_5BCHANMAX_5D">name</a>);
2341 <a name="l00621"></a>00621 <span class="keywordflow">if</span> (Ptr-><a class="code" href="classchanrec.html#topicset">topicset</a>)
2342 <a name="l00622"></a>00622 {
2343 <a name="l00623"></a>00623 <a class="code" href="globals_8h.html#WriteServ_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteServ</a>(zombie-><a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">"332 %s %s :%s"</span>, zombie-><a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>, Ptr-><a class="code" href="classchanrec.html#name_5BCHANMAX_5D">name</a>, Ptr-><a class="code" href="classchanrec.html#topic_5BMAXBUF_5D">topic</a>);
2344 <a name="l00624"></a>00624 <a class="code" href="globals_8h.html#WriteServ_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteServ</a>(zombie-><a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">"333 %s %s %s %d"</span>, zombie-><a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>, Ptr-><a class="code" href="classchanrec.html#name_5BCHANMAX_5D">name</a>, Ptr-><a class="code" href="classchanrec.html#setby_5BNICKMAX_5D">setby</a>, Ptr-><a class="code" href="classchanrec.html#topicset">topicset</a>);
2345 <a name="l00625"></a>00625 }
2346 <a name="l00626"></a>00626 userlist(zombie,Ptr);
2347 <a name="l00627"></a>00627 <a class="code" href="globals_8h.html#WriteServ_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteServ</a>(zombie-><a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">"366 %s %s :End of /NAMES list."</span>, zombie-><a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>, Ptr-><a class="code" href="classchanrec.html#name_5BCHANMAX_5D">name</a>);
2348 <a name="l00628"></a>00628
2349 <a name="l00629"></a>00629 }
2350 <a name="l00630"></a>00630 }
2351 <a name="l00631"></a>00631 }
2352 <a name="l00632"></a>00632 <span class="keywordflow">return</span> <span class="keyword">true</span>;
2353 <a name="l00633"></a>00633 }
2359 <a class="anchor" name="QuitUser_28userrec_20_2Auser_2C_20std_3A_3Astring_20reason_29"></a><!-- doxytag: member="Server::QuitUser" ref="QuitUser_28userrec_20_2Auser_2C_20std_3A_3Astring_20reason_29" args="(userrec *user, std::string reason)" --><p>
2360 <table class="mdTable" cellpadding="2" cellspacing="0">
2363 <table cellpadding="0" cellspacing="0" border="0">
2365 <td class="md" nowrap valign="top">void Server::QuitUser </td>
2366 <td class="md" valign="top">( </td>
2367 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
2368 <td class="mdname" nowrap> <em>user</em>, </td>
2371 <td class="md" nowrap align="right"></td>
2372 <td class="md"></td>
2373 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2374 <td class="mdname" nowrap> <em>reason</em></td>
2377 <td class="md"></td>
2378 <td class="md">) </td>
2379 <td class="md" colspan="2"><code> [virtual]</code></td>
2385 <table cellspacing="5" cellpadding="0" border="0">
2393 Forces a user to quit with the specified reason.
2395 To the user, it will appear as if they typed /QUIT themselves, except for the fact that this function may bypass the quit prefix specified in the config file.<p>
2397 Once you call this function, userrec* user will immediately become INVALID. You MUST NOT write to, or read from this pointer after calling the QuitUser method UNDER ANY CIRCUMSTANCES! The best course of action after calling this method is to immediately bail from your handler.
2399 Definition at line <a class="el" href="modules_8cpp-source.html#l00386">386</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2401 References <a class="el" href="inspircd_8h.html#kill_5Flink_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29">kill_link()</a>.<div class="fragment"><pre class="fragment"><a name="l00387"></a>00387 {
2402 <a name="l00388"></a>00388 <a class="code" href="inspircd_8h.html#kill_5Flink_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29">kill_link</a>(user,reason.c_str());
2403 <a name="l00389"></a>00389 }
2409 <a class="anchor" name="RehashServer_28_29"></a><!-- doxytag: member="Server::RehashServer" ref="RehashServer_28_29" args="()" --><p>
2410 <table class="mdTable" cellpadding="2" cellspacing="0">
2413 <table cellpadding="0" cellspacing="0" border="0">
2415 <td class="md" nowrap valign="top">void Server::RehashServer </td>
2416 <td class="md" valign="top">( </td>
2417 <td class="mdname1" valign="top" nowrap> </td>
2418 <td class="md" valign="top"> ) </td>
2419 <td class="md" nowrap><code> [virtual]</code></td>
2425 <table cellspacing="5" cellpadding="0" border="0">
2435 Definition at line <a class="el" href="modules_8cpp-source.html#l00318">318</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2437 References <a class="el" href="classServerConfig.html#Read_28bool_20bail_2C_20userrec_20_2Auser_29">ServerConfig::Read()</a>, and <a class="el" href="globals_8h.html#WriteOpers_28char_20_2Atext_2C_2E_2E_2E_29">WriteOpers()</a>.<div class="fragment"><pre class="fragment"><a name="l00319"></a>00319 {
2438 <a name="l00320"></a>00320 <a class="code" href="globals_8h.html#WriteOpers_28char_20_2Atext_2C_2E_2E_2E_29">WriteOpers</a>(<span class="stringliteral">"*** Rehashing config file"</span>);
2439 <a name="l00321"></a>00321 <a class="code" href="channels_8cpp.html#Config">Config</a>-><a class="code" href="classServerConfig.html#Read_28bool_20bail_2C_20userrec_20_2Auser_29">Read</a>(<span class="keyword">false</span>,NULL);
2440 <a name="l00322"></a>00322 }
2446 <a class="anchor" name="Send_28int_20Socket_2C_20std_3A_3Astring_20s_29"></a><!-- doxytag: member="Server::Send" ref="Send_28int_20Socket_2C_20std_3A_3Astring_20s_29" args="(int Socket, std::string s)" --><p>
2447 <table class="mdTable" cellpadding="2" cellspacing="0">
2450 <table cellpadding="0" cellspacing="0" border="0">
2452 <td class="md" nowrap valign="top">void Server::Send </td>
2453 <td class="md" valign="top">( </td>
2454 <td class="md" nowrap valign="top">int </td>
2455 <td class="mdname" nowrap> <em>Socket</em>, </td>
2458 <td class="md" nowrap align="right"></td>
2459 <td class="md"></td>
2460 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2461 <td class="mdname" nowrap> <em>s</em></td>
2464 <td class="md"></td>
2465 <td class="md">) </td>
2466 <td class="md" colspan="2"><code> [virtual]</code></td>
2472 <table cellspacing="5" cellpadding="0" border="0">
2480 Sends a line of text down a TCP/IP socket.
2482 This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.
2484 Definition at line <a class="el" href="modules_8cpp-source.html#l00421">421</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2486 References <a class="el" href="globals_8h.html#Write_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">Write()</a>.<div class="fragment"><pre class="fragment"><a name="l00422"></a>00422 {
2487 <a name="l00423"></a>00423 <a class="code" href="globals_8h.html#Write_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">Write</a>(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
2488 <a name="l00424"></a>00424 }
2494 <a class="anchor" name="SendChannel_28userrec_20_2AUser_2C_20chanrec_20_2AChannel_2C_20std_3A_3Astring_20s_2C_20bool_20IncludeSender_29"></a><!-- doxytag: member="Server::SendChannel" ref="SendChannel_28userrec_20_2AUser_2C_20chanrec_20_2AChannel_2C_20std_3A_3Astring_20s_2C_20bool_20IncludeSender_29" args="(userrec *User, chanrec *Channel, std::string s, bool IncludeSender)" --><p>
2495 <table class="mdTable" cellpadding="2" cellspacing="0">
2498 <table cellpadding="0" cellspacing="0" border="0">
2500 <td class="md" nowrap valign="top">void Server::SendChannel </td>
2501 <td class="md" valign="top">( </td>
2502 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
2503 <td class="mdname" nowrap> <em>User</em>, </td>
2506 <td class="md" nowrap align="right"></td>
2507 <td class="md"></td>
2508 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
2509 <td class="mdname" nowrap> <em>Channel</em>, </td>
2512 <td class="md" nowrap align="right"></td>
2513 <td class="md"></td>
2514 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2515 <td class="mdname" nowrap> <em>s</em>, </td>
2518 <td class="md" nowrap align="right"></td>
2519 <td class="md"></td>
2520 <td class="md" nowrap>bool </td>
2521 <td class="mdname" nowrap> <em>IncludeSender</em></td>
2524 <td class="md"></td>
2525 <td class="md">) </td>
2526 <td class="md" colspan="2"><code> [virtual]</code></td>
2532 <table cellspacing="5" cellpadding="0" border="0">
2540 Sends text from a user to a channel (mulicast).
2542 This method writes a line of text to a channel, with the given user's nick/ident /host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in MODE (see RFC 1459).
2544 Definition at line <a class="el" href="modules_8cpp-source.html#l00455">455</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2546 References <a class="el" href="globals_8h.html#ChanExceptSender_28chanrec_20_2APtr_2C_20userrec_20_2Auser_2C_20char_20_2Atext_2C_2E_2E_2E_29">ChanExceptSender()</a>, and <a class="el" href="globals_8h.html#WriteChannel_28chanrec_20_2APtr_2C_20userrec_20_2Auser_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteChannel()</a>.<div class="fragment"><pre class="fragment"><a name="l00456"></a>00456 {
2547 <a name="l00457"></a>00457 <span class="keywordflow">if</span> (IncludeSender)
2548 <a name="l00458"></a>00458 {
2549 <a name="l00459"></a>00459 <a class="code" href="globals_8h.html#WriteChannel_28chanrec_20_2APtr_2C_20userrec_20_2Auser_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteChannel</a>(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
2550 <a name="l00460"></a>00460 }
2551 <a name="l00461"></a>00461 <span class="keywordflow">else</span>
2552 <a name="l00462"></a>00462 {
2553 <a name="l00463"></a>00463 <a class="code" href="globals_8h.html#ChanExceptSender_28chanrec_20_2APtr_2C_20userrec_20_2Auser_2C_20char_20_2Atext_2C_2E_2E_2E_29">ChanExceptSender</a>(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
2554 <a name="l00464"></a>00464 }
2555 <a name="l00465"></a>00465 }
2561 <a class="anchor" name="SendChannelServerNotice_28std_3A_3Astring_20ServName_2C_20chanrec_20_2AChannel_2C_20std_3A_3Astring_20text_29"></a><!-- doxytag: member="Server::SendChannelServerNotice" ref="SendChannelServerNotice_28std_3A_3Astring_20ServName_2C_20chanrec_20_2AChannel_2C_20std_3A_3Astring_20text_29" args="(std::string ServName, chanrec *Channel, std::string text)" --><p>
2562 <table class="mdTable" cellpadding="2" cellspacing="0">
2565 <table cellpadding="0" cellspacing="0" border="0">
2567 <td class="md" nowrap valign="top">void Server::SendChannelServerNotice </td>
2568 <td class="md" valign="top">( </td>
2569 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2570 <td class="mdname" nowrap> <em>ServName</em>, </td>
2573 <td class="md" nowrap align="right"></td>
2574 <td class="md"></td>
2575 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
2576 <td class="mdname" nowrap> <em>Channel</em>, </td>
2579 <td class="md" nowrap align="right"></td>
2580 <td class="md"></td>
2581 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2582 <td class="mdname" nowrap> <em>text</em></td>
2585 <td class="md"></td>
2586 <td class="md">) </td>
2587 <td class="md" colspan="2"><code> [virtual]</code></td>
2593 <table cellspacing="5" cellpadding="0" border="0">
2601 Writes text to a channel, but from a server, including all.
2603 This can be used to send server notices to a group of users.
2605 Definition at line <a class="el" href="modules_8cpp-source.html#l00450">450</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00451"></a>00451 {
2606 <a name="l00452"></a>00452 WriteChannelWithServ((<span class="keywordtype">char</span>*)ServName.c_str(), Channel, <span class="stringliteral">"%s"</span>, text.c_str());
2607 <a name="l00453"></a>00453 }
2613 <a class="anchor" name="SendCommon_28userrec_20_2AUser_2C_20std_3A_3Astring_20text_2C_20bool_20IncludeSender_29"></a><!-- doxytag: member="Server::SendCommon" ref="SendCommon_28userrec_20_2AUser_2C_20std_3A_3Astring_20text_2C_20bool_20IncludeSender_29" args="(userrec *User, std::string text, bool IncludeSender)" --><p>
2614 <table class="mdTable" cellpadding="2" cellspacing="0">
2617 <table cellpadding="0" cellspacing="0" border="0">
2619 <td class="md" nowrap valign="top">void Server::SendCommon </td>
2620 <td class="md" valign="top">( </td>
2621 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
2622 <td class="mdname" nowrap> <em>User</em>, </td>
2625 <td class="md" nowrap align="right"></td>
2626 <td class="md"></td>
2627 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2628 <td class="mdname" nowrap> <em>text</em>, </td>
2631 <td class="md" nowrap align="right"></td>
2632 <td class="md"></td>
2633 <td class="md" nowrap>bool </td>
2634 <td class="mdname" nowrap> <em>IncludeSender</em></td>
2637 <td class="md"></td>
2638 <td class="md">) </td>
2639 <td class="md" colspan="2"><code> [virtual]</code></td>
2645 <table cellspacing="5" cellpadding="0" border="0">
2653 Sends text from a user to one or more channels (mulicast).
2655 This method writes a line of text to all users which share a common channel with a given user, with the user's nick/ident/host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in NICK (see RFC 1459). Otherwise, it is only sent to the other recipients, as seen in QUIT.
2657 Definition at line <a class="el" href="modules_8cpp-source.html#l00472">472</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2659 References <a class="el" href="globals_8h.html#WriteCommon_28userrec_20_2Au_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteCommon()</a>, and <a class="el" href="globals_8h.html#WriteCommonExcept_28userrec_20_2Au_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteCommonExcept()</a>.<div class="fragment"><pre class="fragment"><a name="l00473"></a>00473 {
2660 <a name="l00474"></a>00474 <span class="keywordflow">if</span> (IncludeSender)
2661 <a name="l00475"></a>00475 {
2662 <a name="l00476"></a>00476 <a class="code" href="globals_8h.html#WriteCommon_28userrec_20_2Au_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteCommon</a>(User,<span class="stringliteral">"%s"</span>,text.c_str());
2663 <a name="l00477"></a>00477 }
2664 <a name="l00478"></a>00478 <span class="keywordflow">else</span>
2665 <a name="l00479"></a>00479 {
2666 <a name="l00480"></a>00480 <a class="code" href="globals_8h.html#WriteCommonExcept_28userrec_20_2Au_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteCommonExcept</a>(User,<span class="stringliteral">"%s"</span>,text.c_str());
2667 <a name="l00481"></a>00481 }
2668 <a name="l00482"></a>00482 }
2674 <a class="anchor" name="SendFrom_28int_20Socket_2C_20userrec_20_2AUser_2C_20std_3A_3Astring_20s_29"></a><!-- doxytag: member="Server::SendFrom" ref="SendFrom_28int_20Socket_2C_20userrec_20_2AUser_2C_20std_3A_3Astring_20s_29" args="(int Socket, userrec *User, std::string s)" --><p>
2675 <table class="mdTable" cellpadding="2" cellspacing="0">
2678 <table cellpadding="0" cellspacing="0" border="0">
2680 <td class="md" nowrap valign="top">void Server::SendFrom </td>
2681 <td class="md" valign="top">( </td>
2682 <td class="md" nowrap valign="top">int </td>
2683 <td class="mdname" nowrap> <em>Socket</em>, </td>
2686 <td class="md" nowrap align="right"></td>
2687 <td class="md"></td>
2688 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
2689 <td class="mdname" nowrap> <em>User</em>, </td>
2692 <td class="md" nowrap align="right"></td>
2693 <td class="md"></td>
2694 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2695 <td class="mdname" nowrap> <em>s</em></td>
2698 <td class="md"></td>
2699 <td class="md">) </td>
2700 <td class="md" colspan="2"><code> [virtual]</code></td>
2706 <table cellspacing="5" cellpadding="0" border="0">
2714 Sends text from a user to a socket.
2716 This method writes a line of text to an established socket, with the given user's nick/ident /host combination prepended, as used in PRIVSG etc commands (see RFC 1459)
2718 Definition at line <a class="el" href="modules_8cpp-source.html#l00431">431</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2720 References <a class="el" href="globals_8h.html#WriteFrom_28int_20sock_2C_20userrec_20_2Auser_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteFrom()</a>.<div class="fragment"><pre class="fragment"><a name="l00432"></a>00432 {
2721 <a name="l00433"></a>00433 <a class="code" href="globals_8h.html#WriteFrom_28int_20sock_2C_20userrec_20_2Auser_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteFrom</a>(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str());
2722 <a name="l00434"></a>00434 }
2728 <a class="anchor" name="SendMode_28char_20_2A_2Aparameters_2C_20int_20pcnt_2C_20userrec_20_2Auser_29"></a><!-- doxytag: member="Server::SendMode" ref="SendMode_28char_20_2A_2Aparameters_2C_20int_20pcnt_2C_20userrec_20_2Auser_29" args="(char **parameters, int pcnt, userrec *user)" --><p>
2729 <table class="mdTable" cellpadding="2" cellspacing="0">
2732 <table cellpadding="0" cellspacing="0" border="0">
2734 <td class="md" nowrap valign="top">void Server::SendMode </td>
2735 <td class="md" valign="top">( </td>
2736 <td class="md" nowrap valign="top">char ** </td>
2737 <td class="mdname" nowrap> <em>parameters</em>, </td>
2740 <td class="md" nowrap align="right"></td>
2741 <td class="md"></td>
2742 <td class="md" nowrap>int </td>
2743 <td class="mdname" nowrap> <em>pcnt</em>, </td>
2746 <td class="md" nowrap align="right"></td>
2747 <td class="md"></td>
2748 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
2749 <td class="mdname" nowrap> <em>user</em></td>
2752 <td class="md"></td>
2753 <td class="md">) </td>
2754 <td class="md" colspan="2"><code> [virtual]</code></td>
2760 <table cellspacing="5" cellpadding="0" border="0">
2770 you must format the parameters array with the target, modes and parameters for those modes.<p>
2773 modes[0] = ChannelName;<p>
2775 modes[2] = user->nick;<p>
2776 Srv->SendMode(modes,3,user);<p>
2777 The modes will originate from the server where the command was issued, however responses (e.g. numerics) will be sent to the user you provide as the third parameter. You must be sure to get the number of parameters correct in the pcnt parameter otherwise you could leave your server in an unstable state!
2779 Definition at line <a class="el" href="modules_8cpp-source.html#l00416">416</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2781 References <a class="el" href="mode_8h.html#server_5Fmode_28char_20_2A_2Aparameters_2C_20int_20pcnt_2C_20userrec_20_2Auser_29">server_mode()</a>.<div class="fragment"><pre class="fragment"><a name="l00417"></a>00417 {
2782 <a name="l00418"></a>00418 <a class="code" href="mode_8h.html#server_5Fmode_28char_20_2A_2Aparameters_2C_20int_20pcnt_2C_20userrec_20_2Auser_29">server_mode</a>(parameters,pcnt,user);
2783 <a name="l00419"></a>00419 }
2789 <a class="anchor" name="SendOpers_28std_3A_3Astring_20s_29"></a><!-- doxytag: member="Server::SendOpers" ref="SendOpers_28std_3A_3Astring_20s_29" args="(std::string s)" --><p>
2790 <table class="mdTable" cellpadding="2" cellspacing="0">
2793 <table cellpadding="0" cellspacing="0" border="0">
2795 <td class="md" nowrap valign="top">void Server::SendOpers </td>
2796 <td class="md" valign="top">( </td>
2797 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2798 <td class="mdname1" valign="top" nowrap> <em>s</em> </td>
2799 <td class="md" valign="top"> ) </td>
2800 <td class="md" nowrap><code> [virtual]</code></td>
2806 <table cellspacing="5" cellpadding="0" border="0">
2814 Sends text to all opers.
2816 This method sends a server notice to all opers with the usermode +s.
2818 Definition at line <a class="el" href="modules_8cpp-source.html#l00341">341</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2820 References <a class="el" href="globals_8h.html#WriteOpers_28char_20_2Atext_2C_2E_2E_2E_29">WriteOpers()</a>.<div class="fragment"><pre class="fragment"><a name="l00342"></a>00342 {
2821 <a name="l00343"></a>00343 <a class="code" href="globals_8h.html#WriteOpers_28char_20_2Atext_2C_2E_2E_2E_29">WriteOpers</a>(<span class="stringliteral">"%s"</span>,s.c_str());
2822 <a name="l00344"></a>00344 }
2828 <a class="anchor" name="SendServ_28int_20Socket_2C_20std_3A_3Astring_20s_29"></a><!-- doxytag: member="Server::SendServ" ref="SendServ_28int_20Socket_2C_20std_3A_3Astring_20s_29" args="(int Socket, std::string s)" --><p>
2829 <table class="mdTable" cellpadding="2" cellspacing="0">
2832 <table cellpadding="0" cellspacing="0" border="0">
2834 <td class="md" nowrap valign="top">void Server::SendServ </td>
2835 <td class="md" valign="top">( </td>
2836 <td class="md" nowrap valign="top">int </td>
2837 <td class="mdname" nowrap> <em>Socket</em>, </td>
2840 <td class="md" nowrap align="right"></td>
2841 <td class="md"></td>
2842 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2843 <td class="mdname" nowrap> <em>s</em></td>
2846 <td class="md"></td>
2847 <td class="md">) </td>
2848 <td class="md" colspan="2"><code> [virtual]</code></td>
2854 <table cellspacing="5" cellpadding="0" border="0">
2862 Sends text from the server to a socket.
2864 This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)
2866 Definition at line <a class="el" href="modules_8cpp-source.html#l00426">426</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2868 References <a class="el" href="globals_8h.html#WriteServ_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteServ()</a>.<div class="fragment"><pre class="fragment"><a name="l00427"></a>00427 {
2869 <a name="l00428"></a>00428 <a class="code" href="globals_8h.html#WriteServ_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteServ</a>(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
2870 <a name="l00429"></a>00429 }
2876 <a class="anchor" name="SendTo_28userrec_20_2ASource_2C_20userrec_20_2ADest_2C_20std_3A_3Astring_20s_29"></a><!-- doxytag: member="Server::SendTo" ref="SendTo_28userrec_20_2ASource_2C_20userrec_20_2ADest_2C_20std_3A_3Astring_20s_29" args="(userrec *Source, userrec *Dest, std::string s)" --><p>
2877 <table class="mdTable" cellpadding="2" cellspacing="0">
2880 <table cellpadding="0" cellspacing="0" border="0">
2882 <td class="md" nowrap valign="top">void Server::SendTo </td>
2883 <td class="md" valign="top">( </td>
2884 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
2885 <td class="mdname" nowrap> <em>Source</em>, </td>
2888 <td class="md" nowrap align="right"></td>
2889 <td class="md"></td>
2890 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
2891 <td class="mdname" nowrap> <em>Dest</em>, </td>
2894 <td class="md" nowrap align="right"></td>
2895 <td class="md"></td>
2896 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2897 <td class="mdname" nowrap> <em>s</em></td>
2900 <td class="md"></td>
2901 <td class="md">) </td>
2902 <td class="md" colspan="2"><code> [virtual]</code></td>
2908 <table cellspacing="5" cellpadding="0" border="0">
2916 Sends text from a user to another user.
2918 This method writes a line of text to a user, with a user's nick/ident /host combination prepended, as used in PRIVMSG etc commands (see RFC 1459) If you specify NULL as the source, then the data will originate from the local server, e.g. instead of:<p>
2920 The format will become:<p>
2921 :localserver TEXT<p>
2922 Which is useful for numerics and server notices to single users, etc.
2924 Definition at line <a class="el" href="modules_8cpp-source.html#l00436">436</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2926 References <a class="el" href="connection_8h-source.html#l00042">connection::fd</a>, <a class="el" href="globals_8h.html#Write_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">Write()</a>, and <a class="el" href="globals_8h.html#WriteTo_28userrec_20_2Asource_2C_20userrec_20_2Adest_2C_20char_20_2Adata_2C_2E_2E_2E_29">WriteTo()</a>.<div class="fragment"><pre class="fragment"><a name="l00437"></a>00437 {
2927 <a name="l00438"></a>00438 <span class="keywordflow">if</span> (!Source)
2928 <a name="l00439"></a>00439 {
2929 <a name="l00440"></a>00440 <span class="comment">// if source is NULL, then the message originates from the local server</span>
2930 <a name="l00441"></a>00441 <a class="code" href="globals_8h.html#Write_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">Write</a>(Dest-><a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">":%s %s"</span>,this->GetServerName().c_str(),s.c_str());
2931 <a name="l00442"></a>00442 }
2932 <a name="l00443"></a>00443 <span class="keywordflow">else</span>
2933 <a name="l00444"></a>00444 {
2934 <a name="l00445"></a>00445 <span class="comment">// otherwise it comes from the user specified</span>
2935 <a name="l00446"></a>00446 <a class="code" href="globals_8h.html#WriteTo_28userrec_20_2Asource_2C_20userrec_20_2Adest_2C_20char_20_2Adata_2C_2E_2E_2E_29">WriteTo</a>(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str());
2936 <a name="l00447"></a>00447 }
2937 <a name="l00448"></a>00448 }
2943 <a class="anchor" name="SendToModeMask_28std_3A_3Astring_20modes_2C_20int_20flags_2C_20std_3A_3Astring_20text_29"></a><!-- doxytag: member="Server::SendToModeMask" ref="SendToModeMask_28std_3A_3Astring_20modes_2C_20int_20flags_2C_20std_3A_3Astring_20text_29" args="(std::string modes, int flags, std::string text)" --><p>
2944 <table class="mdTable" cellpadding="2" cellspacing="0">
2947 <table cellpadding="0" cellspacing="0" border="0">
2949 <td class="md" nowrap valign="top">void Server::SendToModeMask </td>
2950 <td class="md" valign="top">( </td>
2951 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2952 <td class="mdname" nowrap> <em>modes</em>, </td>
2955 <td class="md" nowrap align="right"></td>
2956 <td class="md"></td>
2957 <td class="md" nowrap>int </td>
2958 <td class="mdname" nowrap> <em>flags</em>, </td>
2961 <td class="md" nowrap align="right"></td>
2962 <td class="md"></td>
2963 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2964 <td class="mdname" nowrap> <em>text</em></td>
2967 <td class="md"></td>
2968 <td class="md">) </td>
2969 <td class="md" colspan="2"><code> [virtual]</code></td>
2975 <table cellspacing="5" cellpadding="0" border="0">
2983 Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter.
2985 These can be RFC specified modes such as +i, or module provided modes, including ones provided by your own module. In the second parameter you must place a flag value which indicates wether the modes you have given will be logically ANDed or OR'ed. You may use one of either WM_AND or WM_OR. for example, if you were to use:<p>
2986 Serv->SendToModeMask("xi", WM_OR, "m00");<p>
2987 Then the text 'm00' will be sent to all users with EITHER mode x or i. Conversely if you used WM_AND, the user must have both modes set to receive the message.
2989 Definition at line <a class="el" href="modules_8cpp-source.html#l00354">354</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00355"></a>00355 {
2990 <a name="l00356"></a>00356 WriteMode(modes.c_str(),flags,<span class="stringliteral">"%s"</span>,text.c_str());
2991 <a name="l00357"></a>00357 }
2997 <a class="anchor" name="SendWallops_28userrec_20_2AUser_2C_20std_3A_3Astring_20text_29"></a><!-- doxytag: member="Server::SendWallops" ref="SendWallops_28userrec_20_2AUser_2C_20std_3A_3Astring_20text_29" args="(userrec *User, std::string text)" --><p>
2998 <table class="mdTable" cellpadding="2" cellspacing="0">
3001 <table cellpadding="0" cellspacing="0" border="0">
3003 <td class="md" nowrap valign="top">void Server::SendWallops </td>
3004 <td class="md" valign="top">( </td>
3005 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
3006 <td class="mdname" nowrap> <em>User</em>, </td>
3009 <td class="md" nowrap align="right"></td>
3010 <td class="md"></td>
3011 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
3012 <td class="mdname" nowrap> <em>text</em></td>
3015 <td class="md"></td>
3016 <td class="md">) </td>
3017 <td class="md" colspan="2"><code> [virtual]</code></td>
3023 <table cellspacing="5" cellpadding="0" border="0">
3031 Sends a WALLOPS message.
3033 This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.
3035 Definition at line <a class="el" href="modules_8cpp-source.html#l00484">484</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
3037 References <a class="el" href="globals_8h.html#WriteWallOps_28userrec_20_2Asource_2C_20bool_20local_5Fonly_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteWallOps()</a>.<div class="fragment"><pre class="fragment"><a name="l00485"></a>00485 {
3038 <a name="l00486"></a>00486 <a class="code" href="globals_8h.html#WriteWallOps_28userrec_20_2Asource_2C_20bool_20local_5Fonly_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteWallOps</a>(User,<span class="keyword">false</span>,<span class="stringliteral">"%s"</span>,text.c_str());
3039 <a name="l00487"></a>00487 }
3045 <a class="anchor" name="UserToPseudo_28userrec_20_2Auser_2C_20std_3A_3Astring_20message_29"></a><!-- doxytag: member="Server::UserToPseudo" ref="UserToPseudo_28userrec_20_2Auser_2C_20std_3A_3Astring_20message_29" args="(userrec *user, std::string message)" --><p>
3046 <table class="mdTable" cellpadding="2" cellspacing="0">
3049 <table cellpadding="0" cellspacing="0" border="0">
3051 <td class="md" nowrap valign="top">bool Server::UserToPseudo </td>
3052 <td class="md" valign="top">( </td>
3053 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
3054 <td class="mdname" nowrap> <em>user</em>, </td>
3057 <td class="md" nowrap align="right"></td>
3058 <td class="md"></td>
3059 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
3060 <td class="mdname" nowrap> <em>message</em></td>
3063 <td class="md"></td>
3064 <td class="md">) </td>
3065 <td class="md" colspan="2"><code> [virtual]</code></td>
3071 <table cellspacing="5" cellpadding="0" border="0">
3079 Remove a user's connection to the irc server, but leave their client in existence in the user hash.
3081 When you call this function, the user's file descriptor will be replaced with the value of FD_MAGIC_NUMBER and their old file descriptor will be closed. This idle client will remain until it is restored with a valid file descriptor, or is removed from IRC by an operator After this call, the pointer to user will be invalid.
3083 Definition at line <a class="el" href="modules_8cpp-source.html#l00593">593</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
3085 References <a class="el" href="users_8cpp-source.html#l00232">userrec::ClearBuffer()</a>, <a class="el" href="socketengine_8cpp-source.html#l00103">SocketEngine::DelFd()</a>, <a class="el" href="connection_8h-source.html#l00042">connection::fd</a>, <a class="el" href="modules_8h-source.html#l00101">FD_MAGIC_NUMBER</a>, <a class="el" href="connection_8h-source.html#l00046">connection::host</a>, <a class="el" href="users_8h-source.html#l00129">userrec::ident</a>, and <a class="el" href="globals_8h.html#Write_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">Write()</a>.<div class="fragment"><pre class="fragment"><a name="l00594"></a>00594 {
3086 <a name="l00595"></a>00595 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> old_fd = user-><a class="code" href="classconnection.html#fd">fd</a>;
3087 <a name="l00596"></a>00596 user-><a class="code" href="classconnection.html#fd">fd</a> = <a class="code" href="modules_8h.html#FD_5FMAGIC_5FNUMBER">FD_MAGIC_NUMBER</a>;
3088 <a name="l00597"></a>00597 user-><a class="code" href="classuserrec.html#ClearBuffer_28_29">ClearBuffer</a>();
3089 <a name="l00598"></a>00598 <a class="code" href="globals_8h.html#Write_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">Write</a>(old_fd,<span class="stringliteral">"ERROR :Closing link (%s@%s) [%s]"</span>,user-><a class="code" href="classuserrec.html#ident_5BIDENTMAX_2B_32_5D">ident</a>,user-><a class="code" href="classconnection.html#host_5B_31_36_30_5D">host</a>,message.c_str());
3090 <a name="l00599"></a>00599 <a class="code" href="modules_8cpp.html#SE">SE</a>-><a class="code" href="classSocketEngine.html#DelFd_28int_20fd_29">DelFd</a>(old_fd);
3091 <a name="l00600"></a>00600 shutdown(old_fd,2);
3092 <a name="l00601"></a>00601 close(old_fd);
3093 <a name="l00602"></a>00602 <span class="keywordflow">return</span> <span class="keyword">true</span>;
3094 <a name="l00603"></a>00603 }
3100 <hr>The documentation for this class was generated from the following files:<ul>
3101 <li><a class="el" href="modules_8h-source.html">modules.h</a><li><a class="el" href="modules_8cpp-source.html">modules.cpp</a></ul>
3102 <hr size="1"><address style="align: right;"><small>Generated on Wed Dec 14 19:16:27 2005 for InspIRCd by
3103 <a href="http://www.doxygen.org/index.html">
3104 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4-20050815 </small></address>