]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classServer.html
Removed depreciated docs
[user/henk/code/inspircd.git] / docs / module-doc / classServer.html
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">
5 </head><body>
6 <!-- Generated by Doxygen 1.4.4-20050815 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;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>
10 <p>
11 <code>#include &lt;<a class="el" href="modules_8h-source.html">modules.h</a>&gt;</code>
12 <p>
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="">
16 </map>
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="">
20 </map>
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">
22 <tr><td></td></tr>
23 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
24 <tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#Server_28_29">Server</a> ()</td></tr>
25
26 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#_7EServer_28_29">~Server</a> ()</td></tr>
28
29 <tr><td class="mdescLeft">&nbsp;</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> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#GetConfig_28_29">GetConfig</a> ()</td></tr>
31
32 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
34
35 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
37
38 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
40
41 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
43
44 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
46
47 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
49
50 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
52
53 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
55
56 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
58
59 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
61
62 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
64
65 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
67
68 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
70
71 <tr><td class="mdescLeft">&nbsp;</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> *&nbsp;</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>
73
74 <tr><td class="mdescLeft">&nbsp;</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> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#FindDescriptor_28int_20socket_29">FindDescriptor</a> (int socket)</td></tr>
76
77 <tr><td class="mdescLeft">&nbsp;</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> *&nbsp;</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>
79
80 <tr><td class="mdescLeft">&nbsp;</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>&nbsp;</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>
82
83 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
85
86 <tr><td class="mdescLeft">&nbsp;</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>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#GetServerName_28_29">GetServerName</a> ()</td></tr>
88
89 <tr><td class="mdescLeft">&nbsp;</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>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#GetNetworkName_28_29">GetNetworkName</a> ()</td></tr>
91
92 <tr><td class="mdescLeft">&nbsp;</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>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#GetServerDescription_28_29">GetServerDescription</a> ()</td></tr>
94
95 <tr><td class="mdescLeft">&nbsp;</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>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#GetAdmin_28_29">GetAdmin</a> ()</td></tr>
97
98 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
100
101 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#AddExtendedListMode_28char_20modechar_29">AddExtendedListMode</a> (char modechar)</td></tr>
103
104 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
106
107 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
109
110 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
112
113 <tr><td class="mdescLeft">&nbsp;</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> *&nbsp;</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>
115
116 <tr><td class="mdescLeft">&nbsp;</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> *&nbsp;</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>
118
119 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
121
122 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
124
125 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
127
128 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
130
131 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
133
134 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</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>
135
136 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
138
139 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
141
142 <tr><td class="mdescLeft">&nbsp;</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>&nbsp;</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>
144
145 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
147
148 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
150
151 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
153
154 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
156
157 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
159
160 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
162
163 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
165
166 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
168
169 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
171
172 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
174
175 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
177
178 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
180
181 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
183
184 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
186
187 <tr><td class="mdescLeft">&nbsp;</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> *&nbsp;</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>
189
190 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
192
193 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</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>
195
196 <tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#RehashServer_28_29">RehashServer</a> ()</td></tr>
198
199 </table>
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. 
202 <p>
203 All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks.
204 <p>
205
206 <p>
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 &amp; 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">
210   <tr>
211     <td class="mdRow">
212       <table cellpadding="0" cellspacing="0" border="0">
213         <tr>
214           <td class="md" nowrap valign="top">Server::Server           </td>
215           <td class="md" valign="top">(&nbsp;</td>
216           <td class="mdname1" valign="top" nowrap>          </td>
217           <td class="md" valign="top">&nbsp;)&nbsp;</td>
218           <td class="md" nowrap></td>
219         </tr>
220       </table>
221     </td>
222   </tr>
223 </table>
224 <table cellspacing="5" cellpadding="0" border="0">
225   <tr>
226     <td>
227       &nbsp;
228     </td>
229     <td>
230
231 <p>
232 Default constructor. 
233 <p>
234 Creates a Server object.
235 <p>
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 }
238 </pre></div>
239 <p>
240     </td>
241   </tr>
242 </table>
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">
245   <tr>
246     <td class="mdRow">
247       <table cellpadding="0" cellspacing="0" border="0">
248         <tr>
249           <td class="md" nowrap valign="top">Server::~Server           </td>
250           <td class="md" valign="top">(&nbsp;</td>
251           <td class="mdname1" valign="top" nowrap>          </td>
252           <td class="md" valign="top">&nbsp;)&nbsp;</td>
253           <td class="md" nowrap><code> [virtual]</code></td>
254         </tr>
255       </table>
256     </td>
257   </tr>
258 </table>
259 <table cellspacing="5" cellpadding="0" border="0">
260   <tr>
261     <td>
262       &nbsp;
263     </td>
264     <td>
265
266 <p>
267 Default destructor. 
268 <p>
269 Destroys a Server object.
270 <p>
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 }
273 </pre></div>
274 <p>
275     </td>
276   </tr>
277 </table>
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">
281   <tr>
282     <td class="mdRow">
283       <table cellpadding="0" cellspacing="0" border="0">
284         <tr>
285           <td class="md" nowrap valign="top">void Server::AddCommand           </td>
286           <td class="md" valign="top">(&nbsp;</td>
287           <td class="md" nowrap valign="top">char *&nbsp;</td>
288           <td class="mdname" nowrap> <em>cmd</em>, </td>
289         </tr>
290         <tr>
291           <td class="md" nowrap align="right"></td>
292           <td class="md"></td>
293           <td class="md" nowrap>handlerfunc&nbsp;</td>
294           <td class="mdname" nowrap> <em>f</em>, </td>
295         </tr>
296         <tr>
297           <td class="md" nowrap align="right"></td>
298           <td class="md"></td>
299           <td class="md" nowrap>char&nbsp;</td>
300           <td class="mdname" nowrap> <em>flags</em>, </td>
301         </tr>
302         <tr>
303           <td class="md" nowrap align="right"></td>
304           <td class="md"></td>
305           <td class="md" nowrap>int&nbsp;</td>
306           <td class="mdname" nowrap> <em>minparams</em>, </td>
307         </tr>
308         <tr>
309           <td class="md" nowrap align="right"></td>
310           <td class="md"></td>
311           <td class="md" nowrap>char *&nbsp;</td>
312           <td class="mdname" nowrap> <em>source</em></td>
313         </tr>
314         <tr>
315           <td class="md"></td>
316           <td class="md">)&nbsp;</td>
317           <td class="md" colspan="2"><code> [virtual]</code></td>
318         </tr>
319       </table>
320     </td>
321   </tr>
322 </table>
323 <table cellspacing="5" cellpadding="0" border="0">
324   <tr>
325     <td>
326       &nbsp;
327     </td>
328     <td>
329
330 <p>
331 Adds a command to the command table. 
332 <p>
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.
336 <p>
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>.
338 <p>
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 }
342 </pre></div>
343 <p>
344     </td>
345   </tr>
346 </table>
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">
349   <tr>
350     <td class="mdRow">
351       <table cellpadding="0" cellspacing="0" border="0">
352         <tr>
353           <td class="md" nowrap valign="top">void Server::AddELine           </td>
354           <td class="md" valign="top">(&nbsp;</td>
355           <td class="md" nowrap valign="top">long&nbsp;</td>
356           <td class="mdname" nowrap> <em>duration</em>, </td>
357         </tr>
358         <tr>
359           <td class="md" nowrap align="right"></td>
360           <td class="md"></td>
361           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
362           <td class="mdname" nowrap> <em>source</em>, </td>
363         </tr>
364         <tr>
365           <td class="md" nowrap align="right"></td>
366           <td class="md"></td>
367           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
368           <td class="mdname" nowrap> <em>reason</em>, </td>
369         </tr>
370         <tr>
371           <td class="md" nowrap align="right"></td>
372           <td class="md"></td>
373           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
374           <td class="mdname" nowrap> <em>hostmask</em></td>
375         </tr>
376         <tr>
377           <td class="md"></td>
378           <td class="md">)&nbsp;</td>
379           <td class="md" colspan="2"><code> [virtual]</code></td>
380         </tr>
381       </table>
382     </td>
383   </tr>
384 </table>
385 <table cellspacing="5" cellpadding="0" border="0">
386   <tr>
387     <td>
388       &nbsp;
389     </td>
390     <td>
391
392 <p>
393 Adds a E-line The E-line is enforced as soon as it is added. 
394 <p>
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.
396 <p>
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>.
398 <p>
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 }
402 </pre></div>
403 <p>
404     </td>
405   </tr>
406 </table>
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">
409   <tr>
410     <td class="mdRow">
411       <table cellpadding="0" cellspacing="0" border="0">
412         <tr>
413           <td class="md" nowrap valign="top">bool Server::AddExtendedListMode           </td>
414           <td class="md" valign="top">(&nbsp;</td>
415           <td class="md" nowrap valign="top">char&nbsp;</td>
416           <td class="mdname1" valign="top" nowrap> <em>modechar</em>          </td>
417           <td class="md" valign="top">&nbsp;)&nbsp;</td>
418           <td class="md" nowrap><code> [virtual]</code></td>
419         </tr>
420       </table>
421     </td>
422   </tr>
423 </table>
424 <table cellspacing="5" cellpadding="0" border="0">
425   <tr>
426     <td>
427       &nbsp;
428     </td>
429     <td>
430
431 <p>
432 Adds an extended mode letter which is parsed by a module and handled in a list fashion. 
433 <p>
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.
440 <p>
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>.
442 <p>
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 }
449 </pre></div>
450 <p>
451     </td>
452   </tr>
453 </table>
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">
456   <tr>
457     <td class="mdRow">
458       <table cellpadding="0" cellspacing="0" border="0">
459         <tr>
460           <td class="md" nowrap valign="top">bool Server::AddExtendedMode           </td>
461           <td class="md" valign="top">(&nbsp;</td>
462           <td class="md" nowrap valign="top">char&nbsp;</td>
463           <td class="mdname" nowrap> <em>modechar</em>, </td>
464         </tr>
465         <tr>
466           <td class="md" nowrap align="right"></td>
467           <td class="md"></td>
468           <td class="md" nowrap>int&nbsp;</td>
469           <td class="mdname" nowrap> <em>type</em>, </td>
470         </tr>
471         <tr>
472           <td class="md" nowrap align="right"></td>
473           <td class="md"></td>
474           <td class="md" nowrap>bool&nbsp;</td>
475           <td class="mdname" nowrap> <em>requires_oper</em>, </td>
476         </tr>
477         <tr>
478           <td class="md" nowrap align="right"></td>
479           <td class="md"></td>
480           <td class="md" nowrap>int&nbsp;</td>
481           <td class="mdname" nowrap> <em>params_when_on</em>, </td>
482         </tr>
483         <tr>
484           <td class="md" nowrap align="right"></td>
485           <td class="md"></td>
486           <td class="md" nowrap>int&nbsp;</td>
487           <td class="mdname" nowrap> <em>params_when_off</em></td>
488         </tr>
489         <tr>
490           <td class="md"></td>
491           <td class="md">)&nbsp;</td>
492           <td class="md" colspan="2"><code> [virtual]</code></td>
493         </tr>
494       </table>
495     </td>
496   </tr>
497 </table>
498 <table cellspacing="5" cellpadding="0" border="0">
499   <tr>
500     <td>
501       &nbsp;
502     </td>
503     <td>
504
505 <p>
506 Adds an extended mode letter which is parsed by a module. 
507 <p>
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.
509 <p>
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>.
511 <p>
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 &gt;= <span class="charliteral">'A'</span>) &amp;&amp; (modechar &lt;= <span class="charliteral">'Z'</span>)) || ((modechar &gt;= <span class="charliteral">'a'</span>) &amp;&amp; (modechar &lt;= <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&gt;0) || (params_when_off&gt;0)) &amp;&amp; (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&gt;1) || (params_when_off&gt;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 }
538 </pre></div>
539 <p>
540     </td>
541   </tr>
542 </table>
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">
545   <tr>
546     <td class="mdRow">
547       <table cellpadding="0" cellspacing="0" border="0">
548         <tr>
549           <td class="md" nowrap valign="top">void Server::AddGLine           </td>
550           <td class="md" valign="top">(&nbsp;</td>
551           <td class="md" nowrap valign="top">long&nbsp;</td>
552           <td class="mdname" nowrap> <em>duration</em>, </td>
553         </tr>
554         <tr>
555           <td class="md" nowrap align="right"></td>
556           <td class="md"></td>
557           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
558           <td class="mdname" nowrap> <em>source</em>, </td>
559         </tr>
560         <tr>
561           <td class="md" nowrap align="right"></td>
562           <td class="md"></td>
563           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
564           <td class="mdname" nowrap> <em>reason</em>, </td>
565         </tr>
566         <tr>
567           <td class="md" nowrap align="right"></td>
568           <td class="md"></td>
569           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
570           <td class="mdname" nowrap> <em>hostmask</em></td>
571         </tr>
572         <tr>
573           <td class="md"></td>
574           <td class="md">)&nbsp;</td>
575           <td class="md" colspan="2"><code> [virtual]</code></td>
576         </tr>
577       </table>
578     </td>
579   </tr>
580 </table>
581 <table cellspacing="5" cellpadding="0" border="0">
582   <tr>
583     <td>
584       &nbsp;
585     </td>
586     <td>
587
588 <p>
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. 
590 <p>
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.
592 <p>
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>.
594 <p>
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 }
598 </pre></div>
599 <p>
600     </td>
601   </tr>
602 </table>
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">
605   <tr>
606     <td class="mdRow">
607       <table cellpadding="0" cellspacing="0" border="0">
608         <tr>
609           <td class="md" nowrap valign="top">void Server::AddKLine           </td>
610           <td class="md" valign="top">(&nbsp;</td>
611           <td class="md" nowrap valign="top">long&nbsp;</td>
612           <td class="mdname" nowrap> <em>duration</em>, </td>
613         </tr>
614         <tr>
615           <td class="md" nowrap align="right"></td>
616           <td class="md"></td>
617           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
618           <td class="mdname" nowrap> <em>source</em>, </td>
619         </tr>
620         <tr>
621           <td class="md" nowrap align="right"></td>
622           <td class="md"></td>
623           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
624           <td class="mdname" nowrap> <em>reason</em>, </td>
625         </tr>
626         <tr>
627           <td class="md" nowrap align="right"></td>
628           <td class="md"></td>
629           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
630           <td class="mdname" nowrap> <em>hostmask</em></td>
631         </tr>
632         <tr>
633           <td class="md"></td>
634           <td class="md">)&nbsp;</td>
635           <td class="md" colspan="2"><code> [virtual]</code></td>
636         </tr>
637       </table>
638     </td>
639   </tr>
640 </table>
641 <table cellspacing="5" cellpadding="0" border="0">
642   <tr>
643     <td>
644       &nbsp;
645     </td>
646     <td>
647
648 <p>
649 Adds a K-line The K-line is enforced as soon as it is added. 
650 <p>
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.
652 <p>
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>.
654 <p>
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 }
658 </pre></div>
659 <p>
660     </td>
661   </tr>
662 </table>
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">
665   <tr>
666     <td class="mdRow">
667       <table cellpadding="0" cellspacing="0" border="0">
668         <tr>
669           <td class="md" nowrap valign="top">void Server::AddQLine           </td>
670           <td class="md" valign="top">(&nbsp;</td>
671           <td class="md" nowrap valign="top">long&nbsp;</td>
672           <td class="mdname" nowrap> <em>duration</em>, </td>
673         </tr>
674         <tr>
675           <td class="md" nowrap align="right"></td>
676           <td class="md"></td>
677           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
678           <td class="mdname" nowrap> <em>source</em>, </td>
679         </tr>
680         <tr>
681           <td class="md" nowrap align="right"></td>
682           <td class="md"></td>
683           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
684           <td class="mdname" nowrap> <em>reason</em>, </td>
685         </tr>
686         <tr>
687           <td class="md" nowrap align="right"></td>
688           <td class="md"></td>
689           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
690           <td class="mdname" nowrap> <em>nickname</em></td>
691         </tr>
692         <tr>
693           <td class="md"></td>
694           <td class="md">)&nbsp;</td>
695           <td class="md" colspan="2"><code> [virtual]</code></td>
696         </tr>
697       </table>
698     </td>
699   </tr>
700 </table>
701 <table cellspacing="5" cellpadding="0" border="0">
702   <tr>
703     <td>
704       &nbsp;
705     </td>
706     <td>
707
708 <p>
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. 
710 <p>
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.
712 <p>
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>.
714 <p>
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 }
718 </pre></div>
719 <p>
720     </td>
721   </tr>
722 </table>
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">
725   <tr>
726     <td class="mdRow">
727       <table cellpadding="0" cellspacing="0" border="0">
728         <tr>
729           <td class="md" nowrap valign="top">void Server::AddSocket           </td>
730           <td class="md" valign="top">(&nbsp;</td>
731           <td class="md" nowrap valign="top"><a class="el" href="classInspSocket.html">InspSocket</a> *&nbsp;</td>
732           <td class="mdname1" valign="top" nowrap> <em>sock</em>          </td>
733           <td class="md" valign="top">&nbsp;)&nbsp;</td>
734           <td class="md" nowrap><code> [virtual]</code></td>
735         </tr>
736       </table>
737     </td>
738   </tr>
739 </table>
740 <table cellspacing="5" cellpadding="0" border="0">
741   <tr>
742     <td>
743       &nbsp;
744     </td>
745     <td>
746
747 <p>
748 Adds a class derived from <a class="el" href="classInspSocket.html">InspSocket</a> to the server's socket engine. 
749 <p>
750
751 <p>
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>.
753 <p>
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 }
757 </pre></div>
758 <p>
759     </td>
760   </tr>
761 </table>
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">
764   <tr>
765     <td class="mdRow">
766       <table cellpadding="0" cellspacing="0" border="0">
767         <tr>
768           <td class="md" nowrap valign="top">void Server::AddZLine           </td>
769           <td class="md" valign="top">(&nbsp;</td>
770           <td class="md" nowrap valign="top">long&nbsp;</td>
771           <td class="mdname" nowrap> <em>duration</em>, </td>
772         </tr>
773         <tr>
774           <td class="md" nowrap align="right"></td>
775           <td class="md"></td>
776           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
777           <td class="mdname" nowrap> <em>source</em>, </td>
778         </tr>
779         <tr>
780           <td class="md" nowrap align="right"></td>
781           <td class="md"></td>
782           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
783           <td class="mdname" nowrap> <em>reason</em>, </td>
784         </tr>
785         <tr>
786           <td class="md" nowrap align="right"></td>
787           <td class="md"></td>
788           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
789           <td class="mdname" nowrap> <em>ipaddr</em></td>
790         </tr>
791         <tr>
792           <td class="md"></td>
793           <td class="md">)&nbsp;</td>
794           <td class="md" colspan="2"><code> [virtual]</code></td>
795         </tr>
796       </table>
797     </td>
798   </tr>
799 </table>
800 <table cellspacing="5" cellpadding="0" border="0">
801   <tr>
802     <td>
803       &nbsp;
804     </td>
805     <td>
806
807 <p>
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. 
809 <p>
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.
811 <p>
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>.
813 <p>
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 }
817 </pre></div>
818 <p>
819     </td>
820   </tr>
821 </table>
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">
824   <tr>
825     <td class="mdRow">
826       <table cellpadding="0" cellspacing="0" border="0">
827         <tr>
828           <td class="md" nowrap valign="top">long Server::CalcDuration           </td>
829           <td class="md" valign="top">(&nbsp;</td>
830           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
831           <td class="mdname1" valign="top" nowrap> <em>duration</em>          </td>
832           <td class="md" valign="top">&nbsp;)&nbsp;</td>
833           <td class="md" nowrap><code> [virtual]</code></td>
834         </tr>
835       </table>
836     </td>
837   </tr>
838 </table>
839 <table cellspacing="5" cellpadding="0" border="0">
840   <tr>
841     <td>
842       &nbsp;
843     </td>
844     <td>
845
846 <p>
847 Calculates a duration This method will take a string containing a formatted duration (e.g. 
848 <p>
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.
850 <p>
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>.
852 <p>
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 }
856 </pre></div>
857 <p>
858     </td>
859   </tr>
860 </table>
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">
863   <tr>
864     <td class="mdRow">
865       <table cellpadding="0" cellspacing="0" border="0">
866         <tr>
867           <td class="md" nowrap valign="top">void Server::CallCommandHandler           </td>
868           <td class="md" valign="top">(&nbsp;</td>
869           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
870           <td class="mdname" nowrap> <em>commandname</em>, </td>
871         </tr>
872         <tr>
873           <td class="md" nowrap align="right"></td>
874           <td class="md"></td>
875           <td class="md" nowrap>char **&nbsp;</td>
876           <td class="mdname" nowrap> <em>parameters</em>, </td>
877         </tr>
878         <tr>
879           <td class="md" nowrap align="right"></td>
880           <td class="md"></td>
881           <td class="md" nowrap>int&nbsp;</td>
882           <td class="mdname" nowrap> <em>pcnt</em>, </td>
883         </tr>
884         <tr>
885           <td class="md" nowrap align="right"></td>
886           <td class="md"></td>
887           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
888           <td class="mdname" nowrap> <em>user</em></td>
889         </tr>
890         <tr>
891           <td class="md"></td>
892           <td class="md">)&nbsp;</td>
893           <td class="md" colspan="2"><code> [virtual]</code></td>
894         </tr>
895       </table>
896     </td>
897   </tr>
898 </table>
899 <table cellspacing="5" cellpadding="0" border="0">
900   <tr>
901     <td>
902       &nbsp;
903     </td>
904     <td>
905
906 <p>
907 Calls the handler for a command, either implemented by the core or by another module. 
908 <p>
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.
911 <p>
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 }
915 </pre></div>
916 <p>
917     </td>
918   </tr>
919 </table>
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">
922   <tr>
923     <td class="mdRow">
924       <table cellpadding="0" cellspacing="0" border="0">
925         <tr>
926           <td class="md" nowrap valign="top">void Server::ChangeGECOS           </td>
927           <td class="md" valign="top">(&nbsp;</td>
928           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
929           <td class="mdname" nowrap> <em>user</em>, </td>
930         </tr>
931         <tr>
932           <td class="md" nowrap align="right"></td>
933           <td class="md"></td>
934           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
935           <td class="mdname" nowrap> <em>gecos</em></td>
936         </tr>
937         <tr>
938           <td class="md"></td>
939           <td class="md">)&nbsp;</td>
940           <td class="md" colspan="2"><code> [virtual]</code></td>
941         </tr>
942       </table>
943     </td>
944   </tr>
945 </table>
946 <table cellspacing="5" cellpadding="0" border="0">
947   <tr>
948     <td>
949       &nbsp;
950     </td>
951     <td>
952
953 <p>
954 Change GECOS (fullname) of a user. 
955 <p>
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.
957 <p>
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>.
959 <p>
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 }
963 </pre></div>
964 <p>
965     </td>
966   </tr>
967 </table>
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">
970   <tr>
971     <td class="mdRow">
972       <table cellpadding="0" cellspacing="0" border="0">
973         <tr>
974           <td class="md" nowrap valign="top">void Server::ChangeHost           </td>
975           <td class="md" valign="top">(&nbsp;</td>
976           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
977           <td class="mdname" nowrap> <em>user</em>, </td>
978         </tr>
979         <tr>
980           <td class="md" nowrap align="right"></td>
981           <td class="md"></td>
982           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
983           <td class="mdname" nowrap> <em>host</em></td>
984         </tr>
985         <tr>
986           <td class="md"></td>
987           <td class="md">)&nbsp;</td>
988           <td class="md" colspan="2"><code> [virtual]</code></td>
989         </tr>
990       </table>
991     </td>
992   </tr>
993 </table>
994 <table cellspacing="5" cellpadding="0" border="0">
995   <tr>
996     <td>
997       &nbsp;
998     </td>
999     <td>
1000
1001 <p>
1002 Change displayed hostname of a user. 
1003 <p>
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.
1005 <p>
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>.
1007 <p>
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 }
1011 </pre></div>
1012 <p>
1013     </td>
1014   </tr>
1015 </table>
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">
1018   <tr>
1019     <td class="mdRow">
1020       <table cellpadding="0" cellspacing="0" border="0">
1021         <tr>
1022           <td class="md" nowrap valign="top">void Server::ChangeUserNick           </td>
1023           <td class="md" valign="top">(&nbsp;</td>
1024           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1025           <td class="mdname" nowrap> <em>user</em>, </td>
1026         </tr>
1027         <tr>
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>&nbsp;</td>
1031           <td class="mdname" nowrap> <em>nickname</em></td>
1032         </tr>
1033         <tr>
1034           <td class="md"></td>
1035           <td class="md">)&nbsp;</td>
1036           <td class="md" colspan="2"><code> [virtual]</code></td>
1037         </tr>
1038       </table>
1039     </td>
1040   </tr>
1041 </table>
1042 <table cellspacing="5" cellpadding="0" border="0">
1043   <tr>
1044     <td>
1045       &nbsp;
1046     </td>
1047     <td>
1048
1049 <p>
1050 Forces a user nickchange. 
1051 <p>
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.
1053 <p>
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 }
1057 </pre></div>
1058 <p>
1059     </td>
1060   </tr>
1061 </table>
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">
1064   <tr>
1065     <td class="mdRow">
1066       <table cellpadding="0" cellspacing="0" border="0">
1067         <tr>
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">(&nbsp;</td>
1070           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1071           <td class="mdname" nowrap> <em>User</em>, </td>
1072         </tr>
1073         <tr>
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> *&nbsp;</td>
1077           <td class="mdname" nowrap> <em>Chan</em></td>
1078         </tr>
1079         <tr>
1080           <td class="md"></td>
1081           <td class="md">)&nbsp;</td>
1082           <td class="md" colspan="2"><code> [virtual]</code></td>
1083         </tr>
1084       </table>
1085     </td>
1086   </tr>
1087 </table>
1088 <table cellspacing="5" cellpadding="0" border="0">
1089   <tr>
1090     <td>
1091       &nbsp;
1092     </td>
1093     <td>
1094
1095 <p>
1096 Attempts to look up a user's privilages on a channel. 
1097 <p>
1098 This function will return a string containing either @, %, +, or an empty string, representing the user's privilages upon the channel you specify.
1099 <p>
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>.
1101 <p>
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 }
1105 </pre></div>
1106 <p>
1107     </td>
1108   </tr>
1109 </table>
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">
1112   <tr>
1113     <td class="mdRow">
1114       <table cellpadding="0" cellspacing="0" border="0">
1115         <tr>
1116           <td class="md" nowrap valign="top">bool Server::CommonChannels           </td>
1117           <td class="md" valign="top">(&nbsp;</td>
1118           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1119           <td class="mdname" nowrap> <em>u1</em>, </td>
1120         </tr>
1121         <tr>
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> *&nbsp;</td>
1125           <td class="mdname" nowrap> <em>u2</em></td>
1126         </tr>
1127         <tr>
1128           <td class="md"></td>
1129           <td class="md">)&nbsp;</td>
1130           <td class="md" colspan="2"><code> [virtual]</code></td>
1131         </tr>
1132       </table>
1133     </td>
1134   </tr>
1135 </table>
1136 <table cellspacing="5" cellpadding="0" border="0">
1137   <tr>
1138     <td>
1139       &nbsp;
1140     </td>
1141     <td>
1142
1143 <p>
1144 Returns true if two users share a common channel. 
1145 <p>
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.
1147 <p>
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>.
1149 <p>
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 }
1153 </pre></div>
1154 <p>
1155     </td>
1156   </tr>
1157 </table>
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">
1160   <tr>
1161     <td class="mdRow">
1162       <table cellpadding="0" cellspacing="0" border="0">
1163         <tr>
1164           <td class="md" nowrap valign="top">int Server::CountUsers           </td>
1165           <td class="md" valign="top">(&nbsp;</td>
1166           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1167           <td class="mdname1" valign="top" nowrap> <em>c</em>          </td>
1168           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1169           <td class="md" nowrap><code> [virtual]</code></td>
1170         </tr>
1171       </table>
1172     </td>
1173   </tr>
1174 </table>
1175 <table cellspacing="5" cellpadding="0" border="0">
1176   <tr>
1177     <td>
1178       &nbsp;
1179     </td>
1180     <td>
1181
1182 <p>
1183 Returns a count of the number of users on a channel. 
1184 <p>
1185 This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel.
1186 <p>
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 }
1190 </pre></div>
1191 <p>
1192     </td>
1193   </tr>
1194 </table>
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">
1197   <tr>
1198     <td class="mdRow">
1199       <table cellpadding="0" cellspacing="0" border="0">
1200         <tr>
1201           <td class="md" nowrap valign="top">bool Server::DelELine           </td>
1202           <td class="md" valign="top">(&nbsp;</td>
1203           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1204           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1205           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1206           <td class="md" nowrap><code> [virtual]</code></td>
1207         </tr>
1208       </table>
1209     </td>
1210   </tr>
1211 </table>
1212 <table cellspacing="5" cellpadding="0" border="0">
1213   <tr>
1214     <td>
1215       &nbsp;
1216     </td>
1217     <td>
1218
1219 <p>
1220 Deletes a local E-Line. 
1221 <p>
1222
1223 <p>
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>.
1225 <p>
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 }
1229 </pre></div>
1230 <p>
1231     </td>
1232   </tr>
1233 </table>
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">
1236   <tr>
1237     <td class="mdRow">
1238       <table cellpadding="0" cellspacing="0" border="0">
1239         <tr>
1240           <td class="md" nowrap valign="top">bool Server::DelGLine           </td>
1241           <td class="md" valign="top">(&nbsp;</td>
1242           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1243           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1244           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1245           <td class="md" nowrap><code> [virtual]</code></td>
1246         </tr>
1247       </table>
1248     </td>
1249   </tr>
1250 </table>
1251 <table cellspacing="5" cellpadding="0" border="0">
1252   <tr>
1253     <td>
1254       &nbsp;
1255     </td>
1256     <td>
1257
1258 <p>
1259 Deletes a G-Line from all servers on the mesh. 
1260 <p>
1261
1262 <p>
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>.
1264 <p>
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 }
1268 </pre></div>
1269 <p>
1270     </td>
1271   </tr>
1272 </table>
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">
1275   <tr>
1276     <td class="mdRow">
1277       <table cellpadding="0" cellspacing="0" border="0">
1278         <tr>
1279           <td class="md" nowrap valign="top">bool Server::DelKLine           </td>
1280           <td class="md" valign="top">(&nbsp;</td>
1281           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1282           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1283           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1284           <td class="md" nowrap><code> [virtual]</code></td>
1285         </tr>
1286       </table>
1287     </td>
1288   </tr>
1289 </table>
1290 <table cellspacing="5" cellpadding="0" border="0">
1291   <tr>
1292     <td>
1293       &nbsp;
1294     </td>
1295     <td>
1296
1297 <p>
1298 Deletes a local K-Line. 
1299 <p>
1300
1301 <p>
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>.
1303 <p>
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 }
1307 </pre></div>
1308 <p>
1309     </td>
1310   </tr>
1311 </table>
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">
1314   <tr>
1315     <td class="mdRow">
1316       <table cellpadding="0" cellspacing="0" border="0">
1317         <tr>
1318           <td class="md" nowrap valign="top">bool Server::DelQLine           </td>
1319           <td class="md" valign="top">(&nbsp;</td>
1320           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1321           <td class="mdname1" valign="top" nowrap> <em>nickname</em>          </td>
1322           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1323           <td class="md" nowrap><code> [virtual]</code></td>
1324         </tr>
1325       </table>
1326     </td>
1327   </tr>
1328 </table>
1329 <table cellspacing="5" cellpadding="0" border="0">
1330   <tr>
1331     <td>
1332       &nbsp;
1333     </td>
1334     <td>
1335
1336 <p>
1337 Deletes a Q-Line from all servers on the mesh. 
1338 <p>
1339
1340 <p>
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>.
1342 <p>
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 }
1346 </pre></div>
1347 <p>
1348     </td>
1349   </tr>
1350 </table>
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">
1353   <tr>
1354     <td class="mdRow">
1355       <table cellpadding="0" cellspacing="0" border="0">
1356         <tr>
1357           <td class="md" nowrap valign="top">void Server::DelSocket           </td>
1358           <td class="md" valign="top">(&nbsp;</td>
1359           <td class="md" nowrap valign="top"><a class="el" href="classInspSocket.html">InspSocket</a> *&nbsp;</td>
1360           <td class="mdname1" valign="top" nowrap> <em>sock</em>          </td>
1361           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1362           <td class="md" nowrap><code> [virtual]</code></td>
1363         </tr>
1364       </table>
1365     </td>
1366   </tr>
1367 </table>
1368 <table cellspacing="5" cellpadding="0" border="0">
1369   <tr>
1370     <td>
1371       &nbsp;
1372     </td>
1373     <td>
1374
1375 <p>
1376 Deletes a class derived from <a class="el" href="classInspSocket.html">InspSocket</a> from the server's socket engine. 
1377 <p>
1378
1379 <p>
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>.
1381 <p>
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&lt;InspSocket*&gt;::iterator a = <a class="code" href="modules_8cpp.html#module_5Fsockets">module_sockets</a>.begin(); a &lt; <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 }
1392 </pre></div>
1393 <p>
1394     </td>
1395   </tr>
1396 </table>
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">
1399   <tr>
1400     <td class="mdRow">
1401       <table cellpadding="0" cellspacing="0" border="0">
1402         <tr>
1403           <td class="md" nowrap valign="top">bool Server::DelZLine           </td>
1404           <td class="md" valign="top">(&nbsp;</td>
1405           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1406           <td class="mdname1" valign="top" nowrap> <em>ipaddr</em>          </td>
1407           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1408           <td class="md" nowrap><code> [virtual]</code></td>
1409         </tr>
1410       </table>
1411     </td>
1412   </tr>
1413 </table>
1414 <table cellspacing="5" cellpadding="0" border="0">
1415   <tr>
1416     <td>
1417       &nbsp;
1418     </td>
1419     <td>
1420
1421 <p>
1422 Deletes a Z-Line from all servers on the mesh. 
1423 <p>
1424
1425 <p>
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>.
1427 <p>
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 }
1431 </pre></div>
1432 <p>
1433     </td>
1434   </tr>
1435 </table>
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">
1438   <tr>
1439     <td class="mdRow">
1440       <table cellpadding="0" cellspacing="0" border="0">
1441         <tr>
1442           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> * Server::FindChannel           </td>
1443           <td class="md" valign="top">(&nbsp;</td>
1444           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1445           <td class="mdname1" valign="top" nowrap> <em>channel</em>          </td>
1446           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1447           <td class="md" nowrap><code> [virtual]</code></td>
1448         </tr>
1449       </table>
1450     </td>
1451   </tr>
1452 </table>
1453 <table cellspacing="5" cellpadding="0" border="0">
1454   <tr>
1455     <td>
1456       &nbsp;
1457     </td>
1458     <td>
1459
1460 <p>
1461 Attempts to look up a channel and return a pointer to it. 
1462 <p>
1463 This function will return NULL if the channel does not exist.
1464 <p>
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 }
1468 </pre></div>
1469 <p>
1470     </td>
1471   </tr>
1472 </table>
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">
1475   <tr>
1476     <td class="mdRow">
1477       <table cellpadding="0" cellspacing="0" border="0">
1478         <tr>
1479           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * Server::FindDescriptor           </td>
1480           <td class="md" valign="top">(&nbsp;</td>
1481           <td class="md" nowrap valign="top">int&nbsp;</td>
1482           <td class="mdname1" valign="top" nowrap> <em>socket</em>          </td>
1483           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1484           <td class="md" nowrap><code> [virtual]</code></td>
1485         </tr>
1486       </table>
1487     </td>
1488   </tr>
1489 </table>
1490 <table cellspacing="5" cellpadding="0" border="0">
1491   <tr>
1492     <td>
1493       &nbsp;
1494     </td>
1495     <td>
1496
1497 <p>
1498 Attempts to look up a nick using the file descriptor associated with that nick. 
1499 <p>
1500 This function will return NULL if the file descriptor is not associated with a valid user.
1501 <p>
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 &lt; 65536 ? fd_ref_table[socket] : NULL);
1504 <a name="l00520"></a>00520 }
1505 </pre></div>
1506 <p>
1507     </td>
1508   </tr>
1509 </table>
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">
1512   <tr>
1513     <td class="mdRow">
1514       <table cellpadding="0" cellspacing="0" border="0">
1515         <tr>
1516           <td class="md" nowrap valign="top"><a class="el" href="classModule.html">Module</a> * Server::FindModule           </td>
1517           <td class="md" valign="top">(&nbsp;</td>
1518           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1519           <td class="mdname1" valign="top" nowrap> <em>name</em>          </td>
1520           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1521           <td class="md" nowrap><code> [virtual]</code></td>
1522         </tr>
1523       </table>
1524     </td>
1525   </tr>
1526 </table>
1527 <table cellspacing="5" cellpadding="0" border="0">
1528   <tr>
1529     <td>
1530       &nbsp;
1531     </td>
1532     <td>
1533
1534 <p>
1535 This function finds a module by name. 
1536 <p>
1537 You must provide the filename of the module. If the module cannot be found (is not loaded) the function will return NULL.
1538 <p>
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>.
1540 <p>
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 &lt;= <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>-&gt;<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 }
1551 </pre></div>
1552 <p>
1553     </td>
1554   </tr>
1555 </table>
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">
1558   <tr>
1559     <td class="mdRow">
1560       <table cellpadding="0" cellspacing="0" border="0">
1561         <tr>
1562           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * Server::FindNick           </td>
1563           <td class="md" valign="top">(&nbsp;</td>
1564           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1565           <td class="mdname1" valign="top" nowrap> <em>nick</em>          </td>
1566           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1567           <td class="md" nowrap><code> [virtual]</code></td>
1568         </tr>
1569       </table>
1570     </td>
1571   </tr>
1572 </table>
1573 <table cellspacing="5" cellpadding="0" border="0">
1574   <tr>
1575     <td>
1576       &nbsp;
1577     </td>
1578     <td>
1579
1580 <p>
1581 Attempts to look up a nick and return a pointer to it. 
1582 <p>
1583 This function will return NULL if the nick does not exist.
1584 <p>
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 }
1588 </pre></div>
1589 <p>
1590     </td>
1591   </tr>
1592 </table>
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">
1595   <tr>
1596     <td class="mdRow">
1597       <table cellpadding="0" cellspacing="0" border="0">
1598         <tr>
1599           <td class="md" nowrap valign="top"><a class="el" href="classAdmin.html">Admin</a> Server::GetAdmin           </td>
1600           <td class="md" valign="top">(&nbsp;</td>
1601           <td class="mdname1" valign="top" nowrap>          </td>
1602           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1603           <td class="md" nowrap><code> [virtual]</code></td>
1604         </tr>
1605       </table>
1606     </td>
1607   </tr>
1608 </table>
1609 <table cellspacing="5" cellpadding="0" border="0">
1610   <tr>
1611     <td>
1612       &nbsp;
1613     </td>
1614     <td>
1615
1616 <p>
1617 Returns the information of the server as returned by the /ADMIN command. 
1618 <p>
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.
1620 <p>
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 }
1624 </pre></div>
1625 <p>
1626     </td>
1627   </tr>
1628 </table>
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">
1631   <tr>
1632     <td class="mdRow">
1633       <table cellpadding="0" cellspacing="0" border="0">
1634         <tr>
1635           <td class="md" nowrap valign="top"><a class="el" href="classServerConfig.html">ServerConfig</a> * Server::GetConfig           </td>
1636           <td class="md" valign="top">(&nbsp;</td>
1637           <td class="mdname1" valign="top" nowrap>          </td>
1638           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1639           <td class="md" nowrap></td>
1640         </tr>
1641       </table>
1642     </td>
1643   </tr>
1644 </table>
1645 <table cellspacing="5" cellpadding="0" border="0">
1646   <tr>
1647     <td>
1648       &nbsp;
1649     </td>
1650     <td>
1651
1652 <p>
1653 Obtains a pointer to the server's <a class="el" href="classServerConfig.html">ServerConfig</a> object. 
1654 <p>
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.
1656 <p>
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 }
1660 </pre></div>
1661 <p>
1662     </td>
1663   </tr>
1664 </table>
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">
1667   <tr>
1668     <td class="mdRow">
1669       <table cellpadding="0" cellspacing="0" border="0">
1670         <tr>
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">(&nbsp;</td>
1673           <td class="mdname1" valign="top" nowrap>          </td>
1674           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1675           <td class="md" nowrap><code> [virtual]</code></td>
1676         </tr>
1677       </table>
1678     </td>
1679   </tr>
1680 </table>
1681 <table cellspacing="5" cellpadding="0" border="0">
1682   <tr>
1683     <td>
1684       &nbsp;
1685     </td>
1686     <td>
1687
1688 <p>
1689 Returns the network name, global to all linked servers. 
1690 <p>
1691
1692 <p>
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 }
1696 </pre></div>
1697 <p>
1698     </td>
1699   </tr>
1700 </table>
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">
1703   <tr>
1704     <td class="mdRow">
1705       <table cellpadding="0" cellspacing="0" border="0">
1706         <tr>
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">(&nbsp;</td>
1709           <td class="mdname1" valign="top" nowrap>          </td>
1710           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1711           <td class="md" nowrap><code> [virtual]</code></td>
1712         </tr>
1713       </table>
1714     </td>
1715   </tr>
1716 </table>
1717 <table cellspacing="5" cellpadding="0" border="0">
1718   <tr>
1719     <td>
1720       &nbsp;
1721     </td>
1722     <td>
1723
1724 <p>
1725 Returns the server description string of the local server. 
1726 <p>
1727
1728 <p>
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 }
1732 </pre></div>
1733 <p>
1734     </td>
1735   </tr>
1736 </table>
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">
1739   <tr>
1740     <td class="mdRow">
1741       <table cellpadding="0" cellspacing="0" border="0">
1742         <tr>
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">(&nbsp;</td>
1745           <td class="mdname1" valign="top" nowrap>          </td>
1746           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1747           <td class="md" nowrap><code> [virtual]</code></td>
1748         </tr>
1749       </table>
1750     </td>
1751   </tr>
1752 </table>
1753 <table cellspacing="5" cellpadding="0" border="0">
1754   <tr>
1755     <td>
1756       &nbsp;
1757     </td>
1758     <td>
1759
1760 <p>
1761 Returns the server name of the server where the module is loaded. 
1762 <p>
1763
1764 <p>
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 }
1768 </pre></div>
1769 <p>
1770     </td>
1771   </tr>
1772 </table>
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">
1775   <tr>
1776     <td class="mdRow">
1777       <table cellpadding="0" cellspacing="0" border="0">
1778         <tr>
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">(&nbsp;</td>
1781           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1782           <td class="mdname1" valign="top" nowrap> <em>chan</em>          </td>
1783           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1784           <td class="md" nowrap><code> [virtual]</code></td>
1785         </tr>
1786       </table>
1787     </td>
1788   </tr>
1789 </table>
1790 <table cellspacing="5" cellpadding="0" border="0">
1791   <tr>
1792     <td>
1793       &nbsp;
1794     </td>
1795     <td>
1796
1797 <p>
1798 Fetches the userlist of a channel. 
1799 <p>
1800 This function must be here and not a member of userrec or chanrec due to include constraints.
1801 <p>
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>.
1803 <p>
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&lt;char*&gt; *list = chan-&gt;<a class="code" href="classchanrec.html#GetUsers_28_29">GetUsers</a>();
1808 <a name="l00382"></a>00382         <span class="keywordflow">for</span> (std::vector&lt;char*&gt;::iterator i = list-&gt;begin(); i != list-&gt;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 }
1815 </pre></div>
1816 <p>
1817     </td>
1818   </tr>
1819 </table>
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">
1822   <tr>
1823     <td class="mdRow">
1824       <table cellpadding="0" cellspacing="0" border="0">
1825         <tr>
1826           <td class="md" nowrap valign="top">bool Server::IsNick           </td>
1827           <td class="md" valign="top">(&nbsp;</td>
1828           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1829           <td class="mdname1" valign="top" nowrap> <em>nick</em>          </td>
1830           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1831           <td class="md" nowrap><code> [virtual]</code></td>
1832         </tr>
1833       </table>
1834     </td>
1835   </tr>
1836 </table>
1837 <table cellspacing="5" cellpadding="0" border="0">
1838   <tr>
1839     <td>
1840       &nbsp;
1841     </td>
1842     <td>
1843
1844 <p>
1845 Returns true if a nick is valid. 
1846 <p>
1847 Nicks for unregistered connections will return false.
1848 <p>
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>.
1850 <p>
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 }
1854 </pre></div>
1855 <p>
1856     </td>
1857   </tr>
1858 </table>
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">
1861   <tr>
1862     <td class="mdRow">
1863       <table cellpadding="0" cellspacing="0" border="0">
1864         <tr>
1865           <td class="md" nowrap valign="top">bool Server::IsOnChannel           </td>
1866           <td class="md" valign="top">(&nbsp;</td>
1867           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1868           <td class="mdname" nowrap> <em>User</em>, </td>
1869         </tr>
1870         <tr>
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> *&nbsp;</td>
1874           <td class="mdname" nowrap> <em>Chan</em></td>
1875         </tr>
1876         <tr>
1877           <td class="md"></td>
1878           <td class="md">)&nbsp;</td>
1879           <td class="md" colspan="2"><code> [virtual]</code></td>
1880         </tr>
1881       </table>
1882     </td>
1883   </tr>
1884 </table>
1885 <table cellspacing="5" cellpadding="0" border="0">
1886   <tr>
1887     <td>
1888       &nbsp;
1889     </td>
1890     <td>
1891
1892 <p>
1893 Checks if a user is on a channel. 
1894 <p>
1895 This function will return true or false to indicate if user 'User' is on channel 'Chan'.
1896 <p>
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>.
1898 <p>
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 }
1902 </pre></div>
1903 <p>
1904     </td>
1905   </tr>
1906 </table>
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">
1909   <tr>
1910     <td class="mdRow">
1911       <table cellpadding="0" cellspacing="0" border="0">
1912         <tr>
1913           <td class="md" nowrap valign="top">bool Server::IsUlined           </td>
1914           <td class="md" valign="top">(&nbsp;</td>
1915           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1916           <td class="mdname1" valign="top" nowrap> <em>server</em>          </td>
1917           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1918           <td class="md" nowrap><code> [virtual]</code></td>
1919         </tr>
1920       </table>
1921     </td>
1922   </tr>
1923 </table>
1924 <table cellspacing="5" cellpadding="0" border="0">
1925   <tr>
1926     <td>
1927       &nbsp;
1928     </td>
1929     <td>
1930
1931 <p>
1932 Returns true if the servername you give is ulined. 
1933 <p>
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.
1935 <p>
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>.
1937 <p>
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 }
1941 </pre></div>
1942 <p>
1943     </td>
1944   </tr>
1945 </table>
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">
1948   <tr>
1949     <td class="mdRow">
1950       <table cellpadding="0" cellspacing="0" border="0">
1951         <tr>
1952           <td class="md" nowrap valign="top">bool Server::IsValidMask           </td>
1953           <td class="md" valign="top">(&nbsp;</td>
1954           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1955           <td class="mdname1" valign="top" nowrap> <em>mask</em>          </td>
1956           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1957           <td class="md" nowrap><code> [virtual]</code></td>
1958         </tr>
1959       </table>
1960     </td>
1961   </tr>
1962 </table>
1963 <table cellspacing="5" cellpadding="0" border="0">
1964   <tr>
1965     <td>
1966       &nbsp;
1967     </td>
1968     <td>
1969
1970 <p>
1971 Returns true if a nick!ident string is correctly formatted, false if otherwise. 
1972 <p>
1973
1974 <p>
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 &lt; strlen(dest); i++)
1982 <a name="l00706"></a>00706                 <span class="keywordflow">if</span> (dest[i] &lt; 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 &lt; strlen(dest); i++)
1985 <a name="l00709"></a>00709                 <span class="keywordflow">if</span> (dest[i] &gt; 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 &lt; 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&gt;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 &lt; 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&gt;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 }
2002 </pre></div>
2003 <p>
2004     </td>
2005   </tr>
2006 </table>
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">
2009   <tr>
2010     <td class="mdRow">
2011       <table cellpadding="0" cellspacing="0" border="0">
2012         <tr>
2013           <td class="md" nowrap valign="top">bool Server::IsValidModuleCommand           </td>
2014           <td class="md" valign="top">(&nbsp;</td>
2015           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2016           <td class="mdname" nowrap> <em>commandname</em>, </td>
2017         </tr>
2018         <tr>
2019           <td class="md" nowrap align="right"></td>
2020           <td class="md"></td>
2021           <td class="md" nowrap>int&nbsp;</td>
2022           <td class="mdname" nowrap> <em>pcnt</em>, </td>
2023         </tr>
2024         <tr>
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> *&nbsp;</td>
2028           <td class="mdname" nowrap> <em>user</em></td>
2029         </tr>
2030         <tr>
2031           <td class="md"></td>
2032           <td class="md">)&nbsp;</td>
2033           <td class="md" colspan="2"><code> [virtual]</code></td>
2034         </tr>
2035       </table>
2036     </td>
2037   </tr>
2038 </table>
2039 <table cellspacing="5" cellpadding="0" border="0">
2040   <tr>
2041     <td>
2042       &nbsp;
2043     </td>
2044     <td>
2045
2046 <p>
2047
2048 <p>
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 }
2052 </pre></div>
2053 <p>
2054     </td>
2055   </tr>
2056 </table>
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">
2059   <tr>
2060     <td class="mdRow">
2061       <table cellpadding="0" cellspacing="0" border="0">
2062         <tr>
2063           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> * Server::JoinUserToChannel           </td>
2064           <td class="md" valign="top">(&nbsp;</td>
2065           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2066           <td class="mdname" nowrap> <em>user</em>, </td>
2067         </tr>
2068         <tr>
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>&nbsp;</td>
2072           <td class="mdname" nowrap> <em>cname</em>, </td>
2073         </tr>
2074         <tr>
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>&nbsp;</td>
2078           <td class="mdname" nowrap> <em>key</em></td>
2079         </tr>
2080         <tr>
2081           <td class="md"></td>
2082           <td class="md">)&nbsp;</td>
2083           <td class="md" colspan="2"><code> [virtual]</code></td>
2084         </tr>
2085       </table>
2086     </td>
2087   </tr>
2088 </table>
2089 <table cellspacing="5" cellpadding="0" border="0">
2090   <tr>
2091     <td>
2092       &nbsp;
2093     </td>
2094     <td>
2095
2096 <p>
2097 Forces a user to join a channel. 
2098 <p>
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.
2100 <p>
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 }
2104 </pre></div>
2105 <p>
2106     </td>
2107   </tr>
2108 </table>
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">
2111   <tr>
2112     <td class="mdRow">
2113       <table cellpadding="0" cellspacing="0" border="0">
2114         <tr>
2115           <td class="md" nowrap valign="top">void Server::Log           </td>
2116           <td class="md" valign="top">(&nbsp;</td>
2117           <td class="md" nowrap valign="top">int&nbsp;</td>
2118           <td class="mdname" nowrap> <em>level</em>, </td>
2119         </tr>
2120         <tr>
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>&nbsp;</td>
2124           <td class="mdname" nowrap> <em>s</em></td>
2125         </tr>
2126         <tr>
2127           <td class="md"></td>
2128           <td class="md">)&nbsp;</td>
2129           <td class="md" colspan="2"><code> [virtual]</code></td>
2130         </tr>
2131       </table>
2132     </td>
2133   </tr>
2134 </table>
2135 <table cellspacing="5" cellpadding="0" border="0">
2136   <tr>
2137     <td>
2138       &nbsp;
2139     </td>
2140     <td>
2141
2142 <p>
2143 Writes a log string. 
2144 <p>
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.
2146 <p>
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 }
2150 </pre></div>
2151 <p>
2152     </td>
2153   </tr>
2154 </table>
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">
2157   <tr>
2158     <td class="mdRow">
2159       <table cellpadding="0" cellspacing="0" border="0">
2160         <tr>
2161           <td class="md" nowrap valign="top">bool Server::MatchText           </td>
2162           <td class="md" valign="top">(&nbsp;</td>
2163           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2164           <td class="mdname" nowrap> <em>sliteral</em>, </td>
2165         </tr>
2166         <tr>
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>&nbsp;</td>
2170           <td class="mdname" nowrap> <em>spattern</em></td>
2171         </tr>
2172         <tr>
2173           <td class="md"></td>
2174           <td class="md">)&nbsp;</td>
2175           <td class="md" colspan="2"><code> [virtual]</code></td>
2176         </tr>
2177       </table>
2178     </td>
2179   </tr>
2180 </table>
2181 <table cellspacing="5" cellpadding="0" border="0">
2182   <tr>
2183     <td>
2184       &nbsp;
2185     </td>
2186     <td>
2187
2188 <p>
2189 Matches text against a glob pattern. 
2190 <p>
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.
2192 <p>
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 }
2199 </pre></div>
2200 <p>
2201     </td>
2202   </tr>
2203 </table>
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">
2206   <tr>
2207     <td class="mdRow">
2208       <table cellpadding="0" cellspacing="0" border="0">
2209         <tr>
2210           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> * Server::PartUserFromChannel           </td>
2211           <td class="md" valign="top">(&nbsp;</td>
2212           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2213           <td class="mdname" nowrap> <em>user</em>, </td>
2214         </tr>
2215         <tr>
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>&nbsp;</td>
2219           <td class="mdname" nowrap> <em>cname</em>, </td>
2220         </tr>
2221         <tr>
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>&nbsp;</td>
2225           <td class="mdname" nowrap> <em>reason</em></td>
2226         </tr>
2227         <tr>
2228           <td class="md"></td>
2229           <td class="md">)&nbsp;</td>
2230           <td class="md" colspan="2"><code> [virtual]</code></td>
2231         </tr>
2232       </table>
2233     </td>
2234   </tr>
2235 </table>
2236 <table cellspacing="5" cellpadding="0" border="0">
2237   <tr>
2238     <td>
2239       &nbsp;
2240     </td>
2241     <td>
2242
2243 <p>
2244 Forces a user to part a channel. 
2245 <p>
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.
2247 <p>
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 }
2251 </pre></div>
2252 <p>
2253     </td>
2254   </tr>
2255 </table>
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">
2258   <tr>
2259     <td class="mdRow">
2260       <table cellpadding="0" cellspacing="0" border="0">
2261         <tr>
2262           <td class="md" nowrap valign="top">bool Server::PseudoToUser           </td>
2263           <td class="md" valign="top">(&nbsp;</td>
2264           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2265           <td class="mdname" nowrap> <em>alive</em>, </td>
2266         </tr>
2267         <tr>
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> *&nbsp;</td>
2271           <td class="mdname" nowrap> <em>zombie</em>, </td>
2272         </tr>
2273         <tr>
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>&nbsp;</td>
2277           <td class="mdname" nowrap> <em>message</em></td>
2278         </tr>
2279         <tr>
2280           <td class="md"></td>
2281           <td class="md">)&nbsp;</td>
2282           <td class="md" colspan="2"><code> [virtual]</code></td>
2283         </tr>
2284       </table>
2285     </td>
2286   </tr>
2287 </table>
2288 <table cellspacing="5" cellpadding="0" border="0">
2289   <tr>
2290     <td>
2291       &nbsp;
2292     </td>
2293     <td>
2294
2295 <p>
2296 This user takes one user, and switches their file descriptor with another user, so that one user "becomes" the other. 
2297 <p>
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.
2299 <p>
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>.
2301 <p>
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-&gt;<a class="code" href="classconnection.html#fd">fd</a> = alive-&gt;<a class="code" href="classconnection.html#fd">fd</a>;
2304 <a name="l00616"></a>00616         alive-&gt;<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-&gt;<a class="code" href="classuserrec.html#ClearBuffer_28_29">ClearBuffer</a>();
2306 <a name="l00618"></a>00618         Write(zombie-&gt;<a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">":%s!%s@%s NICK %s"</span>,alive-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>,alive-&gt;<a class="code" href="classuserrec.html#ident_5BIDENTMAX_2B_32_5D">ident</a>,alive-&gt;<a class="code" href="classconnection.html#host_5B_31_36_30_5D">host</a>,zombie-&gt;<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-&gt;<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 &lt; zombie-&gt;chans.size(); i++)
2310 <a name="l00622"></a>00622         {
2311 <a name="l00623"></a>00623                 <span class="keywordflow">if</span> (zombie-&gt;<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-&gt;<a class="code" href="classuserrec.html#chans">chans</a>[i].channel-&gt;name)
2314 <a name="l00626"></a>00626                         {
2315 <a name="l00627"></a>00627                                 <a class="code" href="classchanrec.html">chanrec</a>* Ptr = zombie-&gt;<a class="code" href="classuserrec.html#chans">chans</a>[i].channel;
2316 <a name="l00628"></a>00628                                 WriteFrom(zombie-&gt;<a class="code" href="classconnection.html#fd">fd</a>,zombie,<span class="stringliteral">"JOIN %s"</span>,Ptr-&gt;<a class="code" href="classchanrec.html#name_5BCHANMAX_5D">name</a>);
2317 <a name="l00629"></a>00629                                 <span class="keywordflow">if</span> (Ptr-&gt;<a class="code" href="classchanrec.html#topicset">topicset</a>)
2318 <a name="l00630"></a>00630                                 {
2319 <a name="l00631"></a>00631                                         WriteServ(zombie-&gt;<a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">"332 %s %s :%s"</span>, zombie-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>, Ptr-&gt;<a class="code" href="classchanrec.html#name_5BCHANMAX_5D">name</a>, Ptr-&gt;<a class="code" href="classchanrec.html#topic_5BMAXBUF_5D">topic</a>);
2320 <a name="l00632"></a>00632                                         WriteServ(zombie-&gt;<a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">"333 %s %s %s %d"</span>, zombie-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>, Ptr-&gt;<a class="code" href="classchanrec.html#name_5BCHANMAX_5D">name</a>, Ptr-&gt;<a class="code" href="classchanrec.html#setby_5BNICKMAX_5D">setby</a>, Ptr-&gt;<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-&gt;<a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">"366 %s %s :End of /NAMES list."</span>, zombie-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>, Ptr-&gt;<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 }
2330 </pre></div>
2331 <p>
2332     </td>
2333   </tr>
2334 </table>
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">
2337   <tr>
2338     <td class="mdRow">
2339       <table cellpadding="0" cellspacing="0" border="0">
2340         <tr>
2341           <td class="md" nowrap valign="top">void Server::QuitUser           </td>
2342           <td class="md" valign="top">(&nbsp;</td>
2343           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2344           <td class="mdname" nowrap> <em>user</em>, </td>
2345         </tr>
2346         <tr>
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>&nbsp;</td>
2350           <td class="mdname" nowrap> <em>reason</em></td>
2351         </tr>
2352         <tr>
2353           <td class="md"></td>
2354           <td class="md">)&nbsp;</td>
2355           <td class="md" colspan="2"><code> [virtual]</code></td>
2356         </tr>
2357       </table>
2358     </td>
2359   </tr>
2360 </table>
2361 <table cellspacing="5" cellpadding="0" border="0">
2362   <tr>
2363     <td>
2364       &nbsp;
2365     </td>
2366     <td>
2367
2368 <p>
2369 Forces a user to quit with the specified reason. 
2370 <p>
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>
2372 WARNING!<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.
2374 <p>
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 }
2378 </pre></div>
2379 <p>
2380     </td>
2381   </tr>
2382 </table>
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">
2385   <tr>
2386     <td class="mdRow">
2387       <table cellpadding="0" cellspacing="0" border="0">
2388         <tr>
2389           <td class="md" nowrap valign="top">void Server::RehashServer           </td>
2390           <td class="md" valign="top">(&nbsp;</td>
2391           <td class="mdname1" valign="top" nowrap>          </td>
2392           <td class="md" valign="top">&nbsp;)&nbsp;</td>
2393           <td class="md" nowrap><code> [virtual]</code></td>
2394         </tr>
2395       </table>
2396     </td>
2397   </tr>
2398 </table>
2399 <table cellspacing="5" cellpadding="0" border="0">
2400   <tr>
2401     <td>
2402       &nbsp;
2403     </td>
2404     <td>
2405
2406 <p>
2407
2408 <p>
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>.
2410 <p>
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>-&gt;<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 }
2415 </pre></div>
2416 <p>
2417     </td>
2418   </tr>
2419 </table>
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">
2422   <tr>
2423     <td class="mdRow">
2424       <table cellpadding="0" cellspacing="0" border="0">
2425         <tr>
2426           <td class="md" nowrap valign="top">void Server::Send           </td>
2427           <td class="md" valign="top">(&nbsp;</td>
2428           <td class="md" nowrap valign="top">int&nbsp;</td>
2429           <td class="mdname" nowrap> <em>Socket</em>, </td>
2430         </tr>
2431         <tr>
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>&nbsp;</td>
2435           <td class="mdname" nowrap> <em>s</em></td>
2436         </tr>
2437         <tr>
2438           <td class="md"></td>
2439           <td class="md">)&nbsp;</td>
2440           <td class="md" colspan="2"><code> [virtual]</code></td>
2441         </tr>
2442       </table>
2443     </td>
2444   </tr>
2445 </table>
2446 <table cellspacing="5" cellpadding="0" border="0">
2447   <tr>
2448     <td>
2449       &nbsp;
2450     </td>
2451     <td>
2452
2453 <p>
2454 Sends a line of text down a TCP/IP socket. 
2455 <p>
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.
2457 <p>
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 }
2461 </pre></div>
2462 <p>
2463     </td>
2464   </tr>
2465 </table>
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">
2468   <tr>
2469     <td class="mdRow">
2470       <table cellpadding="0" cellspacing="0" border="0">
2471         <tr>
2472           <td class="md" nowrap valign="top">void Server::SendChannel           </td>
2473           <td class="md" valign="top">(&nbsp;</td>
2474           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2475           <td class="mdname" nowrap> <em>User</em>, </td>
2476         </tr>
2477         <tr>
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> *&nbsp;</td>
2481           <td class="mdname" nowrap> <em>Channel</em>, </td>
2482         </tr>
2483         <tr>
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>&nbsp;</td>
2487           <td class="mdname" nowrap> <em>s</em>, </td>
2488         </tr>
2489         <tr>
2490           <td class="md" nowrap align="right"></td>
2491           <td class="md"></td>
2492           <td class="md" nowrap>bool&nbsp;</td>
2493           <td class="mdname" nowrap> <em>IncludeSender</em></td>
2494         </tr>
2495         <tr>
2496           <td class="md"></td>
2497           <td class="md">)&nbsp;</td>
2498           <td class="md" colspan="2"><code> [virtual]</code></td>
2499         </tr>
2500       </table>
2501     </td>
2502   </tr>
2503 </table>
2504 <table cellspacing="5" cellpadding="0" border="0">
2505   <tr>
2506     <td>
2507       &nbsp;
2508     </td>
2509     <td>
2510
2511 <p>
2512 Sends text from a user to a channel (mulicast). 
2513 <p>
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).
2515 <p>
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 }
2526 </pre></div>
2527 <p>
2528     </td>
2529   </tr>
2530 </table>
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">
2533   <tr>
2534     <td class="mdRow">
2535       <table cellpadding="0" cellspacing="0" border="0">
2536         <tr>
2537           <td class="md" nowrap valign="top">void Server::SendChannelServerNotice           </td>
2538           <td class="md" valign="top">(&nbsp;</td>
2539           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2540           <td class="mdname" nowrap> <em>ServName</em>, </td>
2541         </tr>
2542         <tr>
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> *&nbsp;</td>
2546           <td class="mdname" nowrap> <em>Channel</em>, </td>
2547         </tr>
2548         <tr>
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>&nbsp;</td>
2552           <td class="mdname" nowrap> <em>text</em></td>
2553         </tr>
2554         <tr>
2555           <td class="md"></td>
2556           <td class="md">)&nbsp;</td>
2557           <td class="md" colspan="2"><code> [virtual]</code></td>
2558         </tr>
2559       </table>
2560     </td>
2561   </tr>
2562 </table>
2563 <table cellspacing="5" cellpadding="0" border="0">
2564   <tr>
2565     <td>
2566       &nbsp;
2567     </td>
2568     <td>
2569
2570 <p>
2571 Writes text to a channel, but from a server, including all. 
2572 <p>
2573 This can be used to send server notices to a group of users.
2574 <p>
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 }
2578 </pre></div>
2579 <p>
2580     </td>
2581   </tr>
2582 </table>
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">
2585   <tr>
2586     <td class="mdRow">
2587       <table cellpadding="0" cellspacing="0" border="0">
2588         <tr>
2589           <td class="md" nowrap valign="top">void Server::SendCommon           </td>
2590           <td class="md" valign="top">(&nbsp;</td>
2591           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2592           <td class="mdname" nowrap> <em>User</em>, </td>
2593         </tr>
2594         <tr>
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>&nbsp;</td>
2598           <td class="mdname" nowrap> <em>text</em>, </td>
2599         </tr>
2600         <tr>
2601           <td class="md" nowrap align="right"></td>
2602           <td class="md"></td>
2603           <td class="md" nowrap>bool&nbsp;</td>
2604           <td class="mdname" nowrap> <em>IncludeSender</em></td>
2605         </tr>
2606         <tr>
2607           <td class="md"></td>
2608           <td class="md">)&nbsp;</td>
2609           <td class="md" colspan="2"><code> [virtual]</code></td>
2610         </tr>
2611       </table>
2612     </td>
2613   </tr>
2614 </table>
2615 <table cellspacing="5" cellpadding="0" border="0">
2616   <tr>
2617     <td>
2618       &nbsp;
2619     </td>
2620     <td>
2621
2622 <p>
2623 Sends text from a user to one or more channels (mulicast). 
2624 <p>
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.
2626 <p>
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 }
2637 </pre></div>
2638 <p>
2639     </td>
2640   </tr>
2641 </table>
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">
2644   <tr>
2645     <td class="mdRow">
2646       <table cellpadding="0" cellspacing="0" border="0">
2647         <tr>
2648           <td class="md" nowrap valign="top">void Server::SendFrom           </td>
2649           <td class="md" valign="top">(&nbsp;</td>
2650           <td class="md" nowrap valign="top">int&nbsp;</td>
2651           <td class="mdname" nowrap> <em>Socket</em>, </td>
2652         </tr>
2653         <tr>
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> *&nbsp;</td>
2657           <td class="mdname" nowrap> <em>User</em>, </td>
2658         </tr>
2659         <tr>
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>&nbsp;</td>
2663           <td class="mdname" nowrap> <em>s</em></td>
2664         </tr>
2665         <tr>
2666           <td class="md"></td>
2667           <td class="md">)&nbsp;</td>
2668           <td class="md" colspan="2"><code> [virtual]</code></td>
2669         </tr>
2670       </table>
2671     </td>
2672   </tr>
2673 </table>
2674 <table cellspacing="5" cellpadding="0" border="0">
2675   <tr>
2676     <td>
2677       &nbsp;
2678     </td>
2679     <td>
2680
2681 <p>
2682 Sends text from a user to a socket. 
2683 <p>
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)
2685 <p>
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 }
2689 </pre></div>
2690 <p>
2691     </td>
2692   </tr>
2693 </table>
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">
2696   <tr>
2697     <td class="mdRow">
2698       <table cellpadding="0" cellspacing="0" border="0">
2699         <tr>
2700           <td class="md" nowrap valign="top">void Server::SendMode           </td>
2701           <td class="md" valign="top">(&nbsp;</td>
2702           <td class="md" nowrap valign="top">char **&nbsp;</td>
2703           <td class="mdname" nowrap> <em>parameters</em>, </td>
2704         </tr>
2705         <tr>
2706           <td class="md" nowrap align="right"></td>
2707           <td class="md"></td>
2708           <td class="md" nowrap>int&nbsp;</td>
2709           <td class="mdname" nowrap> <em>pcnt</em>, </td>
2710         </tr>
2711         <tr>
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> *&nbsp;</td>
2715           <td class="mdname" nowrap> <em>user</em></td>
2716         </tr>
2717         <tr>
2718           <td class="md"></td>
2719           <td class="md">)&nbsp;</td>
2720           <td class="md" colspan="2"><code> [virtual]</code></td>
2721         </tr>
2722       </table>
2723     </td>
2724   </tr>
2725 </table>
2726 <table cellspacing="5" cellpadding="0" border="0">
2727   <tr>
2728     <td>
2729       &nbsp;
2730     </td>
2731     <td>
2732
2733 <p>
2734 Sends a servermode. 
2735 <p>
2736 you must format the parameters array with the target, modes and parameters for those modes.<p>
2737 For example:<p>
2738 char *modes[3];<p>
2739 modes[0] = ChannelName;<p>
2740 modes[1] = "+o";<p>
2741 modes[2] = user-&gt;nick;<p>
2742 Srv-&gt;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!
2744 <p>
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>.
2746 <p>
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 }
2750 </pre></div>
2751 <p>
2752     </td>
2753   </tr>
2754 </table>
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">
2757   <tr>
2758     <td class="mdRow">
2759       <table cellpadding="0" cellspacing="0" border="0">
2760         <tr>
2761           <td class="md" nowrap valign="top">void Server::SendOpers           </td>
2762           <td class="md" valign="top">(&nbsp;</td>
2763           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2764           <td class="mdname1" valign="top" nowrap> <em>s</em>          </td>
2765           <td class="md" valign="top">&nbsp;)&nbsp;</td>
2766           <td class="md" nowrap><code> [virtual]</code></td>
2767         </tr>
2768       </table>
2769     </td>
2770   </tr>
2771 </table>
2772 <table cellspacing="5" cellpadding="0" border="0">
2773   <tr>
2774     <td>
2775       &nbsp;
2776     </td>
2777     <td>
2778
2779 <p>
2780 Sends text to all opers. 
2781 <p>
2782 This method sends a server notice to all opers with the usermode +s.
2783 <p>
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 }
2787 </pre></div>
2788 <p>
2789     </td>
2790   </tr>
2791 </table>
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">
2794   <tr>
2795     <td class="mdRow">
2796       <table cellpadding="0" cellspacing="0" border="0">
2797         <tr>
2798           <td class="md" nowrap valign="top">void Server::SendServ           </td>
2799           <td class="md" valign="top">(&nbsp;</td>
2800           <td class="md" nowrap valign="top">int&nbsp;</td>
2801           <td class="mdname" nowrap> <em>Socket</em>, </td>
2802         </tr>
2803         <tr>
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>&nbsp;</td>
2807           <td class="mdname" nowrap> <em>s</em></td>
2808         </tr>
2809         <tr>
2810           <td class="md"></td>
2811           <td class="md">)&nbsp;</td>
2812           <td class="md" colspan="2"><code> [virtual]</code></td>
2813         </tr>
2814       </table>
2815     </td>
2816   </tr>
2817 </table>
2818 <table cellspacing="5" cellpadding="0" border="0">
2819   <tr>
2820     <td>
2821       &nbsp;
2822     </td>
2823     <td>
2824
2825 <p>
2826 Sends text from the server to a socket. 
2827 <p>
2828 This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)
2829 <p>
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 }
2833 </pre></div>
2834 <p>
2835     </td>
2836   </tr>
2837 </table>
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">
2840   <tr>
2841     <td class="mdRow">
2842       <table cellpadding="0" cellspacing="0" border="0">
2843         <tr>
2844           <td class="md" nowrap valign="top">void Server::SendTo           </td>
2845           <td class="md" valign="top">(&nbsp;</td>
2846           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2847           <td class="mdname" nowrap> <em>Source</em>, </td>
2848         </tr>
2849         <tr>
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> *&nbsp;</td>
2853           <td class="mdname" nowrap> <em>Dest</em>, </td>
2854         </tr>
2855         <tr>
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>&nbsp;</td>
2859           <td class="mdname" nowrap> <em>s</em></td>
2860         </tr>
2861         <tr>
2862           <td class="md"></td>
2863           <td class="md">)&nbsp;</td>
2864           <td class="md" colspan="2"><code> [virtual]</code></td>
2865         </tr>
2866       </table>
2867     </td>
2868   </tr>
2869 </table>
2870 <table cellspacing="5" cellpadding="0" border="0">
2871   <tr>
2872     <td>
2873       &nbsp;
2874     </td>
2875     <td>
2876
2877 <p>
2878 Sends text from a user to another user. 
2879 <p>
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>
2881 :user!ident TEXT<p>
2882 The format will become:<p>
2883 :localserver TEXT<p>
2884 Which is useful for numerics and server notices to single users, etc.
2885 <p>
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>.
2887 <p>
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-&gt;<a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">":%s %s"</span>,this-&gt;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 }
2900 </pre></div>
2901 <p>
2902     </td>
2903   </tr>
2904 </table>
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">
2907   <tr>
2908     <td class="mdRow">
2909       <table cellpadding="0" cellspacing="0" border="0">
2910         <tr>
2911           <td class="md" nowrap valign="top">void Server::SendToModeMask           </td>
2912           <td class="md" valign="top">(&nbsp;</td>
2913           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2914           <td class="mdname" nowrap> <em>modes</em>, </td>
2915         </tr>
2916         <tr>
2917           <td class="md" nowrap align="right"></td>
2918           <td class="md"></td>
2919           <td class="md" nowrap>int&nbsp;</td>
2920           <td class="mdname" nowrap> <em>flags</em>, </td>
2921         </tr>
2922         <tr>
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>&nbsp;</td>
2926           <td class="mdname" nowrap> <em>text</em></td>
2927         </tr>
2928         <tr>
2929           <td class="md"></td>
2930           <td class="md">)&nbsp;</td>
2931           <td class="md" colspan="2"><code> [virtual]</code></td>
2932         </tr>
2933       </table>
2934     </td>
2935   </tr>
2936 </table>
2937 <table cellspacing="5" cellpadding="0" border="0">
2938   <tr>
2939     <td>
2940       &nbsp;
2941     </td>
2942     <td>
2943
2944 <p>
2945 Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter. 
2946 <p>
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-&gt;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.
2950 <p>
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 }
2954 </pre></div>
2955 <p>
2956     </td>
2957   </tr>
2958 </table>
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">
2961   <tr>
2962     <td class="mdRow">
2963       <table cellpadding="0" cellspacing="0" border="0">
2964         <tr>
2965           <td class="md" nowrap valign="top">void Server::SendWallops           </td>
2966           <td class="md" valign="top">(&nbsp;</td>
2967           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2968           <td class="mdname" nowrap> <em>User</em>, </td>
2969         </tr>
2970         <tr>
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>&nbsp;</td>
2974           <td class="mdname" nowrap> <em>text</em></td>
2975         </tr>
2976         <tr>
2977           <td class="md"></td>
2978           <td class="md">)&nbsp;</td>
2979           <td class="md" colspan="2"><code> [virtual]</code></td>
2980         </tr>
2981       </table>
2982     </td>
2983   </tr>
2984 </table>
2985 <table cellspacing="5" cellpadding="0" border="0">
2986   <tr>
2987     <td>
2988       &nbsp;
2989     </td>
2990     <td>
2991
2992 <p>
2993 Sends a WALLOPS message. 
2994 <p>
2995 This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.
2996 <p>
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 }
3000 </pre></div>
3001 <p>
3002     </td>
3003   </tr>
3004 </table>
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">
3007   <tr>
3008     <td class="mdRow">
3009       <table cellpadding="0" cellspacing="0" border="0">
3010         <tr>
3011           <td class="md" nowrap valign="top">bool Server::UserToPseudo           </td>
3012           <td class="md" valign="top">(&nbsp;</td>
3013           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
3014           <td class="mdname" nowrap> <em>user</em>, </td>
3015         </tr>
3016         <tr>
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>&nbsp;</td>
3020           <td class="mdname" nowrap> <em>message</em></td>
3021         </tr>
3022         <tr>
3023           <td class="md"></td>
3024           <td class="md">)&nbsp;</td>
3025           <td class="md" colspan="2"><code> [virtual]</code></td>
3026         </tr>
3027       </table>
3028     </td>
3029   </tr>
3030 </table>
3031 <table cellspacing="5" cellpadding="0" border="0">
3032   <tr>
3033     <td>
3034       &nbsp;
3035     </td>
3036     <td>
3037
3038 <p>
3039 Remove a user's connection to the irc server, but leave their client in existence in the user hash. 
3040 <p>
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.
3042 <p>
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>.
3044 <p>
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-&gt;<a class="code" href="classconnection.html#fd">fd</a>;
3047 <a name="l00604"></a>00604         user-&gt;<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-&gt;<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-&gt;<a class="code" href="classuserrec.html#ident_5BIDENTMAX_2B_32_5D">ident</a>,user-&gt;<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>-&gt;<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 }
3055 </pre></div>
3056 <p>
3057     </td>
3058   </tr>
3059 </table>
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&nbsp;
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>
3065 </body>
3066 </html>