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, handlerfunc 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#l00313">313</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00314"></a>00314 {
237 <a name="l00315"></a>00315 }
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#l00317">317</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00318"></a>00318 {
272 <a name="l00319"></a>00319 }
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>handlerfunc </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#l00419">419</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="l00420"></a>00420 {
340 <a name="l00421"></a>00421 <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="l00422"></a>00422 }
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#l00663">663</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="l00664"></a>00664 {
400 <a name="l00665"></a>00665 <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="l00666"></a>00666 }
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 Server::Find 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#l00587">587</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
443 References <a class="el" href="modules_8cpp-source.html#l00142">DoAddExtendedMode()</a>, <a class="el" href="modules_8cpp-source.html#l00152">ModeMakeList()</a>, and <a class="el" href="modules_8h-source.html#l00031">MT_CHANNEL</a>.<div class="fragment"><pre class="fragment"><a name="l00588"></a>00588 {
444 <a name="l00589"></a>00589 <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="l00590"></a>00590 <span class="keywordflow">if</span> (res)
446 <a name="l00591"></a>00591 <a class="code" href="modules_8cpp.html#ModeMakeList_28char_20modechar_29">ModeMakeList</a>(modechar);
447 <a name="l00592"></a>00592 <span class="keywordflow">return</span> res;
448 <a name="l00593"></a>00593 }
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#l00559">559</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#l00142">DoAddExtendedMode()</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="l00560"></a>00560 {
513 <a name="l00561"></a>00561 <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="l00562"></a>00562 {
515 <a name="l00563"></a>00563 <span class="keywordflow">if</span> (type == <a class="code" href="modules_8h.html#MT_5FSERVER">MT_SERVER</a>)
516 <a name="l00564"></a>00564 {
517 <a name="l00565"></a>00565 log(<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="l00566"></a>00566 <span class="keywordflow">return</span> <span class="keyword">false</span>;
519 <a name="l00567"></a>00567 }
520 <a name="l00568"></a>00568 <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="l00569"></a>00569 {
522 <a name="l00570"></a>00570 log(<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="l00571"></a>00571 <span class="keywordflow">return</span> <span class="keyword">false</span>;
524 <a name="l00572"></a>00572 }
525 <a name="l00573"></a>00573 <span class="keywordflow">if</span> ((params_when_on>1) || (params_when_off>1))
526 <a name="l00574"></a>00574 {
527 <a name="l00575"></a>00575 log(<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="l00576"></a>00576 <span class="keywordflow">return</span> <span class="keyword">false</span>;
529 <a name="l00577"></a>00577 }
530 <a name="l00578"></a>00578 <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="l00579"></a>00579 }
532 <a name="l00580"></a>00580 <span class="keywordflow">else</span>
533 <a name="l00581"></a>00581 {
534 <a name="l00582"></a>00582 log(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"*** API ERROR *** Muppet modechar detected."</span>);
535 <a name="l00583"></a>00583 }
536 <a name="l00584"></a>00584 <span class="keywordflow">return</span> <span class="keyword">false</span>;
537 <a name="l00585"></a>00585 }
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#l00643">643</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="l00644"></a>00644 {
596 <a name="l00645"></a>00645 <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="l00646"></a>00646 }
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#l00658">658</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="l00659"></a>00659 {
656 <a name="l00660"></a>00660 <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="l00661"></a>00661 }
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#l00648">648</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="l00649"></a>00649 {
716 <a name="l00650"></a>00650 <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="l00651"></a>00651 }
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#l00321">321</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="l00322"></a>00322 {
755 <a name="l00323"></a>00323 <a class="code" href="modules_8cpp.html#module_5Fsockets">module_sockets</a>.push_back(sock);
756 <a name="l00324"></a>00324 }
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#l00653">653</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="l00654"></a>00654 {
815 <a name="l00655"></a>00655 <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="l00656"></a>00656 }
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#l00693">693</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="l00694"></a>00694 {
854 <a name="l00695"></a>00695 <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="l00696"></a>00696 }
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#l00404">404</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00405"></a>00405 {
913 <a name="l00406"></a>00406 call_handler(commandname.c_str(),parameters,pcnt,user);
914 <a name="l00407"></a>00407 }
920 <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>
921 <table class="mdTable" cellpadding="2" cellspacing="0">
924 <table cellpadding="0" cellspacing="0" border="0">
926 <td class="md" nowrap valign="top">void Server::ChangeGECOS </td>
927 <td class="md" valign="top">( </td>
928 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
929 <td class="mdname" nowrap> <em>user</em>, </td>
932 <td class="md" nowrap align="right"></td>
934 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
935 <td class="mdname" nowrap> <em>gecos</em></td>
939 <td class="md">) </td>
940 <td class="md" colspan="2"><code> [virtual]</code></td>
946 <table cellspacing="5" cellpadding="0" border="0">
954 Change GECOS (fullname) of a user.
956 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.
958 Definition at line <a class="el" href="modules_8cpp-source.html#l00502">502</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
960 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="l00503"></a>00503 {
961 <a name="l00504"></a>00504 <a class="code" href="message_8h.html#ChangeName_28userrec_20_2Auser_2C_20const_20char_20_2Agecos_29">ChangeName</a>(user,gecos.c_str());
962 <a name="l00505"></a>00505 }
968 <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>
969 <table class="mdTable" cellpadding="2" cellspacing="0">
972 <table cellpadding="0" cellspacing="0" border="0">
974 <td class="md" nowrap valign="top">void Server::ChangeHost </td>
975 <td class="md" valign="top">( </td>
976 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
977 <td class="mdname" nowrap> <em>user</em>, </td>
980 <td class="md" nowrap align="right"></td>
982 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
983 <td class="mdname" nowrap> <em>host</em></td>
987 <td class="md">) </td>
988 <td class="md" colspan="2"><code> [virtual]</code></td>
994 <table cellspacing="5" cellpadding="0" border="0">
1002 Change displayed hostname of a user.
1004 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.
1006 Definition at line <a class="el" href="modules_8cpp-source.html#l00497">497</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1008 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="l00498"></a>00498 {
1009 <a name="l00499"></a>00499 <a class="code" href="message_8h.html#ChangeDisplayedHost_28userrec_20_2Auser_2C_20const_20char_20_2Ahost_29">ChangeDisplayedHost</a>(user,host.c_str());
1010 <a name="l00500"></a>00500 }
1016 <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>
1017 <table class="mdTable" cellpadding="2" cellspacing="0">
1020 <table cellpadding="0" cellspacing="0" border="0">
1022 <td class="md" nowrap valign="top">void Server::ChangeUserNick </td>
1023 <td class="md" valign="top">( </td>
1024 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1025 <td class="mdname" nowrap> <em>user</em>, </td>
1028 <td class="md" nowrap align="right"></td>
1029 <td class="md"></td>
1030 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1031 <td class="mdname" nowrap> <em>nickname</em></td>
1034 <td class="md"></td>
1035 <td class="md">) </td>
1036 <td class="md" colspan="2"><code> [virtual]</code></td>
1042 <table cellspacing="5" cellpadding="0" border="0">
1050 Forces a user nickchange.
1052 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.
1054 Definition at line <a class="el" href="modules_8cpp-source.html#l00389">389</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00390"></a>00390 {
1055 <a name="l00391"></a>00391 force_nickchange(user,nickname.c_str());
1056 <a name="l00392"></a>00392 }
1062 <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>
1063 <table class="mdTable" cellpadding="2" cellspacing="0">
1066 <table cellpadding="0" cellspacing="0" border="0">
1068 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> Server::ChanMode </td>
1069 <td class="md" valign="top">( </td>
1070 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1071 <td class="mdname" nowrap> <em>User</em>, </td>
1074 <td class="md" nowrap align="right"></td>
1075 <td class="md"></td>
1076 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
1077 <td class="mdname" nowrap> <em>Chan</em></td>
1080 <td class="md"></td>
1081 <td class="md">) </td>
1082 <td class="md" colspan="2"><code> [virtual]</code></td>
1088 <table cellspacing="5" cellpadding="0" border="0">
1096 Attempts to look up a user's privilages on a channel.
1098 This function will return a string containing either @, %, +, or an empty string, representing the user's privilages upon the channel you specify.
1100 Definition at line <a class="el" href="modules_8cpp-source.html#l00527">527</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1102 References <a class="el" href="message_8h.html#cmode_28userrec_20_2Auser_2C_20chanrec_20_2Achan_29">cmode()</a>.<div class="fragment"><pre class="fragment"><a name="l00528"></a>00528 {
1103 <a name="l00529"></a>00529 <span class="keywordflow">return</span> <a class="code" href="message_8h.html#cmode_28userrec_20_2Auser_2C_20chanrec_20_2Achan_29">cmode</a>(User,Chan);
1104 <a name="l00530"></a>00530 }
1110 <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>
1111 <table class="mdTable" cellpadding="2" cellspacing="0">
1114 <table cellpadding="0" cellspacing="0" border="0">
1116 <td class="md" nowrap valign="top">bool Server::CommonChannels </td>
1117 <td class="md" valign="top">( </td>
1118 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1119 <td class="mdname" nowrap> <em>u1</em>, </td>
1122 <td class="md" nowrap align="right"></td>
1123 <td class="md"></td>
1124 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
1125 <td class="mdname" nowrap> <em>u2</em></td>
1128 <td class="md"></td>
1129 <td class="md">) </td>
1130 <td class="md" colspan="2"><code> [virtual]</code></td>
1136 <table cellspacing="5" cellpadding="0" border="0">
1144 Returns true if two users share a common channel.
1146 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.
1148 Definition at line <a class="el" href="modules_8cpp-source.html#l00475">475</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1150 References <a class="el" href="message_8h.html#common_5Fchannels_28userrec_20_2Au_2C_20userrec_20_2Au_32_29">common_channels()</a>.<div class="fragment"><pre class="fragment"><a name="l00476"></a>00476 {
1151 <a name="l00477"></a>00477 <span class="keywordflow">return</span> (<a class="code" href="message_8h.html#common_5Fchannels_28userrec_20_2Au_2C_20userrec_20_2Au_32_29">common_channels</a>(u1,u2) != 0);
1152 <a name="l00478"></a>00478 }
1158 <a class="anchor" name="CountUsers_28chanrec_20_2Ac_29"></a><!-- doxytag: member="Server::CountUsers" ref="CountUsers_28chanrec_20_2Ac_29" args="(chanrec *c)" --><p>
1159 <table class="mdTable" cellpadding="2" cellspacing="0">
1162 <table cellpadding="0" cellspacing="0" border="0">
1164 <td class="md" nowrap valign="top">int Server::CountUsers </td>
1165 <td class="md" valign="top">( </td>
1166 <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> * </td>
1167 <td class="mdname1" valign="top" nowrap> <em>c</em> </td>
1168 <td class="md" valign="top"> ) </td>
1169 <td class="md" nowrap><code> [virtual]</code></td>
1175 <table cellspacing="5" cellpadding="0" border="0">
1183 Returns a count of the number of users on a channel.
1185 This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel.
1187 Definition at line <a class="el" href="modules_8cpp-source.html#l00595">595</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00596"></a>00596 {
1188 <a name="l00597"></a>00597 <span class="keywordflow">return</span> usercount(c);
1189 <a name="l00598"></a>00598 }
1195 <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>
1196 <table class="mdTable" cellpadding="2" cellspacing="0">
1199 <table cellpadding="0" cellspacing="0" border="0">
1201 <td class="md" nowrap valign="top">bool Server::DelELine </td>
1202 <td class="md" valign="top">( </td>
1203 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1204 <td class="mdname1" valign="top" nowrap> <em>hostmask</em> </td>
1205 <td class="md" valign="top"> ) </td>
1206 <td class="md" nowrap><code> [virtual]</code></td>
1212 <table cellspacing="5" cellpadding="0" border="0">
1220 Deletes a local E-Line.
1224 Definition at line <a class="el" href="modules_8cpp-source.html#l00688">688</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1226 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="l00689"></a>00689 {
1227 <a name="l00690"></a>00690 <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());
1228 <a name="l00691"></a>00691 }
1234 <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>
1235 <table class="mdTable" cellpadding="2" cellspacing="0">
1238 <table cellpadding="0" cellspacing="0" border="0">
1240 <td class="md" nowrap valign="top">bool Server::DelGLine </td>
1241 <td class="md" valign="top">( </td>
1242 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1243 <td class="mdname1" valign="top" nowrap> <em>hostmask</em> </td>
1244 <td class="md" valign="top"> ) </td>
1245 <td class="md" nowrap><code> [virtual]</code></td>
1251 <table cellspacing="5" cellpadding="0" border="0">
1259 Deletes a G-Line from all servers on the mesh.
1263 Definition at line <a class="el" href="modules_8cpp-source.html#l00668">668</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1265 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="l00669"></a>00669 {
1266 <a name="l00670"></a>00670 <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());
1267 <a name="l00671"></a>00671 }
1273 <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>
1274 <table class="mdTable" cellpadding="2" cellspacing="0">
1277 <table cellpadding="0" cellspacing="0" border="0">
1279 <td class="md" nowrap valign="top">bool Server::DelKLine </td>
1280 <td class="md" valign="top">( </td>
1281 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1282 <td class="mdname1" valign="top" nowrap> <em>hostmask</em> </td>
1283 <td class="md" valign="top"> ) </td>
1284 <td class="md" nowrap><code> [virtual]</code></td>
1290 <table cellspacing="5" cellpadding="0" border="0">
1298 Deletes a local K-Line.
1302 Definition at line <a class="el" href="modules_8cpp-source.html#l00683">683</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1304 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="l00684"></a>00684 {
1305 <a name="l00685"></a>00685 <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());
1306 <a name="l00686"></a>00686 }
1312 <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>
1313 <table class="mdTable" cellpadding="2" cellspacing="0">
1316 <table cellpadding="0" cellspacing="0" border="0">
1318 <td class="md" nowrap valign="top">bool Server::DelQLine </td>
1319 <td class="md" valign="top">( </td>
1320 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1321 <td class="mdname1" valign="top" nowrap> <em>nickname</em> </td>
1322 <td class="md" valign="top"> ) </td>
1323 <td class="md" nowrap><code> [virtual]</code></td>
1329 <table cellspacing="5" cellpadding="0" border="0">
1337 Deletes a Q-Line from all servers on the mesh.
1341 Definition at line <a class="el" href="modules_8cpp-source.html#l00673">673</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1343 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="l00674"></a>00674 {
1344 <a name="l00675"></a>00675 <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());
1345 <a name="l00676"></a>00676 }
1351 <a class="anchor" name="DelSocket_28InspSocket_20_2Asock_29"></a><!-- doxytag: member="Server::DelSocket" ref="DelSocket_28InspSocket_20_2Asock_29" args="(InspSocket *sock)" --><p>
1352 <table class="mdTable" cellpadding="2" cellspacing="0">
1355 <table cellpadding="0" cellspacing="0" border="0">
1357 <td class="md" nowrap valign="top">void Server::DelSocket </td>
1358 <td class="md" valign="top">( </td>
1359 <td class="md" nowrap valign="top"><a class="el" href="classInspSocket.html">InspSocket</a> * </td>
1360 <td class="mdname1" valign="top" nowrap> <em>sock</em> </td>
1361 <td class="md" valign="top"> ) </td>
1362 <td class="md" nowrap><code> [virtual]</code></td>
1368 <table cellspacing="5" cellpadding="0" border="0">
1376 Deletes a class derived from <a class="el" href="classInspSocket.html">InspSocket</a> from the server's socket engine.
1380 Definition at line <a class="el" href="modules_8cpp-source.html#l00337">337</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1382 References <a class="el" href="modules_8cpp.html#module_5Fsockets">module_sockets</a>.<div class="fragment"><pre class="fragment"><a name="l00338"></a>00338 {
1383 <a name="l00339"></a>00339 <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++)
1384 <a name="l00340"></a>00340 {
1385 <a name="l00341"></a>00341 <span class="keywordflow">if</span> (*a == sock)
1386 <a name="l00342"></a>00342 {
1387 <a name="l00343"></a>00343 <a class="code" href="modules_8cpp.html#module_5Fsockets">module_sockets</a>.erase(a);
1388 <a name="l00344"></a>00344 <span class="keywordflow">return</span>;
1389 <a name="l00345"></a>00345 }
1390 <a name="l00346"></a>00346 }
1391 <a name="l00347"></a>00347 }
1397 <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>
1398 <table class="mdTable" cellpadding="2" cellspacing="0">
1401 <table cellpadding="0" cellspacing="0" border="0">
1403 <td class="md" nowrap valign="top">bool Server::DelZLine </td>
1404 <td class="md" valign="top">( </td>
1405 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1406 <td class="mdname1" valign="top" nowrap> <em>ipaddr</em> </td>
1407 <td class="md" valign="top"> ) </td>
1408 <td class="md" nowrap><code> [virtual]</code></td>
1414 <table cellspacing="5" cellpadding="0" border="0">
1422 Deletes a Z-Line from all servers on the mesh.
1426 Definition at line <a class="el" href="modules_8cpp-source.html#l00678">678</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1428 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="l00679"></a>00679 {
1429 <a name="l00680"></a>00680 <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());
1430 <a name="l00681"></a>00681 }
1436 <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>
1437 <table class="mdTable" cellpadding="2" cellspacing="0">
1440 <table cellpadding="0" cellspacing="0" border="0">
1442 <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> * Server::FindChannel </td>
1443 <td class="md" valign="top">( </td>
1444 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1445 <td class="mdname1" valign="top" nowrap> <em>channel</em> </td>
1446 <td class="md" valign="top"> ) </td>
1447 <td class="md" nowrap><code> [virtual]</code></td>
1453 <table cellspacing="5" cellpadding="0" border="0">
1461 Attempts to look up a channel and return a pointer to it.
1463 This function will return NULL if the channel does not exist.
1465 Definition at line <a class="el" href="modules_8cpp-source.html#l00522">522</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00523"></a>00523 {
1466 <a name="l00524"></a>00524 <span class="keywordflow">return</span> FindChan(channel.c_str());
1467 <a name="l00525"></a>00525 }
1473 <a class="anchor" name="FindDescriptor_28int_20socket_29"></a><!-- doxytag: member="Server::FindDescriptor" ref="FindDescriptor_28int_20socket_29" args="(int socket)" --><p>
1474 <table class="mdTable" cellpadding="2" cellspacing="0">
1477 <table cellpadding="0" cellspacing="0" border="0">
1479 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * Server::FindDescriptor </td>
1480 <td class="md" valign="top">( </td>
1481 <td class="md" nowrap valign="top">int </td>
1482 <td class="mdname1" valign="top" nowrap> <em>socket</em> </td>
1483 <td class="md" valign="top"> ) </td>
1484 <td class="md" nowrap><code> [virtual]</code></td>
1490 <table cellspacing="5" cellpadding="0" border="0">
1498 Attempts to look up a nick using the file descriptor associated with that nick.
1500 This function will return NULL if the file descriptor is not associated with a valid user.
1502 Definition at line <a class="el" href="modules_8cpp-source.html#l00517">517</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00518"></a>00518 {
1503 <a name="l00519"></a>00519 <span class="keywordflow">return</span> (socket < 65536 ? fd_ref_table[socket] : NULL);
1504 <a name="l00520"></a>00520 }
1510 <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>
1511 <table class="mdTable" cellpadding="2" cellspacing="0">
1514 <table cellpadding="0" cellspacing="0" border="0">
1516 <td class="md" nowrap valign="top"><a class="el" href="classModule.html">Module</a> * Server::FindModule </td>
1517 <td class="md" valign="top">( </td>
1518 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1519 <td class="mdname1" valign="top" nowrap> <em>name</em> </td>
1520 <td class="md" valign="top"> ) </td>
1521 <td class="md" nowrap><code> [virtual]</code></td>
1527 <table cellspacing="5" cellpadding="0" border="0">
1535 This function finds a module by name.
1537 You must provide the filename of the module. If the module cannot be found (is not loaded) the function will return NULL.
1539 Definition at line <a class="el" href="modules_8cpp-source.html#l00727">727</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1541 References <a class="el" href="modules_8cpp-source.html#l00938">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="l00728"></a>00728 {
1542 <a name="l00729"></a>00729 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i <= <a class="code" href="channels_8cpp.html#MODCOUNT">MODCOUNT</a>; i++)
1543 <a name="l00730"></a>00730 {
1544 <a name="l00731"></a>00731 <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)
1545 <a name="l00732"></a>00732 {
1546 <a name="l00733"></a>00733 <span class="keywordflow">return</span> <a class="code" href="channels_8cpp.html#modules">modules</a>[i];
1547 <a name="l00734"></a>00734 }
1548 <a name="l00735"></a>00735 }
1549 <a name="l00736"></a>00736 <span class="keywordflow">return</span> NULL;
1550 <a name="l00737"></a>00737 }
1556 <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>
1557 <table class="mdTable" cellpadding="2" cellspacing="0">
1560 <table cellpadding="0" cellspacing="0" border="0">
1562 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * Server::FindNick </td>
1563 <td class="md" valign="top">( </td>
1564 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1565 <td class="mdname1" valign="top" nowrap> <em>nick</em> </td>
1566 <td class="md" valign="top"> ) </td>
1567 <td class="md" nowrap><code> [virtual]</code></td>
1573 <table cellspacing="5" cellpadding="0" border="0">
1581 Attempts to look up a nick and return a pointer to it.
1583 This function will return NULL if the nick does not exist.
1585 Definition at line <a class="el" href="modules_8cpp-source.html#l00512">512</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00513"></a>00513 {
1586 <a name="l00514"></a>00514 <span class="keywordflow">return</span> Find(nick);
1587 <a name="l00515"></a>00515 }
1593 <a class="anchor" name="GetAdmin_28_29"></a><!-- doxytag: member="Server::GetAdmin" ref="GetAdmin_28_29" args="()" --><p>
1594 <table class="mdTable" cellpadding="2" cellspacing="0">
1597 <table cellpadding="0" cellspacing="0" border="0">
1599 <td class="md" nowrap valign="top"><a class="el" href="classAdmin.html">Admin</a> Server::GetAdmin </td>
1600 <td class="md" valign="top">( </td>
1601 <td class="mdname1" valign="top" nowrap> </td>
1602 <td class="md" valign="top"> ) </td>
1603 <td class="md" nowrap><code> [virtual]</code></td>
1609 <table cellspacing="5" cellpadding="0" border="0">
1617 Returns the information of the server as returned by the /ADMIN command.
1619 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.
1621 Definition at line <a class="el" href="modules_8cpp-source.html#l00552">552</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00553"></a>00553 {
1622 <a name="l00554"></a>00554 <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick());
1623 <a name="l00555"></a>00555 }
1629 <a class="anchor" name="GetConfig_28_29"></a><!-- doxytag: member="Server::GetConfig" ref="GetConfig_28_29" args="()" --><p>
1630 <table class="mdTable" cellpadding="2" cellspacing="0">
1633 <table cellpadding="0" cellspacing="0" border="0">
1635 <td class="md" nowrap valign="top"><a class="el" href="classServerConfig.html">ServerConfig</a> * Server::GetConfig </td>
1636 <td class="md" valign="top">( </td>
1637 <td class="mdname1" valign="top" nowrap> </td>
1638 <td class="md" valign="top"> ) </td>
1639 <td class="md" nowrap></td>
1645 <table cellspacing="5" cellpadding="0" border="0">
1653 Obtains a pointer to the server's <a class="el" href="classServerConfig.html">ServerConfig</a> object.
1655 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.
1657 Definition at line <a class="el" href="modules_8cpp-source.html#l00332">332</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00333"></a>00333 {
1658 <a name="l00334"></a>00334 <span class="keywordflow">return</span> <a class="code" href="channels_8cpp.html#Config">Config</a>;
1659 <a name="l00335"></a>00335 }
1665 <a class="anchor" name="GetNetworkName_28_29"></a><!-- doxytag: member="Server::GetNetworkName" ref="GetNetworkName_28_29" args="()" --><p>
1666 <table class="mdTable" cellpadding="2" cellspacing="0">
1669 <table cellpadding="0" cellspacing="0" border="0">
1671 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> Server::GetNetworkName </td>
1672 <td class="md" valign="top">( </td>
1673 <td class="mdname1" valign="top" nowrap> </td>
1674 <td class="md" valign="top"> ) </td>
1675 <td class="md" nowrap><code> [virtual]</code></td>
1681 <table cellspacing="5" cellpadding="0" border="0">
1689 Returns the network name, global to all linked servers.
1693 Definition at line <a class="el" href="modules_8cpp-source.html#l00542">542</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00543"></a>00543 {
1694 <a name="l00544"></a>00544 <span class="keywordflow">return</span> getnetworkname();
1695 <a name="l00545"></a>00545 }
1701 <a class="anchor" name="GetServerDescription_28_29"></a><!-- doxytag: member="Server::GetServerDescription" ref="GetServerDescription_28_29" args="()" --><p>
1702 <table class="mdTable" cellpadding="2" cellspacing="0">
1705 <table cellpadding="0" cellspacing="0" border="0">
1707 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> Server::GetServerDescription </td>
1708 <td class="md" valign="top">( </td>
1709 <td class="mdname1" valign="top" nowrap> </td>
1710 <td class="md" valign="top"> ) </td>
1711 <td class="md" nowrap><code> [virtual]</code></td>
1717 <table cellspacing="5" cellpadding="0" border="0">
1725 Returns the server description string of the local server.
1729 Definition at line <a class="el" href="modules_8cpp-source.html#l00547">547</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00548"></a>00548 {
1730 <a name="l00549"></a>00549 <span class="keywordflow">return</span> getserverdesc();
1731 <a name="l00550"></a>00550 }
1737 <a class="anchor" name="GetServerName_28_29"></a><!-- doxytag: member="Server::GetServerName" ref="GetServerName_28_29" args="()" --><p>
1738 <table class="mdTable" cellpadding="2" cellspacing="0">
1741 <table cellpadding="0" cellspacing="0" border="0">
1743 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> Server::GetServerName </td>
1744 <td class="md" valign="top">( </td>
1745 <td class="mdname1" valign="top" nowrap> </td>
1746 <td class="md" valign="top"> ) </td>
1747 <td class="md" nowrap><code> [virtual]</code></td>
1753 <table cellspacing="5" cellpadding="0" border="0">
1761 Returns the server name of the server where the module is loaded.
1765 Definition at line <a class="el" href="modules_8cpp-source.html#l00537">537</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00538"></a>00538 {
1766 <a name="l00539"></a>00539 <span class="keywordflow">return</span> getservername();
1767 <a name="l00540"></a>00540 }
1773 <a class="anchor" name="GetUsers_28chanrec_20_2Achan_29"></a><!-- doxytag: member="Server::GetUsers" ref="GetUsers_28chanrec_20_2Achan_29" args="(chanrec *chan)" --><p>
1774 <table class="mdTable" cellpadding="2" cellspacing="0">
1777 <table cellpadding="0" cellspacing="0" border="0">
1779 <td class="md" nowrap valign="top"><a class="el" href="modules_8h.html#chanuserlist">chanuserlist</a> Server::GetUsers </td>
1780 <td class="md" valign="top">( </td>
1781 <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> * </td>
1782 <td class="mdname1" valign="top" nowrap> <em>chan</em> </td>
1783 <td class="md" valign="top"> ) </td>
1784 <td class="md" nowrap><code> [virtual]</code></td>
1790 <table cellspacing="5" cellpadding="0" border="0">
1798 Fetches the userlist of a channel.
1800 This function must be here and not a member of userrec or chanrec due to include constraints.
1802 Definition at line <a class="el" href="modules_8cpp-source.html#l00377">377</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1804 References <a class="el" href="channels_8cpp-source.html#l00186">chanrec::GetUsers()</a>.<div class="fragment"><pre class="fragment"><a name="l00378"></a>00378 {
1805 <a name="l00379"></a>00379 <a class="code" href="modules_8h.html#chanuserlist">chanuserlist</a> userl;
1806 <a name="l00380"></a>00380 userl.clear();
1807 <a name="l00381"></a>00381 std::vector<char*> *list = chan-><a class="code" href="classchanrec.html#GetUsers_28_29">GetUsers</a>();
1808 <a name="l00382"></a>00382 <span class="keywordflow">for</span> (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
1809 <a name="l00383"></a>00383 {
1810 <a name="l00384"></a>00384 <span class="keywordtype">char</span>* o = *i;
1811 <a name="l00385"></a>00385 userl.push_back((<a class="code" href="classuserrec.html">userrec</a>*)o);
1812 <a name="l00386"></a>00386 }
1813 <a name="l00387"></a>00387 <span class="keywordflow">return</span> userl;
1814 <a name="l00388"></a>00388 }
1820 <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>
1821 <table class="mdTable" cellpadding="2" cellspacing="0">
1824 <table cellpadding="0" cellspacing="0" border="0">
1826 <td class="md" nowrap valign="top">bool Server::IsNick </td>
1827 <td class="md" valign="top">( </td>
1828 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1829 <td class="mdname1" valign="top" nowrap> <em>nick</em> </td>
1830 <td class="md" valign="top"> ) </td>
1831 <td class="md" nowrap><code> [virtual]</code></td>
1837 <table cellspacing="5" cellpadding="0" border="0">
1845 Returns true if a nick is valid.
1847 Nicks for unregistered connections will return false.
1849 Definition at line <a class="el" href="modules_8cpp-source.html#l00507">507</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1851 References <a class="el" href="message_8h.html#isnick_28const_20char_20_2An_29">isnick()</a>.<div class="fragment"><pre class="fragment"><a name="l00508"></a>00508 {
1852 <a name="l00509"></a>00509 <span class="keywordflow">return</span> (<a class="code" href="message_8h.html#isnick_28const_20char_20_2An_29">isnick</a>(nick.c_str()) != 0);
1853 <a name="l00510"></a>00510 }
1859 <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>
1860 <table class="mdTable" cellpadding="2" cellspacing="0">
1863 <table cellpadding="0" cellspacing="0" border="0">
1865 <td class="md" nowrap valign="top">bool Server::IsOnChannel </td>
1866 <td class="md" valign="top">( </td>
1867 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
1868 <td class="mdname" nowrap> <em>User</em>, </td>
1871 <td class="md" nowrap align="right"></td>
1872 <td class="md"></td>
1873 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
1874 <td class="mdname" nowrap> <em>Chan</em></td>
1877 <td class="md"></td>
1878 <td class="md">) </td>
1879 <td class="md" colspan="2"><code> [virtual]</code></td>
1885 <table cellspacing="5" cellpadding="0" border="0">
1893 Checks if a user is on a channel.
1895 This function will return true or false to indicate if user 'User' is on channel 'Chan'.
1897 Definition at line <a class="el" href="modules_8cpp-source.html#l00532">532</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1899 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="l00533"></a>00533 {
1900 <a name="l00534"></a>00534 <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);
1901 <a name="l00535"></a>00535 }
1907 <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>
1908 <table class="mdTable" cellpadding="2" cellspacing="0">
1911 <table cellpadding="0" cellspacing="0" border="0">
1913 <td class="md" nowrap valign="top">bool Server::IsUlined </td>
1914 <td class="md" valign="top">( </td>
1915 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1916 <td class="mdname1" valign="top" nowrap> <em>server</em> </td>
1917 <td class="md" valign="top"> ) </td>
1918 <td class="md" nowrap><code> [virtual]</code></td>
1924 <table cellspacing="5" cellpadding="0" border="0">
1932 Returns true if the servername you give is ulined.
1934 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.
1936 Definition at line <a class="el" href="modules_8cpp-source.html#l00399">399</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1938 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="l00400"></a>00400 {
1939 <a name="l00401"></a>00401 <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());
1940 <a name="l00402"></a>00402 }
1946 <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>
1947 <table class="mdTable" cellpadding="2" cellspacing="0">
1950 <table cellpadding="0" cellspacing="0" border="0">
1952 <td class="md" nowrap valign="top">bool Server::IsValidMask </td>
1953 <td class="md" valign="top">( </td>
1954 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
1955 <td class="mdname1" valign="top" nowrap> <em>mask</em> </td>
1956 <td class="md" valign="top"> ) </td>
1957 <td class="md" nowrap><code> [virtual]</code></td>
1963 <table cellspacing="5" cellpadding="0" border="0">
1971 Returns true if a nick!ident string is correctly formatted, false if otherwise.
1975 Definition at line <a class="el" href="modules_8cpp-source.html#l00698">698</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00699"></a>00699 {
1976 <a name="l00700"></a>00700 <span class="keyword">const</span> <span class="keywordtype">char</span>* dest = mask.c_str();
1977 <a name="l00701"></a>00701 <span class="keywordflow">if</span> (strchr(dest,<span class="charliteral">'!'</span>)==0)
1978 <a name="l00702"></a>00702 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1979 <a name="l00703"></a>00703 <span class="keywordflow">if</span> (strchr(dest,<span class="charliteral">'@'</span>)==0)
1980 <a name="l00704"></a>00704 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1981 <a name="l00705"></a>00705 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < strlen(dest); i++)
1982 <a name="l00706"></a>00706 <span class="keywordflow">if</span> (dest[i] < 32)
1983 <a name="l00707"></a>00707 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1984 <a name="l00708"></a>00708 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < strlen(dest); i++)
1985 <a name="l00709"></a>00709 <span class="keywordflow">if</span> (dest[i] > 126)
1986 <a name="l00710"></a>00710 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1987 <a name="l00711"></a>00711 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> c = 0;
1988 <a name="l00712"></a>00712 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < strlen(dest); i++)
1989 <a name="l00713"></a>00713 <span class="keywordflow">if</span> (dest[i] == <span class="charliteral">'!'</span>)
1990 <a name="l00714"></a>00714 c++;
1991 <a name="l00715"></a>00715 <span class="keywordflow">if</span> (c>1)
1992 <a name="l00716"></a>00716 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1993 <a name="l00717"></a>00717 c = 0;
1994 <a name="l00718"></a>00718 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < strlen(dest); i++)
1995 <a name="l00719"></a>00719 <span class="keywordflow">if</span> (dest[i] == <span class="charliteral">'@'</span>)
1996 <a name="l00720"></a>00720 c++;
1997 <a name="l00721"></a>00721 <span class="keywordflow">if</span> (c>1)
1998 <a name="l00722"></a>00722 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1999 <a name="l00723"></a>00723
2000 <a name="l00724"></a>00724 <span class="keywordflow">return</span> <span class="keyword">true</span>;
2001 <a name="l00725"></a>00725 }
2007 <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>
2008 <table class="mdTable" cellpadding="2" cellspacing="0">
2011 <table cellpadding="0" cellspacing="0" border="0">
2013 <td class="md" nowrap valign="top">bool Server::IsValidModuleCommand </td>
2014 <td class="md" valign="top">( </td>
2015 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2016 <td class="mdname" nowrap> <em>commandname</em>, </td>
2019 <td class="md" nowrap align="right"></td>
2020 <td class="md"></td>
2021 <td class="md" nowrap>int </td>
2022 <td class="mdname" nowrap> <em>pcnt</em>, </td>
2025 <td class="md" nowrap align="right"></td>
2026 <td class="md"></td>
2027 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
2028 <td class="mdname" nowrap> <em>user</em></td>
2031 <td class="md"></td>
2032 <td class="md">) </td>
2033 <td class="md" colspan="2"><code> [virtual]</code></td>
2039 <table cellspacing="5" cellpadding="0" border="0">
2049 Definition at line <a class="el" href="modules_8cpp-source.html#l00409">409</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00410"></a>00410 {
2050 <a name="l00411"></a>00411 <span class="keywordflow">return</span> is_valid_cmd(commandname.c_str(), pcnt, user);
2051 <a name="l00412"></a>00412 }
2057 <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>
2058 <table class="mdTable" cellpadding="2" cellspacing="0">
2061 <table cellpadding="0" cellspacing="0" border="0">
2063 <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> * Server::JoinUserToChannel </td>
2064 <td class="md" valign="top">( </td>
2065 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
2066 <td class="mdname" nowrap> <em>user</em>, </td>
2069 <td class="md" nowrap align="right"></td>
2070 <td class="md"></td>
2071 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2072 <td class="mdname" nowrap> <em>cname</em>, </td>
2075 <td class="md" nowrap align="right"></td>
2076 <td class="md"></td>
2077 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2078 <td class="mdname" nowrap> <em>key</em></td>
2081 <td class="md"></td>
2082 <td class="md">) </td>
2083 <td class="md" colspan="2"><code> [virtual]</code></td>
2089 <table cellspacing="5" cellpadding="0" border="0">
2097 Forces a user to join a channel.
2099 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.
2101 Definition at line <a class="el" href="modules_8cpp-source.html#l00367">367</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00368"></a>00368 {
2102 <a name="l00369"></a>00369 <span class="keywordflow">return</span> add_channel(user,cname.c_str(),key.c_str(),<span class="keyword">false</span>);
2103 <a name="l00370"></a>00370 }
2109 <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>
2110 <table class="mdTable" cellpadding="2" cellspacing="0">
2113 <table cellpadding="0" cellspacing="0" border="0">
2115 <td class="md" nowrap valign="top">void Server::Log </td>
2116 <td class="md" valign="top">( </td>
2117 <td class="md" nowrap valign="top">int </td>
2118 <td class="mdname" nowrap> <em>level</em>, </td>
2121 <td class="md" nowrap align="right"></td>
2122 <td class="md"></td>
2123 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2124 <td class="mdname" nowrap> <em>s</em></td>
2127 <td class="md"></td>
2128 <td class="md">) </td>
2129 <td class="md" colspan="2"><code> [virtual]</code></td>
2135 <table cellspacing="5" cellpadding="0" border="0">
2143 Writes a log string.
2145 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.
2147 Definition at line <a class="el" href="modules_8cpp-source.html#l00414">414</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00415"></a>00415 {
2148 <a name="l00416"></a>00416 log(level,<span class="stringliteral">"%s"</span>,s.c_str());
2149 <a name="l00417"></a>00417 }
2155 <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>
2156 <table class="mdTable" cellpadding="2" cellspacing="0">
2159 <table cellpadding="0" cellspacing="0" border="0">
2161 <td class="md" nowrap valign="top">bool Server::MatchText </td>
2162 <td class="md" valign="top">( </td>
2163 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2164 <td class="mdname" nowrap> <em>sliteral</em>, </td>
2167 <td class="md" nowrap align="right"></td>
2168 <td class="md"></td>
2169 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2170 <td class="mdname" nowrap> <em>spattern</em></td>
2173 <td class="md"></td>
2174 <td class="md">) </td>
2175 <td class="md" colspan="2"><code> [virtual]</code></td>
2181 <table cellspacing="5" cellpadding="0" border="0">
2189 Matches text against a glob pattern.
2191 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.
2193 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 {
2194 <a name="l00356"></a>00356 <span class="keywordtype">char</span> literal[MAXBUF],pattern[MAXBUF];
2195 <a name="l00357"></a>00357 strlcpy(literal,sliteral.c_str(),MAXBUF);
2196 <a name="l00358"></a>00358 strlcpy(pattern,spattern.c_str(),MAXBUF);
2197 <a name="l00359"></a>00359 <span class="keywordflow">return</span> match(literal,pattern);
2198 <a name="l00360"></a>00360 }
2204 <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>
2205 <table class="mdTable" cellpadding="2" cellspacing="0">
2208 <table cellpadding="0" cellspacing="0" border="0">
2210 <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> * Server::PartUserFromChannel </td>
2211 <td class="md" valign="top">( </td>
2212 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
2213 <td class="mdname" nowrap> <em>user</em>, </td>
2216 <td class="md" nowrap align="right"></td>
2217 <td class="md"></td>
2218 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2219 <td class="mdname" nowrap> <em>cname</em>, </td>
2222 <td class="md" nowrap align="right"></td>
2223 <td class="md"></td>
2224 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2225 <td class="mdname" nowrap> <em>reason</em></td>
2228 <td class="md"></td>
2229 <td class="md">) </td>
2230 <td class="md" colspan="2"><code> [virtual]</code></td>
2236 <table cellspacing="5" cellpadding="0" border="0">
2244 Forces a user to part a channel.
2246 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.
2248 Definition at line <a class="el" href="modules_8cpp-source.html#l00372">372</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00373"></a>00373 {
2249 <a name="l00374"></a>00374 <span class="keywordflow">return</span> del_channel(user,cname.c_str(),reason.c_str(),<span class="keyword">false</span>);
2250 <a name="l00375"></a>00375 }
2256 <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>
2257 <table class="mdTable" cellpadding="2" cellspacing="0">
2260 <table cellpadding="0" cellspacing="0" border="0">
2262 <td class="md" nowrap valign="top">bool Server::PseudoToUser </td>
2263 <td class="md" valign="top">( </td>
2264 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
2265 <td class="mdname" nowrap> <em>alive</em>, </td>
2268 <td class="md" nowrap align="right"></td>
2269 <td class="md"></td>
2270 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
2271 <td class="mdname" nowrap> <em>zombie</em>, </td>
2274 <td class="md" nowrap align="right"></td>
2275 <td class="md"></td>
2276 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2277 <td class="mdname" nowrap> <em>message</em></td>
2280 <td class="md"></td>
2281 <td class="md">) </td>
2282 <td class="md" colspan="2"><code> [virtual]</code></td>
2288 <table cellspacing="5" cellpadding="0" border="0">
2296 This user takes one user, and switches their file descriptor with another user, so that one user "becomes" the other.
2298 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.
2300 Definition at line <a class="el" href="modules_8cpp-source.html#l00613">613</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2302 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="channels_8h-source.html#l00106">chanrec::name</a>, <a class="el" href="users_8h-source.html#l00124">userrec::nick</a>, <a class="el" href="channels_8h-source.html#l00131">chanrec::setby</a>, <a class="el" href="channels_8h-source.html#l00120">chanrec::topic</a>, and <a class="el" href="channels_8h-source.html#l00127">chanrec::topicset</a>.<div class="fragment"><pre class="fragment"><a name="l00614"></a>00614 {
2303 <a name="l00615"></a>00615 zombie-><a class="code" href="classconnection.html#fd">fd</a> = alive-><a class="code" href="classconnection.html#fd">fd</a>;
2304 <a name="l00616"></a>00616 alive-><a class="code" href="classconnection.html#fd">fd</a> = <a class="code" href="modules_8h.html#FD_5FMAGIC_5FNUMBER">FD_MAGIC_NUMBER</a>;
2305 <a name="l00617"></a>00617 alive-><a class="code" href="classuserrec.html#ClearBuffer_28_29">ClearBuffer</a>();
2306 <a name="l00618"></a>00618 Write(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>);
2307 <a name="l00619"></a>00619 kill_link(alive,message.c_str());
2308 <a name="l00620"></a>00620 <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;
2309 <a name="l00621"></a>00621 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < zombie->chans.size(); i++)
2310 <a name="l00622"></a>00622 {
2311 <a name="l00623"></a>00623 <span class="keywordflow">if</span> (zombie-><a class="code" href="classuserrec.html#chans">chans</a>[i].channel != NULL)
2312 <a name="l00624"></a>00624 {
2313 <a name="l00625"></a>00625 <span class="keywordflow">if</span> (zombie-><a class="code" href="classuserrec.html#chans">chans</a>[i].channel->name)
2314 <a name="l00626"></a>00626 {
2315 <a name="l00627"></a>00627 <a class="code" href="classchanrec.html">chanrec</a>* Ptr = zombie-><a class="code" href="classuserrec.html#chans">chans</a>[i].channel;
2316 <a name="l00628"></a>00628 WriteFrom(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>);
2317 <a name="l00629"></a>00629 <span class="keywordflow">if</span> (Ptr-><a class="code" href="classchanrec.html#topicset">topicset</a>)
2318 <a name="l00630"></a>00630 {
2319 <a name="l00631"></a>00631 WriteServ(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>);
2320 <a name="l00632"></a>00632 WriteServ(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>);
2321 <a name="l00633"></a>00633 }
2322 <a name="l00634"></a>00634 userlist(zombie,Ptr);
2323 <a name="l00635"></a>00635 WriteServ(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>);
2324 <a name="l00636"></a>00636
2325 <a name="l00637"></a>00637 }
2326 <a name="l00638"></a>00638 }
2327 <a name="l00639"></a>00639 }
2328 <a name="l00640"></a>00640 <span class="keywordflow">return</span> <span class="keyword">true</span>;
2329 <a name="l00641"></a>00641 }
2335 <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>
2336 <table class="mdTable" cellpadding="2" cellspacing="0">
2339 <table cellpadding="0" cellspacing="0" border="0">
2341 <td class="md" nowrap valign="top">void Server::QuitUser </td>
2342 <td class="md" valign="top">( </td>
2343 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
2344 <td class="mdname" nowrap> <em>user</em>, </td>
2347 <td class="md" nowrap align="right"></td>
2348 <td class="md"></td>
2349 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2350 <td class="mdname" nowrap> <em>reason</em></td>
2353 <td class="md"></td>
2354 <td class="md">) </td>
2355 <td class="md" colspan="2"><code> [virtual]</code></td>
2361 <table cellspacing="5" cellpadding="0" border="0">
2369 Forces a user to quit with the specified reason.
2371 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>
2373 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.
2375 Definition at line <a class="el" href="modules_8cpp-source.html#l00394">394</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00395"></a>00395 {
2376 <a name="l00396"></a>00396 kill_link(user,reason.c_str());
2377 <a name="l00397"></a>00397 }
2383 <a class="anchor" name="RehashServer_28_29"></a><!-- doxytag: member="Server::RehashServer" ref="RehashServer_28_29" args="()" --><p>
2384 <table class="mdTable" cellpadding="2" cellspacing="0">
2387 <table cellpadding="0" cellspacing="0" border="0">
2389 <td class="md" nowrap valign="top">void Server::RehashServer </td>
2390 <td class="md" valign="top">( </td>
2391 <td class="mdname1" valign="top" nowrap> </td>
2392 <td class="md" valign="top"> ) </td>
2393 <td class="md" nowrap><code> [virtual]</code></td>
2399 <table cellspacing="5" cellpadding="0" border="0">
2409 Definition at line <a class="el" href="modules_8cpp-source.html#l00326">326</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2411 References <a class="el" href="classServerConfig.html#Read_28bool_20bail_2C_20userrec_20_2Auser_29">ServerConfig::Read()</a>.<div class="fragment"><pre class="fragment"><a name="l00327"></a>00327 {
2412 <a name="l00328"></a>00328 WriteOpers(<span class="stringliteral">"*** Rehashing config file"</span>);
2413 <a name="l00329"></a>00329 <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);
2414 <a name="l00330"></a>00330 }
2420 <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>
2421 <table class="mdTable" cellpadding="2" cellspacing="0">
2424 <table cellpadding="0" cellspacing="0" border="0">
2426 <td class="md" nowrap valign="top">void Server::Send </td>
2427 <td class="md" valign="top">( </td>
2428 <td class="md" nowrap valign="top">int </td>
2429 <td class="mdname" nowrap> <em>Socket</em>, </td>
2432 <td class="md" nowrap align="right"></td>
2433 <td class="md"></td>
2434 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2435 <td class="mdname" nowrap> <em>s</em></td>
2438 <td class="md"></td>
2439 <td class="md">) </td>
2440 <td class="md" colspan="2"><code> [virtual]</code></td>
2446 <table cellspacing="5" cellpadding="0" border="0">
2454 Sends a line of text down a TCP/IP socket.
2456 This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.
2458 Definition at line <a class="el" href="modules_8cpp-source.html#l00429">429</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00430"></a>00430 {
2459 <a name="l00431"></a>00431 Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
2460 <a name="l00432"></a>00432 }
2466 <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>
2467 <table class="mdTable" cellpadding="2" cellspacing="0">
2470 <table cellpadding="0" cellspacing="0" border="0">
2472 <td class="md" nowrap valign="top">void Server::SendChannel </td>
2473 <td class="md" valign="top">( </td>
2474 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
2475 <td class="mdname" nowrap> <em>User</em>, </td>
2478 <td class="md" nowrap align="right"></td>
2479 <td class="md"></td>
2480 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
2481 <td class="mdname" nowrap> <em>Channel</em>, </td>
2484 <td class="md" nowrap align="right"></td>
2485 <td class="md"></td>
2486 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2487 <td class="mdname" nowrap> <em>s</em>, </td>
2490 <td class="md" nowrap align="right"></td>
2491 <td class="md"></td>
2492 <td class="md" nowrap>bool </td>
2493 <td class="mdname" nowrap> <em>IncludeSender</em></td>
2496 <td class="md"></td>
2497 <td class="md">) </td>
2498 <td class="md" colspan="2"><code> [virtual]</code></td>
2504 <table cellspacing="5" cellpadding="0" border="0">
2512 Sends text from a user to a channel (mulicast).
2514 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).
2516 Definition at line <a class="el" href="modules_8cpp-source.html#l00463">463</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00464"></a>00464 {
2517 <a name="l00465"></a>00465 <span class="keywordflow">if</span> (IncludeSender)
2518 <a name="l00466"></a>00466 {
2519 <a name="l00467"></a>00467 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
2520 <a name="l00468"></a>00468 }
2521 <a name="l00469"></a>00469 <span class="keywordflow">else</span>
2522 <a name="l00470"></a>00470 {
2523 <a name="l00471"></a>00471 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
2524 <a name="l00472"></a>00472 }
2525 <a name="l00473"></a>00473 }
2531 <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>
2532 <table class="mdTable" cellpadding="2" cellspacing="0">
2535 <table cellpadding="0" cellspacing="0" border="0">
2537 <td class="md" nowrap valign="top">void Server::SendChannelServerNotice </td>
2538 <td class="md" valign="top">( </td>
2539 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2540 <td class="mdname" nowrap> <em>ServName</em>, </td>
2543 <td class="md" nowrap align="right"></td>
2544 <td class="md"></td>
2545 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
2546 <td class="mdname" nowrap> <em>Channel</em>, </td>
2549 <td class="md" nowrap align="right"></td>
2550 <td class="md"></td>
2551 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2552 <td class="mdname" nowrap> <em>text</em></td>
2555 <td class="md"></td>
2556 <td class="md">) </td>
2557 <td class="md" colspan="2"><code> [virtual]</code></td>
2563 <table cellspacing="5" cellpadding="0" border="0">
2571 Writes text to a channel, but from a server, including all.
2573 This can be used to send server notices to a group of users.
2575 Definition at line <a class="el" href="modules_8cpp-source.html#l00458">458</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00459"></a>00459 {
2576 <a name="l00460"></a>00460 WriteChannelWithServ((<span class="keywordtype">char</span>*)ServName.c_str(), Channel, <span class="stringliteral">"%s"</span>, text.c_str());
2577 <a name="l00461"></a>00461 }
2583 <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>
2584 <table class="mdTable" cellpadding="2" cellspacing="0">
2587 <table cellpadding="0" cellspacing="0" border="0">
2589 <td class="md" nowrap valign="top">void Server::SendCommon </td>
2590 <td class="md" valign="top">( </td>
2591 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
2592 <td class="mdname" nowrap> <em>User</em>, </td>
2595 <td class="md" nowrap align="right"></td>
2596 <td class="md"></td>
2597 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2598 <td class="mdname" nowrap> <em>text</em>, </td>
2601 <td class="md" nowrap align="right"></td>
2602 <td class="md"></td>
2603 <td class="md" nowrap>bool </td>
2604 <td class="mdname" nowrap> <em>IncludeSender</em></td>
2607 <td class="md"></td>
2608 <td class="md">) </td>
2609 <td class="md" colspan="2"><code> [virtual]</code></td>
2615 <table cellspacing="5" cellpadding="0" border="0">
2623 Sends text from a user to one or more channels (mulicast).
2625 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.
2627 Definition at line <a class="el" href="modules_8cpp-source.html#l00480">480</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00481"></a>00481 {
2628 <a name="l00482"></a>00482 <span class="keywordflow">if</span> (IncludeSender)
2629 <a name="l00483"></a>00483 {
2630 <a name="l00484"></a>00484 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str());
2631 <a name="l00485"></a>00485 }
2632 <a name="l00486"></a>00486 <span class="keywordflow">else</span>
2633 <a name="l00487"></a>00487 {
2634 <a name="l00488"></a>00488 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str());
2635 <a name="l00489"></a>00489 }
2636 <a name="l00490"></a>00490 }
2642 <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>
2643 <table class="mdTable" cellpadding="2" cellspacing="0">
2646 <table cellpadding="0" cellspacing="0" border="0">
2648 <td class="md" nowrap valign="top">void Server::SendFrom </td>
2649 <td class="md" valign="top">( </td>
2650 <td class="md" nowrap valign="top">int </td>
2651 <td class="mdname" nowrap> <em>Socket</em>, </td>
2654 <td class="md" nowrap align="right"></td>
2655 <td class="md"></td>
2656 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
2657 <td class="mdname" nowrap> <em>User</em>, </td>
2660 <td class="md" nowrap align="right"></td>
2661 <td class="md"></td>
2662 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2663 <td class="mdname" nowrap> <em>s</em></td>
2666 <td class="md"></td>
2667 <td class="md">) </td>
2668 <td class="md" colspan="2"><code> [virtual]</code></td>
2674 <table cellspacing="5" cellpadding="0" border="0">
2682 Sends text from a user to a socket.
2684 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)
2686 Definition at line <a class="el" href="modules_8cpp-source.html#l00439">439</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00440"></a>00440 {
2687 <a name="l00441"></a>00441 WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str());
2688 <a name="l00442"></a>00442 }
2694 <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>
2695 <table class="mdTable" cellpadding="2" cellspacing="0">
2698 <table cellpadding="0" cellspacing="0" border="0">
2700 <td class="md" nowrap valign="top">void Server::SendMode </td>
2701 <td class="md" valign="top">( </td>
2702 <td class="md" nowrap valign="top">char ** </td>
2703 <td class="mdname" nowrap> <em>parameters</em>, </td>
2706 <td class="md" nowrap align="right"></td>
2707 <td class="md"></td>
2708 <td class="md" nowrap>int </td>
2709 <td class="mdname" nowrap> <em>pcnt</em>, </td>
2712 <td class="md" nowrap align="right"></td>
2713 <td class="md"></td>
2714 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
2715 <td class="mdname" nowrap> <em>user</em></td>
2718 <td class="md"></td>
2719 <td class="md">) </td>
2720 <td class="md" colspan="2"><code> [virtual]</code></td>
2726 <table cellspacing="5" cellpadding="0" border="0">
2736 you must format the parameters array with the target, modes and parameters for those modes.<p>
2739 modes[0] = ChannelName;<p>
2741 modes[2] = user->nick;<p>
2742 Srv->SendMode(modes,3,user);<p>
2743 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!
2745 Definition at line <a class="el" href="modules_8cpp-source.html#l00424">424</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2747 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="l00425"></a>00425 {
2748 <a name="l00426"></a>00426 <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);
2749 <a name="l00427"></a>00427 }
2755 <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>
2756 <table class="mdTable" cellpadding="2" cellspacing="0">
2759 <table cellpadding="0" cellspacing="0" border="0">
2761 <td class="md" nowrap valign="top">void Server::SendOpers </td>
2762 <td class="md" valign="top">( </td>
2763 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2764 <td class="mdname1" valign="top" nowrap> <em>s</em> </td>
2765 <td class="md" valign="top"> ) </td>
2766 <td class="md" nowrap><code> [virtual]</code></td>
2772 <table cellspacing="5" cellpadding="0" border="0">
2780 Sends text to all opers.
2782 This method sends a server notice to all opers with the usermode +s.
2784 Definition at line <a class="el" href="modules_8cpp-source.html#l00349">349</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00350"></a>00350 {
2785 <a name="l00351"></a>00351 WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str());
2786 <a name="l00352"></a>00352 }
2792 <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>
2793 <table class="mdTable" cellpadding="2" cellspacing="0">
2796 <table cellpadding="0" cellspacing="0" border="0">
2798 <td class="md" nowrap valign="top">void Server::SendServ </td>
2799 <td class="md" valign="top">( </td>
2800 <td class="md" nowrap valign="top">int </td>
2801 <td class="mdname" nowrap> <em>Socket</em>, </td>
2804 <td class="md" nowrap align="right"></td>
2805 <td class="md"></td>
2806 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2807 <td class="mdname" nowrap> <em>s</em></td>
2810 <td class="md"></td>
2811 <td class="md">) </td>
2812 <td class="md" colspan="2"><code> [virtual]</code></td>
2818 <table cellspacing="5" cellpadding="0" border="0">
2826 Sends text from the server to a socket.
2828 This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)
2830 Definition at line <a class="el" href="modules_8cpp-source.html#l00434">434</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00435"></a>00435 {
2831 <a name="l00436"></a>00436 WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
2832 <a name="l00437"></a>00437 }
2838 <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>
2839 <table class="mdTable" cellpadding="2" cellspacing="0">
2842 <table cellpadding="0" cellspacing="0" border="0">
2844 <td class="md" nowrap valign="top">void Server::SendTo </td>
2845 <td class="md" valign="top">( </td>
2846 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
2847 <td class="mdname" nowrap> <em>Source</em>, </td>
2850 <td class="md" nowrap align="right"></td>
2851 <td class="md"></td>
2852 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
2853 <td class="mdname" nowrap> <em>Dest</em>, </td>
2856 <td class="md" nowrap align="right"></td>
2857 <td class="md"></td>
2858 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2859 <td class="mdname" nowrap> <em>s</em></td>
2862 <td class="md"></td>
2863 <td class="md">) </td>
2864 <td class="md" colspan="2"><code> [virtual]</code></td>
2870 <table cellspacing="5" cellpadding="0" border="0">
2878 Sends text from a user to another user.
2880 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>
2882 The format will become:<p>
2883 :localserver TEXT<p>
2884 Which is useful for numerics and server notices to single users, etc.
2886 Definition at line <a class="el" href="modules_8cpp-source.html#l00444">444</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2888 References <a class="el" href="connection_8h-source.html#l00042">connection::fd</a>.<div class="fragment"><pre class="fragment"><a name="l00445"></a>00445 {
2889 <a name="l00446"></a>00446 <span class="keywordflow">if</span> (!Source)
2890 <a name="l00447"></a>00447 {
2891 <a name="l00448"></a>00448 <span class="comment">// if source is NULL, then the message originates from the local server</span>
2892 <a name="l00449"></a>00449 Write(Dest-><a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">":%s %s"</span>,this->GetServerName().c_str(),s.c_str());
2893 <a name="l00450"></a>00450 }
2894 <a name="l00451"></a>00451 <span class="keywordflow">else</span>
2895 <a name="l00452"></a>00452 {
2896 <a name="l00453"></a>00453 <span class="comment">// otherwise it comes from the user specified</span>
2897 <a name="l00454"></a>00454 WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str());
2898 <a name="l00455"></a>00455 }
2899 <a name="l00456"></a>00456 }
2905 <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>
2906 <table class="mdTable" cellpadding="2" cellspacing="0">
2909 <table cellpadding="0" cellspacing="0" border="0">
2911 <td class="md" nowrap valign="top">void Server::SendToModeMask </td>
2912 <td class="md" valign="top">( </td>
2913 <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2914 <td class="mdname" nowrap> <em>modes</em>, </td>
2917 <td class="md" nowrap align="right"></td>
2918 <td class="md"></td>
2919 <td class="md" nowrap>int </td>
2920 <td class="mdname" nowrap> <em>flags</em>, </td>
2923 <td class="md" nowrap align="right"></td>
2924 <td class="md"></td>
2925 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2926 <td class="mdname" nowrap> <em>text</em></td>
2929 <td class="md"></td>
2930 <td class="md">) </td>
2931 <td class="md" colspan="2"><code> [virtual]</code></td>
2937 <table cellspacing="5" cellpadding="0" border="0">
2945 Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter.
2947 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>
2948 Serv->SendToModeMask("xi", WM_OR, "m00");<p>
2949 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.
2951 Definition at line <a class="el" href="modules_8cpp-source.html#l00362">362</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00363"></a>00363 {
2952 <a name="l00364"></a>00364 WriteMode(modes.c_str(),flags,<span class="stringliteral">"%s"</span>,text.c_str());
2953 <a name="l00365"></a>00365 }
2959 <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>
2960 <table class="mdTable" cellpadding="2" cellspacing="0">
2963 <table cellpadding="0" cellspacing="0" border="0">
2965 <td class="md" nowrap valign="top">void Server::SendWallops </td>
2966 <td class="md" valign="top">( </td>
2967 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
2968 <td class="mdname" nowrap> <em>User</em>, </td>
2971 <td class="md" nowrap align="right"></td>
2972 <td class="md"></td>
2973 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
2974 <td class="mdname" nowrap> <em>text</em></td>
2977 <td class="md"></td>
2978 <td class="md">) </td>
2979 <td class="md" colspan="2"><code> [virtual]</code></td>
2985 <table cellspacing="5" cellpadding="0" border="0">
2993 Sends a WALLOPS message.
2995 This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.
2997 Definition at line <a class="el" href="modules_8cpp-source.html#l00492">492</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00493"></a>00493 {
2998 <a name="l00494"></a>00494 WriteWallOps(User,<span class="keyword">false</span>,<span class="stringliteral">"%s"</span>,text.c_str());
2999 <a name="l00495"></a>00495 }
3005 <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>
3006 <table class="mdTable" cellpadding="2" cellspacing="0">
3009 <table cellpadding="0" cellspacing="0" border="0">
3011 <td class="md" nowrap valign="top">bool Server::UserToPseudo </td>
3012 <td class="md" valign="top">( </td>
3013 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
3014 <td class="mdname" nowrap> <em>user</em>, </td>
3017 <td class="md" nowrap align="right"></td>
3018 <td class="md"></td>
3019 <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a> </td>
3020 <td class="mdname" nowrap> <em>message</em></td>
3023 <td class="md"></td>
3024 <td class="md">) </td>
3025 <td class="md" colspan="2"><code> [virtual]</code></td>
3031 <table cellspacing="5" cellpadding="0" border="0">
3039 Remove a user's connection to the irc server, but leave their client in existence in the user hash.
3041 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.
3043 Definition at line <a class="el" href="modules_8cpp-source.html#l00601">601</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
3045 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>, and <a class="el" href="users_8h-source.html#l00129">userrec::ident</a>.<div class="fragment"><pre class="fragment"><a name="l00602"></a>00602 {
3046 <a name="l00603"></a>00603 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> old_fd = user-><a class="code" href="classconnection.html#fd">fd</a>;
3047 <a name="l00604"></a>00604 user-><a class="code" href="classconnection.html#fd">fd</a> = <a class="code" href="modules_8h.html#FD_5FMAGIC_5FNUMBER">FD_MAGIC_NUMBER</a>;
3048 <a name="l00605"></a>00605 user-><a class="code" href="classuserrec.html#ClearBuffer_28_29">ClearBuffer</a>();
3049 <a name="l00606"></a>00606 Write(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());
3050 <a name="l00607"></a>00607 <a class="code" href="modules_8cpp.html#SE">SE</a>-><a class="code" href="classSocketEngine.html#DelFd_28int_20fd_29">DelFd</a>(old_fd);
3051 <a name="l00608"></a>00608 shutdown(old_fd,2);
3052 <a name="l00609"></a>00609 close(old_fd);
3053 <a name="l00610"></a>00610 <span class="keywordflow">return</span> <span class="keyword">true</span>;
3054 <a name="l00611"></a>00611 }
3060 <hr>The documentation for this class was generated from the following files:<ul>
3061 <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>
3062 <hr size="1"><address style="align: right;"><small>Generated on Wed Dec 14 15:55:50 2005 for InspIRCd by
3063 <a href="http://www.doxygen.org/index.html">
3064 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4-20050815 </small></address>