]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classServer.html
Added new documentation
[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">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>
31
32 <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>
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#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>
34
35 <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>
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#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>
37
38 <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>
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#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>
40
41 <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>
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#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>
43
44 <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>
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#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>
46
47 <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>
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#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>
49
50 <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>
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#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>
52
53 <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>
54 <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>
55
56 <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>
57 <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>
58
59 <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>
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#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>
61
62 <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>
63 <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>
64
65 <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>
66 <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>
67
68 <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>
69 <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>
70
71 <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>
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#FindDescriptor_28int_20socket_29">FindDescriptor</a> (int socket)</td></tr>
73
74 <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>
75 <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>
76
77 <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>
78 <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>
79
80 <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>
81 <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>
82
83 <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>
84 <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>
85
86 <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>
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#GetNetworkName_28_29">GetNetworkName</a> ()</td></tr>
88
89 <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>
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#GetServerDescription_28_29">GetServerDescription</a> ()</td></tr>
91
92 <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>
93 <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>
94
95 <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>
96 <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>
97
98 <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>
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#AddExtendedListMode_28char_20modechar_29">AddExtendedListMode</a> (char modechar)</td></tr>
100
101 <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>
102 <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>
103
104 <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>
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#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>
106
107 <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>
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#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>
109
110 <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>
111 <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>
112
113 <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>
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#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>
115
116 <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>
117 <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>
118
119 <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>
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#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>
121
122 <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>
123 <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>
124
125 <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>
126 <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>
127
128 <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>
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#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>
130
131 <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>
132 <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>
133
134 <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>
135 <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>
136
137 <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>
138 <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>
139
140 <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>
141 <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>
142
143 <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>
144 <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>
145
146 <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>
147 <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>
148
149 <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>
150 <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>
151
152 <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>
153 <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>
154
155 <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>
156 <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>
157
158 <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>
159 <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>
160
161 <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>
162 <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>
163
164 <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>
165 <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>
166
167 <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>
168 <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>
169
170 <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>
171 <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>
172
173 <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>
174 <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>
175
176 <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>
177 <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>
178
179 <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>
180 <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>
181
182 <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>
183 <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>
184
185 <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>
186 <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>
187
188 <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>
189 <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>
190
191 <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>
192 </table>
193 <hr><a name="_details"></a><h2>Detailed Description</h2>
194 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. 
195 <p>
196 All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks.
197 <p>
198
199 <p>
200 Definition at line <a class="el" href="modules_8h-source.html#l00696">696</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
201 <a class="anchor" name="Server_28_29"></a><!-- doxytag: member="Server::Server" ref="Server_28_29" args="()" --><p>
202 <table class="mdTable" cellpadding="2" cellspacing="0">
203   <tr>
204     <td class="mdRow">
205       <table cellpadding="0" cellspacing="0" border="0">
206         <tr>
207           <td class="md" nowrap valign="top">Server::Server           </td>
208           <td class="md" valign="top">(&nbsp;</td>
209           <td class="mdname1" valign="top" nowrap>          </td>
210           <td class="md" valign="top">&nbsp;)&nbsp;</td>
211           <td class="md" nowrap></td>
212         </tr>
213       </table>
214     </td>
215   </tr>
216 </table>
217 <table cellspacing="5" cellpadding="0" border="0">
218   <tr>
219     <td>
220       &nbsp;
221     </td>
222     <td>
223
224 <p>
225 Default constructor. 
226 <p>
227 Creates a Server object.
228 <p>
229 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 {
230 <a name="l00369"></a>00369 }
231 </pre></div>
232 <p>
233     </td>
234   </tr>
235 </table>
236 <a class="anchor" name="_7EServer_28_29"></a><!-- doxytag: member="Server::~Server" ref="_7EServer_28_29" args="()" --><p>
237 <table class="mdTable" cellpadding="2" cellspacing="0">
238   <tr>
239     <td class="mdRow">
240       <table cellpadding="0" cellspacing="0" border="0">
241         <tr>
242           <td class="md" nowrap valign="top">Server::~Server           </td>
243           <td class="md" valign="top">(&nbsp;</td>
244           <td class="mdname1" valign="top" nowrap>          </td>
245           <td class="md" valign="top">&nbsp;)&nbsp;</td>
246           <td class="md" nowrap><code> [virtual]</code></td>
247         </tr>
248       </table>
249     </td>
250   </tr>
251 </table>
252 <table cellspacing="5" cellpadding="0" border="0">
253   <tr>
254     <td>
255       &nbsp;
256     </td>
257     <td>
258
259 <p>
260 Default destructor. 
261 <p>
262 Destroys a Server object.
263 <p>
264 Definition at line <a class="el" href="modules_8cpp-source.html#l00371">371</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00372"></a>00372 {
265 <a name="l00373"></a>00373 }
266 </pre></div>
267 <p>
268     </td>
269   </tr>
270 </table>
271 <hr><h2>Member Function Documentation</h2>
272 <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>
273 <table class="mdTable" cellpadding="2" cellspacing="0">
274   <tr>
275     <td class="mdRow">
276       <table cellpadding="0" cellspacing="0" border="0">
277         <tr>
278           <td class="md" nowrap valign="top">void Server::AddCommand           </td>
279           <td class="md" valign="top">(&nbsp;</td>
280           <td class="md" nowrap valign="top">char *&nbsp;</td>
281           <td class="mdname" nowrap> <em>cmd</em>, </td>
282         </tr>
283         <tr>
284           <td class="md" nowrap align="right"></td>
285           <td class="md"></td>
286           <td class="md" nowrap>handlerfunc&nbsp;</td>
287           <td class="mdname" nowrap> <em>f</em>, </td>
288         </tr>
289         <tr>
290           <td class="md" nowrap align="right"></td>
291           <td class="md"></td>
292           <td class="md" nowrap>char&nbsp;</td>
293           <td class="mdname" nowrap> <em>flags</em>, </td>
294         </tr>
295         <tr>
296           <td class="md" nowrap align="right"></td>
297           <td class="md"></td>
298           <td class="md" nowrap>int&nbsp;</td>
299           <td class="mdname" nowrap> <em>minparams</em>, </td>
300         </tr>
301         <tr>
302           <td class="md" nowrap align="right"></td>
303           <td class="md"></td>
304           <td class="md" nowrap>char *&nbsp;</td>
305           <td class="mdname" nowrap> <em>source</em></td>
306         </tr>
307         <tr>
308           <td class="md"></td>
309           <td class="md">)&nbsp;</td>
310           <td class="md" colspan="2"><code> [virtual]</code></td>
311         </tr>
312       </table>
313     </td>
314   </tr>
315 </table>
316 <table cellspacing="5" cellpadding="0" border="0">
317   <tr>
318     <td>
319       &nbsp;
320     </td>
321     <td>
322
323 <p>
324 Adds a command to the command table. 
325 <p>
326 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>
327 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>
328 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.
329 <p>
330 Definition at line <a class="el" href="modules_8cpp-source.html#l00457">457</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
331 <p>
332 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="l00458"></a>00458 {
333 <a name="l00459"></a>00459         <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);
334 <a name="l00460"></a>00460 }
335 </pre></div>
336 <p>
337     </td>
338   </tr>
339 </table>
340 <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>
341 <table class="mdTable" cellpadding="2" cellspacing="0">
342   <tr>
343     <td class="mdRow">
344       <table cellpadding="0" cellspacing="0" border="0">
345         <tr>
346           <td class="md" nowrap valign="top">void Server::AddELine           </td>
347           <td class="md" valign="top">(&nbsp;</td>
348           <td class="md" nowrap valign="top">long&nbsp;</td>
349           <td class="mdname" nowrap> <em>duration</em>, </td>
350         </tr>
351         <tr>
352           <td class="md" nowrap align="right"></td>
353           <td class="md"></td>
354           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
355           <td class="mdname" nowrap> <em>source</em>, </td>
356         </tr>
357         <tr>
358           <td class="md" nowrap align="right"></td>
359           <td class="md"></td>
360           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
361           <td class="mdname" nowrap> <em>reason</em>, </td>
362         </tr>
363         <tr>
364           <td class="md" nowrap align="right"></td>
365           <td class="md"></td>
366           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
367           <td class="mdname" nowrap> <em>hostmask</em></td>
368         </tr>
369         <tr>
370           <td class="md"></td>
371           <td class="md">)&nbsp;</td>
372           <td class="md" colspan="2"><code> [virtual]</code></td>
373         </tr>
374       </table>
375     </td>
376   </tr>
377 </table>
378 <table cellspacing="5" cellpadding="0" border="0">
379   <tr>
380     <td>
381       &nbsp;
382     </td>
383     <td>
384
385 <p>
386 Adds a E-line The E-line is enforced as soon as it is added. 
387 <p>
388 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.
389 <p>
390 Definition at line <a class="el" href="modules_8cpp-source.html#l00720">720</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
391 <p>
392 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="l00721"></a>00721 {
393 <a name="l00722"></a>00722         <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());
394 <a name="l00723"></a>00723 }
395 </pre></div>
396 <p>
397     </td>
398   </tr>
399 </table>
400 <a class="anchor" name="AddExtendedListMode_28char_20modechar_29"></a><!-- doxytag: member="Server::AddExtendedListMode" ref="AddExtendedListMode_28char_20modechar_29" args="(char modechar)" --><p>
401 <table class="mdTable" cellpadding="2" cellspacing="0">
402   <tr>
403     <td class="mdRow">
404       <table cellpadding="0" cellspacing="0" border="0">
405         <tr>
406           <td class="md" nowrap valign="top">bool Server::AddExtendedListMode           </td>
407           <td class="md" valign="top">(&nbsp;</td>
408           <td class="md" nowrap valign="top">char&nbsp;</td>
409           <td class="mdname1" valign="top" nowrap> <em>modechar</em>          </td>
410           <td class="md" valign="top">&nbsp;)&nbsp;</td>
411           <td class="md" nowrap><code> [virtual]</code></td>
412         </tr>
413       </table>
414     </td>
415   </tr>
416 </table>
417 <table cellspacing="5" cellpadding="0" border="0">
418   <tr>
419     <td>
420       &nbsp;
421     </td>
422     <td>
423
424 <p>
425 Adds an extended mode letter which is parsed by a module and handled in a list fashion. 
426 <p>
427 This call is used to implement modes like +q and +a. The characteristics of these modes are as follows:<p>
428 (1) They are ALWAYS on channels, not on users, therefore their type is MT_CHANNEL<p>
429 (2) They always take exactly one parameter when being added or removed<p>
430 (3) They can be set multiple times, usually on users in channels<p>
431 (4) The mode and its parameter are NOT stored in the channels modes structure<p>
432 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.
433 <p>
434 Definition at line <a class="el" href="modules_8cpp-source.html#l00625">625</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
435 <p>
436 References <a class="el" href="modules_8cpp-source.html#l00221">DoAddExtendedMode()</a>, <a class="el" href="modules_8cpp-source.html#l00231">ModeMakeList()</a>, and <a class="el" href="modules_8h-source.html#l00031">MT_CHANNEL</a>.<div class="fragment"><pre class="fragment"><a name="l00626"></a>00626 {
437 <a name="l00627"></a>00627         <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);
438 <a name="l00628"></a>00628         <span class="keywordflow">if</span> (res)
439 <a name="l00629"></a>00629                 <a class="code" href="modules_8cpp.html#ModeMakeList_28char_20modechar_29">ModeMakeList</a>(modechar);
440 <a name="l00630"></a>00630         <span class="keywordflow">return</span> res;
441 <a name="l00631"></a>00631 }
442 </pre></div>
443 <p>
444     </td>
445   </tr>
446 </table>
447 <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>
448 <table class="mdTable" cellpadding="2" cellspacing="0">
449   <tr>
450     <td class="mdRow">
451       <table cellpadding="0" cellspacing="0" border="0">
452         <tr>
453           <td class="md" nowrap valign="top">bool Server::AddExtendedMode           </td>
454           <td class="md" valign="top">(&nbsp;</td>
455           <td class="md" nowrap valign="top">char&nbsp;</td>
456           <td class="mdname" nowrap> <em>modechar</em>, </td>
457         </tr>
458         <tr>
459           <td class="md" nowrap align="right"></td>
460           <td class="md"></td>
461           <td class="md" nowrap>int&nbsp;</td>
462           <td class="mdname" nowrap> <em>type</em>, </td>
463         </tr>
464         <tr>
465           <td class="md" nowrap align="right"></td>
466           <td class="md"></td>
467           <td class="md" nowrap>bool&nbsp;</td>
468           <td class="mdname" nowrap> <em>requires_oper</em>, </td>
469         </tr>
470         <tr>
471           <td class="md" nowrap align="right"></td>
472           <td class="md"></td>
473           <td class="md" nowrap>int&nbsp;</td>
474           <td class="mdname" nowrap> <em>params_when_on</em>, </td>
475         </tr>
476         <tr>
477           <td class="md" nowrap align="right"></td>
478           <td class="md"></td>
479           <td class="md" nowrap>int&nbsp;</td>
480           <td class="mdname" nowrap> <em>params_when_off</em></td>
481         </tr>
482         <tr>
483           <td class="md"></td>
484           <td class="md">)&nbsp;</td>
485           <td class="md" colspan="2"><code> [virtual]</code></td>
486         </tr>
487       </table>
488     </td>
489   </tr>
490 </table>
491 <table cellspacing="5" cellpadding="0" border="0">
492   <tr>
493     <td>
494       &nbsp;
495     </td>
496     <td>
497
498 <p>
499 Adds an extended mode letter which is parsed by a module. 
500 <p>
501 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.
502 <p>
503 Definition at line <a class="el" href="modules_8cpp-source.html#l00597">597</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
504 <p>
505 References <a class="el" href="modules_8h-source.html#l00023">DEBUG</a>, <a class="el" href="modules_8cpp-source.html#l00221">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="l00598"></a>00598 {
506 <a name="l00599"></a>00599         <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>)))
507 <a name="l00600"></a>00600         {
508 <a name="l00601"></a>00601                 <span class="keywordflow">if</span> (type == <a class="code" href="modules_8h.html#MT_5FSERVER">MT_SERVER</a>)
509 <a name="l00602"></a>00602                 {
510 <a name="l00603"></a>00603                         log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"</span>);
511 <a name="l00604"></a>00604                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
512 <a name="l00605"></a>00605                 }
513 <a name="l00606"></a>00606                 <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>))
514 <a name="l00607"></a>00607                 {
515 <a name="l00608"></a>00608                         log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"</span>);
516 <a name="l00609"></a>00609                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
517 <a name="l00610"></a>00610                 }
518 <a name="l00611"></a>00611                 <span class="keywordflow">if</span> ((params_when_on&gt;1) || (params_when_off&gt;1))
519 <a name="l00612"></a>00612                 {
520 <a name="l00613"></a>00613                         log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"</span>);
521 <a name="l00614"></a>00614                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
522 <a name="l00615"></a>00615                 }
523 <a name="l00616"></a>00616                 <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);
524 <a name="l00617"></a>00617         }
525 <a name="l00618"></a>00618         <span class="keywordflow">else</span>
526 <a name="l00619"></a>00619         {
527 <a name="l00620"></a>00620                 log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"*** API ERROR *** Muppet modechar detected."</span>);
528 <a name="l00621"></a>00621         }
529 <a name="l00622"></a>00622         <span class="keywordflow">return</span> <span class="keyword">false</span>;
530 <a name="l00623"></a>00623 }
531 </pre></div>
532 <p>
533     </td>
534   </tr>
535 </table>
536 <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>
537 <table class="mdTable" cellpadding="2" cellspacing="0">
538   <tr>
539     <td class="mdRow">
540       <table cellpadding="0" cellspacing="0" border="0">
541         <tr>
542           <td class="md" nowrap valign="top">void Server::AddGLine           </td>
543           <td class="md" valign="top">(&nbsp;</td>
544           <td class="md" nowrap valign="top">long&nbsp;</td>
545           <td class="mdname" nowrap> <em>duration</em>, </td>
546         </tr>
547         <tr>
548           <td class="md" nowrap align="right"></td>
549           <td class="md"></td>
550           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
551           <td class="mdname" nowrap> <em>source</em>, </td>
552         </tr>
553         <tr>
554           <td class="md" nowrap align="right"></td>
555           <td class="md"></td>
556           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
557           <td class="mdname" nowrap> <em>reason</em>, </td>
558         </tr>
559         <tr>
560           <td class="md" nowrap align="right"></td>
561           <td class="md"></td>
562           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
563           <td class="mdname" nowrap> <em>hostmask</em></td>
564         </tr>
565         <tr>
566           <td class="md"></td>
567           <td class="md">)&nbsp;</td>
568           <td class="md" colspan="2"><code> [virtual]</code></td>
569         </tr>
570       </table>
571     </td>
572   </tr>
573 </table>
574 <table cellspacing="5" cellpadding="0" border="0">
575   <tr>
576     <td>
577       &nbsp;
578     </td>
579     <td>
580
581 <p>
582 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. 
583 <p>
584 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.
585 <p>
586 Definition at line <a class="el" href="modules_8cpp-source.html#l00700">700</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
587 <p>
588 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="l00701"></a>00701 {
589 <a name="l00702"></a>00702         <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());
590 <a name="l00703"></a>00703 }
591 </pre></div>
592 <p>
593     </td>
594   </tr>
595 </table>
596 <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>
597 <table class="mdTable" cellpadding="2" cellspacing="0">
598   <tr>
599     <td class="mdRow">
600       <table cellpadding="0" cellspacing="0" border="0">
601         <tr>
602           <td class="md" nowrap valign="top">void Server::AddKLine           </td>
603           <td class="md" valign="top">(&nbsp;</td>
604           <td class="md" nowrap valign="top">long&nbsp;</td>
605           <td class="mdname" nowrap> <em>duration</em>, </td>
606         </tr>
607         <tr>
608           <td class="md" nowrap align="right"></td>
609           <td class="md"></td>
610           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
611           <td class="mdname" nowrap> <em>source</em>, </td>
612         </tr>
613         <tr>
614           <td class="md" nowrap align="right"></td>
615           <td class="md"></td>
616           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
617           <td class="mdname" nowrap> <em>reason</em>, </td>
618         </tr>
619         <tr>
620           <td class="md" nowrap align="right"></td>
621           <td class="md"></td>
622           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
623           <td class="mdname" nowrap> <em>hostmask</em></td>
624         </tr>
625         <tr>
626           <td class="md"></td>
627           <td class="md">)&nbsp;</td>
628           <td class="md" colspan="2"><code> [virtual]</code></td>
629         </tr>
630       </table>
631     </td>
632   </tr>
633 </table>
634 <table cellspacing="5" cellpadding="0" border="0">
635   <tr>
636     <td>
637       &nbsp;
638     </td>
639     <td>
640
641 <p>
642 Adds a K-line The K-line is enforced as soon as it is added. 
643 <p>
644 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.
645 <p>
646 Definition at line <a class="el" href="modules_8cpp-source.html#l00715">715</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
647 <p>
648 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="l00716"></a>00716 {
649 <a name="l00717"></a>00717         <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());
650 <a name="l00718"></a>00718 }
651 </pre></div>
652 <p>
653     </td>
654   </tr>
655 </table>
656 <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>
657 <table class="mdTable" cellpadding="2" cellspacing="0">
658   <tr>
659     <td class="mdRow">
660       <table cellpadding="0" cellspacing="0" border="0">
661         <tr>
662           <td class="md" nowrap valign="top">void Server::AddQLine           </td>
663           <td class="md" valign="top">(&nbsp;</td>
664           <td class="md" nowrap valign="top">long&nbsp;</td>
665           <td class="mdname" nowrap> <em>duration</em>, </td>
666         </tr>
667         <tr>
668           <td class="md" nowrap align="right"></td>
669           <td class="md"></td>
670           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
671           <td class="mdname" nowrap> <em>source</em>, </td>
672         </tr>
673         <tr>
674           <td class="md" nowrap align="right"></td>
675           <td class="md"></td>
676           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
677           <td class="mdname" nowrap> <em>reason</em>, </td>
678         </tr>
679         <tr>
680           <td class="md" nowrap align="right"></td>
681           <td class="md"></td>
682           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
683           <td class="mdname" nowrap> <em>nickname</em></td>
684         </tr>
685         <tr>
686           <td class="md"></td>
687           <td class="md">)&nbsp;</td>
688           <td class="md" colspan="2"><code> [virtual]</code></td>
689         </tr>
690       </table>
691     </td>
692   </tr>
693 </table>
694 <table cellspacing="5" cellpadding="0" border="0">
695   <tr>
696     <td>
697       &nbsp;
698     </td>
699     <td>
700
701 <p>
702 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. 
703 <p>
704 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.
705 <p>
706 Definition at line <a class="el" href="modules_8cpp-source.html#l00705">705</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
707 <p>
708 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="l00706"></a>00706 {
709 <a name="l00707"></a>00707         <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());
710 <a name="l00708"></a>00708 }
711 </pre></div>
712 <p>
713     </td>
714   </tr>
715 </table>
716 <a class="anchor" name="AddSocket_28InspSocket_20_2Asock_29"></a><!-- doxytag: member="Server::AddSocket" ref="AddSocket_28InspSocket_20_2Asock_29" args="(InspSocket *sock)" --><p>
717 <table class="mdTable" cellpadding="2" cellspacing="0">
718   <tr>
719     <td class="mdRow">
720       <table cellpadding="0" cellspacing="0" border="0">
721         <tr>
722           <td class="md" nowrap valign="top">void Server::AddSocket           </td>
723           <td class="md" valign="top">(&nbsp;</td>
724           <td class="md" nowrap valign="top"><a class="el" href="classInspSocket.html">InspSocket</a> *&nbsp;</td>
725           <td class="mdname1" valign="top" nowrap> <em>sock</em>          </td>
726           <td class="md" valign="top">&nbsp;)&nbsp;</td>
727           <td class="md" nowrap><code> [virtual]</code></td>
728         </tr>
729       </table>
730     </td>
731   </tr>
732 </table>
733 <table cellspacing="5" cellpadding="0" border="0">
734   <tr>
735     <td>
736       &nbsp;
737     </td>
738     <td>
739
740 <p>
741 Adds a class derived from <a class="el" href="classInspSocket.html">InspSocket</a> to the server's socket engine. 
742 <p>
743
744 <p>
745 Definition at line <a class="el" href="modules_8cpp-source.html#l00375">375</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
746 <p>
747 References <a class="el" href="modules_8cpp.html#module_5Fsockets">module_sockets</a>.<div class="fragment"><pre class="fragment"><a name="l00376"></a>00376 {
748 <a name="l00377"></a>00377         <a class="code" href="modules_8cpp.html#module_5Fsockets">module_sockets</a>.push_back(sock);
749 <a name="l00378"></a>00378 }
750 </pre></div>
751 <p>
752     </td>
753   </tr>
754 </table>
755 <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>
756 <table class="mdTable" cellpadding="2" cellspacing="0">
757   <tr>
758     <td class="mdRow">
759       <table cellpadding="0" cellspacing="0" border="0">
760         <tr>
761           <td class="md" nowrap valign="top">void Server::AddZLine           </td>
762           <td class="md" valign="top">(&nbsp;</td>
763           <td class="md" nowrap valign="top">long&nbsp;</td>
764           <td class="mdname" nowrap> <em>duration</em>, </td>
765         </tr>
766         <tr>
767           <td class="md" nowrap align="right"></td>
768           <td class="md"></td>
769           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
770           <td class="mdname" nowrap> <em>source</em>, </td>
771         </tr>
772         <tr>
773           <td class="md" nowrap align="right"></td>
774           <td class="md"></td>
775           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
776           <td class="mdname" nowrap> <em>reason</em>, </td>
777         </tr>
778         <tr>
779           <td class="md" nowrap align="right"></td>
780           <td class="md"></td>
781           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
782           <td class="mdname" nowrap> <em>ipaddr</em></td>
783         </tr>
784         <tr>
785           <td class="md"></td>
786           <td class="md">)&nbsp;</td>
787           <td class="md" colspan="2"><code> [virtual]</code></td>
788         </tr>
789       </table>
790     </td>
791   </tr>
792 </table>
793 <table cellspacing="5" cellpadding="0" border="0">
794   <tr>
795     <td>
796       &nbsp;
797     </td>
798     <td>
799
800 <p>
801 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. 
802 <p>
803 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.
804 <p>
805 Definition at line <a class="el" href="modules_8cpp-source.html#l00710">710</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
806 <p>
807 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="l00711"></a>00711 {
808 <a name="l00712"></a>00712         <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());
809 <a name="l00713"></a>00713 }
810 </pre></div>
811 <p>
812     </td>
813   </tr>
814 </table>
815 <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>
816 <table class="mdTable" cellpadding="2" cellspacing="0">
817   <tr>
818     <td class="mdRow">
819       <table cellpadding="0" cellspacing="0" border="0">
820         <tr>
821           <td class="md" nowrap valign="top">long Server::CalcDuration           </td>
822           <td class="md" valign="top">(&nbsp;</td>
823           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
824           <td class="mdname1" valign="top" nowrap> <em>duration</em>          </td>
825           <td class="md" valign="top">&nbsp;)&nbsp;</td>
826           <td class="md" nowrap><code> [virtual]</code></td>
827         </tr>
828       </table>
829     </td>
830   </tr>
831 </table>
832 <table cellspacing="5" cellpadding="0" border="0">
833   <tr>
834     <td>
835       &nbsp;
836     </td>
837     <td>
838
839 <p>
840 Calculates a duration This method will take a string containing a formatted duration (e.g. 
841 <p>
842 "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.
843 <p>
844 Definition at line <a class="el" href="modules_8cpp-source.html#l00750">750</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
845 <p>
846 References <a class="el" href="commands_8h.html#duration_28const_20char_20_2Astr_29">duration()</a>.<div class="fragment"><pre class="fragment"><a name="l00751"></a>00751 {
847 <a name="l00752"></a>00752         <span class="keywordflow">return</span> <a class="code" href="commands_8h.html#duration_28const_20char_20_2Astr_29">duration</a>(delta.c_str());
848 <a name="l00753"></a>00753 }
849 </pre></div>
850 <p>
851     </td>
852   </tr>
853 </table>
854 <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>
855 <table class="mdTable" cellpadding="2" cellspacing="0">
856   <tr>
857     <td class="mdRow">
858       <table cellpadding="0" cellspacing="0" border="0">
859         <tr>
860           <td class="md" nowrap valign="top">void Server::CallCommandHandler           </td>
861           <td class="md" valign="top">(&nbsp;</td>
862           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
863           <td class="mdname" nowrap> <em>commandname</em>, </td>
864         </tr>
865         <tr>
866           <td class="md" nowrap align="right"></td>
867           <td class="md"></td>
868           <td class="md" nowrap>char **&nbsp;</td>
869           <td class="mdname" nowrap> <em>parameters</em>, </td>
870         </tr>
871         <tr>
872           <td class="md" nowrap align="right"></td>
873           <td class="md"></td>
874           <td class="md" nowrap>int&nbsp;</td>
875           <td class="mdname" nowrap> <em>pcnt</em>, </td>
876         </tr>
877         <tr>
878           <td class="md" nowrap align="right"></td>
879           <td class="md"></td>
880           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
881           <td class="mdname" nowrap> <em>user</em></td>
882         </tr>
883         <tr>
884           <td class="md"></td>
885           <td class="md">)&nbsp;</td>
886           <td class="md" colspan="2"><code> [virtual]</code></td>
887         </tr>
888       </table>
889     </td>
890   </tr>
891 </table>
892 <table cellspacing="5" cellpadding="0" border="0">
893   <tr>
894     <td>
895       &nbsp;
896     </td>
897     <td>
898
899 <p>
900 Calls the handler for a command, either implemented by the core or by another module. 
901 <p>
902 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>
903 ) 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.
904 <p>
905 Definition at line <a class="el" href="modules_8cpp-source.html#l00447">447</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00448"></a>00448 {
906 <a name="l00449"></a>00449         call_handler(commandname.c_str(),parameters,pcnt,user);
907 <a name="l00450"></a>00450 }
908 </pre></div>
909 <p>
910     </td>
911   </tr>
912 </table>
913 <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>
914 <table class="mdTable" cellpadding="2" cellspacing="0">
915   <tr>
916     <td class="mdRow">
917       <table cellpadding="0" cellspacing="0" border="0">
918         <tr>
919           <td class="md" nowrap valign="top">void Server::ChangeGECOS           </td>
920           <td class="md" valign="top">(&nbsp;</td>
921           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
922           <td class="mdname" nowrap> <em>user</em>, </td>
923         </tr>
924         <tr>
925           <td class="md" nowrap align="right"></td>
926           <td class="md"></td>
927           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
928           <td class="mdname" nowrap> <em>gecos</em></td>
929         </tr>
930         <tr>
931           <td class="md"></td>
932           <td class="md">)&nbsp;</td>
933           <td class="md" colspan="2"><code> [virtual]</code></td>
934         </tr>
935       </table>
936     </td>
937   </tr>
938 </table>
939 <table cellspacing="5" cellpadding="0" border="0">
940   <tr>
941     <td>
942       &nbsp;
943     </td>
944     <td>
945
946 <p>
947 Change GECOS (fullname) of a user. 
948 <p>
949 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.
950 <p>
951 Definition at line <a class="el" href="modules_8cpp-source.html#l00540">540</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
952 <p>
953 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="l00541"></a>00541 {
954 <a name="l00542"></a>00542         <a class="code" href="message_8h.html#ChangeName_28userrec_20_2Auser_2C_20const_20char_20_2Agecos_29">ChangeName</a>(user,gecos.c_str());
955 <a name="l00543"></a>00543 }
956 </pre></div>
957 <p>
958     </td>
959   </tr>
960 </table>
961 <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>
962 <table class="mdTable" cellpadding="2" cellspacing="0">
963   <tr>
964     <td class="mdRow">
965       <table cellpadding="0" cellspacing="0" border="0">
966         <tr>
967           <td class="md" nowrap valign="top">void Server::ChangeHost           </td>
968           <td class="md" valign="top">(&nbsp;</td>
969           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
970           <td class="mdname" nowrap> <em>user</em>, </td>
971         </tr>
972         <tr>
973           <td class="md" nowrap align="right"></td>
974           <td class="md"></td>
975           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
976           <td class="mdname" nowrap> <em>host</em></td>
977         </tr>
978         <tr>
979           <td class="md"></td>
980           <td class="md">)&nbsp;</td>
981           <td class="md" colspan="2"><code> [virtual]</code></td>
982         </tr>
983       </table>
984     </td>
985   </tr>
986 </table>
987 <table cellspacing="5" cellpadding="0" border="0">
988   <tr>
989     <td>
990       &nbsp;
991     </td>
992     <td>
993
994 <p>
995 Change displayed hostname of a user. 
996 <p>
997 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.
998 <p>
999 Definition at line <a class="el" href="modules_8cpp-source.html#l00535">535</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1000 <p>
1001 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="l00536"></a>00536 {
1002 <a name="l00537"></a>00537         <a class="code" href="message_8h.html#ChangeDisplayedHost_28userrec_20_2Auser_2C_20const_20char_20_2Ahost_29">ChangeDisplayedHost</a>(user,host.c_str());
1003 <a name="l00538"></a>00538 }
1004 </pre></div>
1005 <p>
1006     </td>
1007   </tr>
1008 </table>
1009 <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>
1010 <table class="mdTable" cellpadding="2" cellspacing="0">
1011   <tr>
1012     <td class="mdRow">
1013       <table cellpadding="0" cellspacing="0" border="0">
1014         <tr>
1015           <td class="md" nowrap valign="top">void Server::ChangeUserNick           </td>
1016           <td class="md" valign="top">(&nbsp;</td>
1017           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1018           <td class="mdname" nowrap> <em>user</em>, </td>
1019         </tr>
1020         <tr>
1021           <td class="md" nowrap align="right"></td>
1022           <td class="md"></td>
1023           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1024           <td class="mdname" nowrap> <em>nickname</em></td>
1025         </tr>
1026         <tr>
1027           <td class="md"></td>
1028           <td class="md">)&nbsp;</td>
1029           <td class="md" colspan="2"><code> [virtual]</code></td>
1030         </tr>
1031       </table>
1032     </td>
1033   </tr>
1034 </table>
1035 <table cellspacing="5" cellpadding="0" border="0">
1036   <tr>
1037     <td>
1038       &nbsp;
1039     </td>
1040     <td>
1041
1042 <p>
1043 Forces a user nickchange. 
1044 <p>
1045 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.
1046 <p>
1047 Definition at line <a class="el" href="modules_8cpp-source.html#l00432">432</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00433"></a>00433 {
1048 <a name="l00434"></a>00434         force_nickchange(user,nickname.c_str());
1049 <a name="l00435"></a>00435 }
1050 </pre></div>
1051 <p>
1052     </td>
1053   </tr>
1054 </table>
1055 <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>
1056 <table class="mdTable" cellpadding="2" cellspacing="0">
1057   <tr>
1058     <td class="mdRow">
1059       <table cellpadding="0" cellspacing="0" border="0">
1060         <tr>
1061           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> Server::ChanMode           </td>
1062           <td class="md" valign="top">(&nbsp;</td>
1063           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1064           <td class="mdname" nowrap> <em>User</em>, </td>
1065         </tr>
1066         <tr>
1067           <td class="md" nowrap align="right"></td>
1068           <td class="md"></td>
1069           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1070           <td class="mdname" nowrap> <em>Chan</em></td>
1071         </tr>
1072         <tr>
1073           <td class="md"></td>
1074           <td class="md">)&nbsp;</td>
1075           <td class="md" colspan="2"><code> [virtual]</code></td>
1076         </tr>
1077       </table>
1078     </td>
1079   </tr>
1080 </table>
1081 <table cellspacing="5" cellpadding="0" border="0">
1082   <tr>
1083     <td>
1084       &nbsp;
1085     </td>
1086     <td>
1087
1088 <p>
1089 Attempts to look up a user's privilages on a channel. 
1090 <p>
1091 This function will return a string containing either @, %, +, or an empty string, representing the user's privilages upon the channel you specify.
1092 <p>
1093 Definition at line <a class="el" href="modules_8cpp-source.html#l00565">565</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1094 <p>
1095 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="l00566"></a>00566 {
1096 <a name="l00567"></a>00567         <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);
1097 <a name="l00568"></a>00568 }
1098 </pre></div>
1099 <p>
1100     </td>
1101   </tr>
1102 </table>
1103 <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>
1104 <table class="mdTable" cellpadding="2" cellspacing="0">
1105   <tr>
1106     <td class="mdRow">
1107       <table cellpadding="0" cellspacing="0" border="0">
1108         <tr>
1109           <td class="md" nowrap valign="top">bool Server::CommonChannels           </td>
1110           <td class="md" valign="top">(&nbsp;</td>
1111           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1112           <td class="mdname" nowrap> <em>u1</em>, </td>
1113         </tr>
1114         <tr>
1115           <td class="md" nowrap align="right"></td>
1116           <td class="md"></td>
1117           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1118           <td class="mdname" nowrap> <em>u2</em></td>
1119         </tr>
1120         <tr>
1121           <td class="md"></td>
1122           <td class="md">)&nbsp;</td>
1123           <td class="md" colspan="2"><code> [virtual]</code></td>
1124         </tr>
1125       </table>
1126     </td>
1127   </tr>
1128 </table>
1129 <table cellspacing="5" cellpadding="0" border="0">
1130   <tr>
1131     <td>
1132       &nbsp;
1133     </td>
1134     <td>
1135
1136 <p>
1137 Returns true if two users share a common channel. 
1138 <p>
1139 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.
1140 <p>
1141 Definition at line <a class="el" href="modules_8cpp-source.html#l00513">513</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1142 <p>
1143 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="l00514"></a>00514 {
1144 <a name="l00515"></a>00515         <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);
1145 <a name="l00516"></a>00516 }
1146 </pre></div>
1147 <p>
1148     </td>
1149   </tr>
1150 </table>
1151 <a class="anchor" name="CountUsers_28chanrec_20_2Ac_29"></a><!-- doxytag: member="Server::CountUsers" ref="CountUsers_28chanrec_20_2Ac_29" args="(chanrec *c)" --><p>
1152 <table class="mdTable" cellpadding="2" cellspacing="0">
1153   <tr>
1154     <td class="mdRow">
1155       <table cellpadding="0" cellspacing="0" border="0">
1156         <tr>
1157           <td class="md" nowrap valign="top">int Server::CountUsers           </td>
1158           <td class="md" valign="top">(&nbsp;</td>
1159           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1160           <td class="mdname1" valign="top" nowrap> <em>c</em>          </td>
1161           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1162           <td class="md" nowrap><code> [virtual]</code></td>
1163         </tr>
1164       </table>
1165     </td>
1166   </tr>
1167 </table>
1168 <table cellspacing="5" cellpadding="0" border="0">
1169   <tr>
1170     <td>
1171       &nbsp;
1172     </td>
1173     <td>
1174
1175 <p>
1176 Returns a count of the number of users on a channel. 
1177 <p>
1178 This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel.
1179 <p>
1180 Definition at line <a class="el" href="modules_8cpp-source.html#l00633">633</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00634"></a>00634 {
1181 <a name="l00635"></a>00635         <span class="keywordflow">return</span> usercount(c);
1182 <a name="l00636"></a>00636 }
1183 </pre></div>
1184 <p>
1185     </td>
1186   </tr>
1187 </table>
1188 <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>
1189 <table class="mdTable" cellpadding="2" cellspacing="0">
1190   <tr>
1191     <td class="mdRow">
1192       <table cellpadding="0" cellspacing="0" border="0">
1193         <tr>
1194           <td class="md" nowrap valign="top">bool Server::DelELine           </td>
1195           <td class="md" valign="top">(&nbsp;</td>
1196           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1197           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1198           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1199           <td class="md" nowrap><code> [virtual]</code></td>
1200         </tr>
1201       </table>
1202     </td>
1203   </tr>
1204 </table>
1205 <table cellspacing="5" cellpadding="0" border="0">
1206   <tr>
1207     <td>
1208       &nbsp;
1209     </td>
1210     <td>
1211
1212 <p>
1213 Deletes a local E-Line. 
1214 <p>
1215
1216 <p>
1217 Definition at line <a class="el" href="modules_8cpp-source.html#l00745">745</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1218 <p>
1219 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="l00746"></a>00746 {
1220 <a name="l00747"></a>00747         <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());
1221 <a name="l00748"></a>00748 }
1222 </pre></div>
1223 <p>
1224     </td>
1225   </tr>
1226 </table>
1227 <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>
1228 <table class="mdTable" cellpadding="2" cellspacing="0">
1229   <tr>
1230     <td class="mdRow">
1231       <table cellpadding="0" cellspacing="0" border="0">
1232         <tr>
1233           <td class="md" nowrap valign="top">bool Server::DelGLine           </td>
1234           <td class="md" valign="top">(&nbsp;</td>
1235           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1236           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1237           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1238           <td class="md" nowrap><code> [virtual]</code></td>
1239         </tr>
1240       </table>
1241     </td>
1242   </tr>
1243 </table>
1244 <table cellspacing="5" cellpadding="0" border="0">
1245   <tr>
1246     <td>
1247       &nbsp;
1248     </td>
1249     <td>
1250
1251 <p>
1252 Deletes a G-Line from all servers on the mesh. 
1253 <p>
1254
1255 <p>
1256 Definition at line <a class="el" href="modules_8cpp-source.html#l00725">725</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1257 <p>
1258 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="l00726"></a>00726 {
1259 <a name="l00727"></a>00727         <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());
1260 <a name="l00728"></a>00728 }
1261 </pre></div>
1262 <p>
1263     </td>
1264   </tr>
1265 </table>
1266 <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>
1267 <table class="mdTable" cellpadding="2" cellspacing="0">
1268   <tr>
1269     <td class="mdRow">
1270       <table cellpadding="0" cellspacing="0" border="0">
1271         <tr>
1272           <td class="md" nowrap valign="top">bool Server::DelKLine           </td>
1273           <td class="md" valign="top">(&nbsp;</td>
1274           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1275           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1276           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1277           <td class="md" nowrap><code> [virtual]</code></td>
1278         </tr>
1279       </table>
1280     </td>
1281   </tr>
1282 </table>
1283 <table cellspacing="5" cellpadding="0" border="0">
1284   <tr>
1285     <td>
1286       &nbsp;
1287     </td>
1288     <td>
1289
1290 <p>
1291 Deletes a local K-Line. 
1292 <p>
1293
1294 <p>
1295 Definition at line <a class="el" href="modules_8cpp-source.html#l00740">740</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1296 <p>
1297 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="l00741"></a>00741 {
1298 <a name="l00742"></a>00742         <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());
1299 <a name="l00743"></a>00743 }
1300 </pre></div>
1301 <p>
1302     </td>
1303   </tr>
1304 </table>
1305 <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>
1306 <table class="mdTable" cellpadding="2" cellspacing="0">
1307   <tr>
1308     <td class="mdRow">
1309       <table cellpadding="0" cellspacing="0" border="0">
1310         <tr>
1311           <td class="md" nowrap valign="top">bool Server::DelQLine           </td>
1312           <td class="md" valign="top">(&nbsp;</td>
1313           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1314           <td class="mdname1" valign="top" nowrap> <em>nickname</em>          </td>
1315           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1316           <td class="md" nowrap><code> [virtual]</code></td>
1317         </tr>
1318       </table>
1319     </td>
1320   </tr>
1321 </table>
1322 <table cellspacing="5" cellpadding="0" border="0">
1323   <tr>
1324     <td>
1325       &nbsp;
1326     </td>
1327     <td>
1328
1329 <p>
1330 Deletes a Q-Line from all servers on the mesh. 
1331 <p>
1332
1333 <p>
1334 Definition at line <a class="el" href="modules_8cpp-source.html#l00730">730</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1335 <p>
1336 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="l00731"></a>00731 {
1337 <a name="l00732"></a>00732         <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());
1338 <a name="l00733"></a>00733 }
1339 </pre></div>
1340 <p>
1341     </td>
1342   </tr>
1343 </table>
1344 <a class="anchor" name="DelSocket_28InspSocket_20_2Asock_29"></a><!-- doxytag: member="Server::DelSocket" ref="DelSocket_28InspSocket_20_2Asock_29" args="(InspSocket *sock)" --><p>
1345 <table class="mdTable" cellpadding="2" cellspacing="0">
1346   <tr>
1347     <td class="mdRow">
1348       <table cellpadding="0" cellspacing="0" border="0">
1349         <tr>
1350           <td class="md" nowrap valign="top">void Server::DelSocket           </td>
1351           <td class="md" valign="top">(&nbsp;</td>
1352           <td class="md" nowrap valign="top"><a class="el" href="classInspSocket.html">InspSocket</a> *&nbsp;</td>
1353           <td class="mdname1" valign="top" nowrap> <em>sock</em>          </td>
1354           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1355           <td class="md" nowrap><code> [virtual]</code></td>
1356         </tr>
1357       </table>
1358     </td>
1359   </tr>
1360 </table>
1361 <table cellspacing="5" cellpadding="0" border="0">
1362   <tr>
1363     <td>
1364       &nbsp;
1365     </td>
1366     <td>
1367
1368 <p>
1369 Deletes a class derived from <a class="el" href="classInspSocket.html">InspSocket</a> from the server's socket engine. 
1370 <p>
1371
1372 <p>
1373 Definition at line <a class="el" href="modules_8cpp-source.html#l00380">380</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1374 <p>
1375 References <a class="el" href="modules_8cpp.html#module_5Fsockets">module_sockets</a>.<div class="fragment"><pre class="fragment"><a name="l00381"></a>00381 {
1376 <a name="l00382"></a>00382         <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++)
1377 <a name="l00383"></a>00383         {
1378 <a name="l00384"></a>00384                 <span class="keywordflow">if</span> (*a == sock)
1379 <a name="l00385"></a>00385                 {
1380 <a name="l00386"></a>00386                         <a class="code" href="modules_8cpp.html#module_5Fsockets">module_sockets</a>.erase(a);
1381 <a name="l00387"></a>00387                         <span class="keywordflow">return</span>;
1382 <a name="l00388"></a>00388                 }
1383 <a name="l00389"></a>00389         }
1384 <a name="l00390"></a>00390 }
1385 </pre></div>
1386 <p>
1387     </td>
1388   </tr>
1389 </table>
1390 <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>
1391 <table class="mdTable" cellpadding="2" cellspacing="0">
1392   <tr>
1393     <td class="mdRow">
1394       <table cellpadding="0" cellspacing="0" border="0">
1395         <tr>
1396           <td class="md" nowrap valign="top">bool Server::DelZLine           </td>
1397           <td class="md" valign="top">(&nbsp;</td>
1398           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1399           <td class="mdname1" valign="top" nowrap> <em>ipaddr</em>          </td>
1400           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1401           <td class="md" nowrap><code> [virtual]</code></td>
1402         </tr>
1403       </table>
1404     </td>
1405   </tr>
1406 </table>
1407 <table cellspacing="5" cellpadding="0" border="0">
1408   <tr>
1409     <td>
1410       &nbsp;
1411     </td>
1412     <td>
1413
1414 <p>
1415 Deletes a Z-Line from all servers on the mesh. 
1416 <p>
1417
1418 <p>
1419 Definition at line <a class="el" href="modules_8cpp-source.html#l00735">735</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1420 <p>
1421 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="l00736"></a>00736 {
1422 <a name="l00737"></a>00737         <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());
1423 <a name="l00738"></a>00738 }
1424 </pre></div>
1425 <p>
1426     </td>
1427   </tr>
1428 </table>
1429 <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>
1430 <table class="mdTable" cellpadding="2" cellspacing="0">
1431   <tr>
1432     <td class="mdRow">
1433       <table cellpadding="0" cellspacing="0" border="0">
1434         <tr>
1435           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> * Server::FindChannel           </td>
1436           <td class="md" valign="top">(&nbsp;</td>
1437           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1438           <td class="mdname1" valign="top" nowrap> <em>channel</em>          </td>
1439           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1440           <td class="md" nowrap><code> [virtual]</code></td>
1441         </tr>
1442       </table>
1443     </td>
1444   </tr>
1445 </table>
1446 <table cellspacing="5" cellpadding="0" border="0">
1447   <tr>
1448     <td>
1449       &nbsp;
1450     </td>
1451     <td>
1452
1453 <p>
1454 Attempts to look up a channel and return a pointer to it. 
1455 <p>
1456 This function will return NULL if the channel does not exist.
1457 <p>
1458 Definition at line <a class="el" href="modules_8cpp-source.html#l00560">560</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00561"></a>00561 {
1459 <a name="l00562"></a>00562         <span class="keywordflow">return</span> FindChan(channel.c_str());
1460 <a name="l00563"></a>00563 }
1461 </pre></div>
1462 <p>
1463     </td>
1464   </tr>
1465 </table>
1466 <a class="anchor" name="FindDescriptor_28int_20socket_29"></a><!-- doxytag: member="Server::FindDescriptor" ref="FindDescriptor_28int_20socket_29" args="(int socket)" --><p>
1467 <table class="mdTable" cellpadding="2" cellspacing="0">
1468   <tr>
1469     <td class="mdRow">
1470       <table cellpadding="0" cellspacing="0" border="0">
1471         <tr>
1472           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * Server::FindDescriptor           </td>
1473           <td class="md" valign="top">(&nbsp;</td>
1474           <td class="md" nowrap valign="top">int&nbsp;</td>
1475           <td class="mdname1" valign="top" nowrap> <em>socket</em>          </td>
1476           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1477           <td class="md" nowrap><code> [virtual]</code></td>
1478         </tr>
1479       </table>
1480     </td>
1481   </tr>
1482 </table>
1483 <table cellspacing="5" cellpadding="0" border="0">
1484   <tr>
1485     <td>
1486       &nbsp;
1487     </td>
1488     <td>
1489
1490 <p>
1491 Attempts to look up a nick using the file descriptor associated with that nick. 
1492 <p>
1493 This function will return NULL if the file descriptor is not associated with a valid user.
1494 <p>
1495 Definition at line <a class="el" href="modules_8cpp-source.html#l00555">555</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00556"></a>00556 {
1496 <a name="l00557"></a>00557         <span class="keywordflow">return</span> (socket &lt; 65536 ? fd_ref_table[socket] : NULL);
1497 <a name="l00558"></a>00558 }
1498 </pre></div>
1499 <p>
1500     </td>
1501   </tr>
1502 </table>
1503 <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>
1504 <table class="mdTable" cellpadding="2" cellspacing="0">
1505   <tr>
1506     <td class="mdRow">
1507       <table cellpadding="0" cellspacing="0" border="0">
1508         <tr>
1509           <td class="md" nowrap valign="top"><a class="el" href="classModule.html">Module</a> * Server::FindModule           </td>
1510           <td class="md" valign="top">(&nbsp;</td>
1511           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1512           <td class="mdname1" valign="top" nowrap> <em>name</em>          </td>
1513           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1514           <td class="md" nowrap><code> [virtual]</code></td>
1515         </tr>
1516       </table>
1517     </td>
1518   </tr>
1519 </table>
1520 <table cellspacing="5" cellpadding="0" border="0">
1521   <tr>
1522     <td>
1523       &nbsp;
1524     </td>
1525     <td>
1526
1527 <p>
1528 This function finds a module by name. 
1529 <p>
1530 You must provide the filename of the module. If the module cannot be found (is not loaded) the function will return NULL.
1531 <p>
1532 Definition at line <a class="el" href="modules_8cpp-source.html#l00784">784</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1533 <p>
1534 References <a class="el" href="modules_8cpp-source.html#l00994">MODCOUNT</a>, <a class="el" href="channels_8cpp.html#module_5Fnames">module_names</a>, and <a class="el" href="channels_8cpp.html#modules">modules</a>.<div class="fragment"><pre class="fragment"><a name="l00785"></a>00785 {
1535 <a name="l00786"></a>00786         <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++)
1536 <a name="l00787"></a>00787         {
1537 <a name="l00788"></a>00788                 <span class="keywordflow">if</span> (module_names[i] == name)
1538 <a name="l00789"></a>00789                 {
1539 <a name="l00790"></a>00790                         <span class="keywordflow">return</span> <a class="code" href="channels_8cpp.html#modules">modules</a>[i];
1540 <a name="l00791"></a>00791                 }
1541 <a name="l00792"></a>00792         }
1542 <a name="l00793"></a>00793         <span class="keywordflow">return</span> NULL;
1543 <a name="l00794"></a>00794 }
1544 </pre></div>
1545 <p>
1546     </td>
1547   </tr>
1548 </table>
1549 <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>
1550 <table class="mdTable" cellpadding="2" cellspacing="0">
1551   <tr>
1552     <td class="mdRow">
1553       <table cellpadding="0" cellspacing="0" border="0">
1554         <tr>
1555           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * Server::FindNick           </td>
1556           <td class="md" valign="top">(&nbsp;</td>
1557           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1558           <td class="mdname1" valign="top" nowrap> <em>nick</em>          </td>
1559           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1560           <td class="md" nowrap><code> [virtual]</code></td>
1561         </tr>
1562       </table>
1563     </td>
1564   </tr>
1565 </table>
1566 <table cellspacing="5" cellpadding="0" border="0">
1567   <tr>
1568     <td>
1569       &nbsp;
1570     </td>
1571     <td>
1572
1573 <p>
1574 Attempts to look up a nick and return a pointer to it. 
1575 <p>
1576 This function will return NULL if the nick does not exist.
1577 <p>
1578 Definition at line <a class="el" href="modules_8cpp-source.html#l00550">550</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00551"></a>00551 {
1579 <a name="l00552"></a>00552         <span class="keywordflow">return</span> Find(nick);
1580 <a name="l00553"></a>00553 }
1581 </pre></div>
1582 <p>
1583     </td>
1584   </tr>
1585 </table>
1586 <a class="anchor" name="GetAdmin_28_29"></a><!-- doxytag: member="Server::GetAdmin" ref="GetAdmin_28_29" args="()" --><p>
1587 <table class="mdTable" cellpadding="2" cellspacing="0">
1588   <tr>
1589     <td class="mdRow">
1590       <table cellpadding="0" cellspacing="0" border="0">
1591         <tr>
1592           <td class="md" nowrap valign="top"><a class="el" href="classAdmin.html">Admin</a> Server::GetAdmin           </td>
1593           <td class="md" valign="top">(&nbsp;</td>
1594           <td class="mdname1" valign="top" nowrap>          </td>
1595           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1596           <td class="md" nowrap><code> [virtual]</code></td>
1597         </tr>
1598       </table>
1599     </td>
1600   </tr>
1601 </table>
1602 <table cellspacing="5" cellpadding="0" border="0">
1603   <tr>
1604     <td>
1605       &nbsp;
1606     </td>
1607     <td>
1608
1609 <p>
1610 Returns the information of the server as returned by the /ADMIN command. 
1611 <p>
1612 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.
1613 <p>
1614 Definition at line <a class="el" href="modules_8cpp-source.html#l00590">590</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00591"></a>00591 {
1615 <a name="l00592"></a>00592         <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick());
1616 <a name="l00593"></a>00593 }
1617 </pre></div>
1618 <p>
1619     </td>
1620   </tr>
1621 </table>
1622 <a class="anchor" name="GetNetworkName_28_29"></a><!-- doxytag: member="Server::GetNetworkName" ref="GetNetworkName_28_29" args="()" --><p>
1623 <table class="mdTable" cellpadding="2" cellspacing="0">
1624   <tr>
1625     <td class="mdRow">
1626       <table cellpadding="0" cellspacing="0" border="0">
1627         <tr>
1628           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> Server::GetNetworkName           </td>
1629           <td class="md" valign="top">(&nbsp;</td>
1630           <td class="mdname1" valign="top" nowrap>          </td>
1631           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1632           <td class="md" nowrap><code> [virtual]</code></td>
1633         </tr>
1634       </table>
1635     </td>
1636   </tr>
1637 </table>
1638 <table cellspacing="5" cellpadding="0" border="0">
1639   <tr>
1640     <td>
1641       &nbsp;
1642     </td>
1643     <td>
1644
1645 <p>
1646 Returns the network name, global to all linked servers. 
1647 <p>
1648
1649 <p>
1650 Definition at line <a class="el" href="modules_8cpp-source.html#l00580">580</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00581"></a>00581 {
1651 <a name="l00582"></a>00582         <span class="keywordflow">return</span> getnetworkname();
1652 <a name="l00583"></a>00583 }
1653 </pre></div>
1654 <p>
1655     </td>
1656   </tr>
1657 </table>
1658 <a class="anchor" name="GetServerDescription_28_29"></a><!-- doxytag: member="Server::GetServerDescription" ref="GetServerDescription_28_29" args="()" --><p>
1659 <table class="mdTable" cellpadding="2" cellspacing="0">
1660   <tr>
1661     <td class="mdRow">
1662       <table cellpadding="0" cellspacing="0" border="0">
1663         <tr>
1664           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> Server::GetServerDescription           </td>
1665           <td class="md" valign="top">(&nbsp;</td>
1666           <td class="mdname1" valign="top" nowrap>          </td>
1667           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1668           <td class="md" nowrap><code> [virtual]</code></td>
1669         </tr>
1670       </table>
1671     </td>
1672   </tr>
1673 </table>
1674 <table cellspacing="5" cellpadding="0" border="0">
1675   <tr>
1676     <td>
1677       &nbsp;
1678     </td>
1679     <td>
1680
1681 <p>
1682 Returns the server description string of the local server. 
1683 <p>
1684
1685 <p>
1686 Definition at line <a class="el" href="modules_8cpp-source.html#l00585">585</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00586"></a>00586 {
1687 <a name="l00587"></a>00587         <span class="keywordflow">return</span> getserverdesc();
1688 <a name="l00588"></a>00588 }
1689 </pre></div>
1690 <p>
1691     </td>
1692   </tr>
1693 </table>
1694 <a class="anchor" name="GetServerName_28_29"></a><!-- doxytag: member="Server::GetServerName" ref="GetServerName_28_29" args="()" --><p>
1695 <table class="mdTable" cellpadding="2" cellspacing="0">
1696   <tr>
1697     <td class="mdRow">
1698       <table cellpadding="0" cellspacing="0" border="0">
1699         <tr>
1700           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a> Server::GetServerName           </td>
1701           <td class="md" valign="top">(&nbsp;</td>
1702           <td class="mdname1" valign="top" nowrap>          </td>
1703           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1704           <td class="md" nowrap><code> [virtual]</code></td>
1705         </tr>
1706       </table>
1707     </td>
1708   </tr>
1709 </table>
1710 <table cellspacing="5" cellpadding="0" border="0">
1711   <tr>
1712     <td>
1713       &nbsp;
1714     </td>
1715     <td>
1716
1717 <p>
1718 Returns the server name of the server where the module is loaded. 
1719 <p>
1720
1721 <p>
1722 Definition at line <a class="el" href="modules_8cpp-source.html#l00575">575</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00576"></a>00576 {
1723 <a name="l00577"></a>00577         <span class="keywordflow">return</span> getservername();
1724 <a name="l00578"></a>00578 }
1725 </pre></div>
1726 <p>
1727     </td>
1728   </tr>
1729 </table>
1730 <a class="anchor" name="GetUsers_28chanrec_20_2Achan_29"></a><!-- doxytag: member="Server::GetUsers" ref="GetUsers_28chanrec_20_2Achan_29" args="(chanrec *chan)" --><p>
1731 <table class="mdTable" cellpadding="2" cellspacing="0">
1732   <tr>
1733     <td class="mdRow">
1734       <table cellpadding="0" cellspacing="0" border="0">
1735         <tr>
1736           <td class="md" nowrap valign="top"><a class="el" href="modules_8h.html#chanuserlist">chanuserlist</a> Server::GetUsers           </td>
1737           <td class="md" valign="top">(&nbsp;</td>
1738           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1739           <td class="mdname1" valign="top" nowrap> <em>chan</em>          </td>
1740           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1741           <td class="md" nowrap><code> [virtual]</code></td>
1742         </tr>
1743       </table>
1744     </td>
1745   </tr>
1746 </table>
1747 <table cellspacing="5" cellpadding="0" border="0">
1748   <tr>
1749     <td>
1750       &nbsp;
1751     </td>
1752     <td>
1753
1754 <p>
1755 Fetches the userlist of a channel. 
1756 <p>
1757 This function must be here and not a member of userrec or chanrec due to include constraints.
1758 <p>
1759 Definition at line <a class="el" href="modules_8cpp-source.html#l00420">420</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1760 <p>
1761 References <a class="el" href="channels_8cpp-source.html#l00215">chanrec::GetUsers()</a>, and <a class="el" href="channels_8cpp.html#list_5BMAXBUF_5D">list</a>.<div class="fragment"><pre class="fragment"><a name="l00421"></a>00421 {
1762 <a name="l00422"></a>00422         <a class="code" href="modules_8h.html#chanuserlist">chanuserlist</a> userl;
1763 <a name="l00423"></a>00423         userl.clear();
1764 <a name="l00424"></a>00424         std::vector&lt;char*&gt; *<a class="code" href="channels_8cpp.html#list_5BMAXBUF_5D">list</a> = chan-&gt;<a class="code" href="classchanrec.html#GetUsers_28_29">GetUsers</a>();
1765 <a name="l00425"></a>00425         <span class="keywordflow">for</span> (std::vector&lt;char*&gt;::iterator i = list-&gt;begin(); i != list-&gt;end(); i++)
1766 <a name="l00426"></a>00426         {
1767 <a name="l00427"></a>00427                 <span class="keywordtype">char</span>* o = *i;
1768 <a name="l00428"></a>00428                 userl.push_back((<a class="code" href="classuserrec.html">userrec</a>*)o);
1769 <a name="l00429"></a>00429         }
1770 <a name="l00430"></a>00430         <span class="keywordflow">return</span> userl;
1771 <a name="l00431"></a>00431 }
1772 </pre></div>
1773 <p>
1774     </td>
1775   </tr>
1776 </table>
1777 <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>
1778 <table class="mdTable" cellpadding="2" cellspacing="0">
1779   <tr>
1780     <td class="mdRow">
1781       <table cellpadding="0" cellspacing="0" border="0">
1782         <tr>
1783           <td class="md" nowrap valign="top">bool Server::IsNick           </td>
1784           <td class="md" valign="top">(&nbsp;</td>
1785           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1786           <td class="mdname1" valign="top" nowrap> <em>nick</em>          </td>
1787           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1788           <td class="md" nowrap><code> [virtual]</code></td>
1789         </tr>
1790       </table>
1791     </td>
1792   </tr>
1793 </table>
1794 <table cellspacing="5" cellpadding="0" border="0">
1795   <tr>
1796     <td>
1797       &nbsp;
1798     </td>
1799     <td>
1800
1801 <p>
1802 Returns true if a nick is valid. 
1803 <p>
1804 Nicks for unregistered connections will return false.
1805 <p>
1806 Definition at line <a class="el" href="modules_8cpp-source.html#l00545">545</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1807 <p>
1808 References <a class="el" href="message_8h.html#isnick_28const_20char_20_2An_29">isnick()</a>.<div class="fragment"><pre class="fragment"><a name="l00546"></a>00546 {
1809 <a name="l00547"></a>00547         <span class="keywordflow">return</span> (<a class="code" href="message_8h.html#isnick_28const_20char_20_2An_29">isnick</a>(nick.c_str()) != 0);
1810 <a name="l00548"></a>00548 }
1811 </pre></div>
1812 <p>
1813     </td>
1814   </tr>
1815 </table>
1816 <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>
1817 <table class="mdTable" cellpadding="2" cellspacing="0">
1818   <tr>
1819     <td class="mdRow">
1820       <table cellpadding="0" cellspacing="0" border="0">
1821         <tr>
1822           <td class="md" nowrap valign="top">bool Server::IsOnChannel           </td>
1823           <td class="md" valign="top">(&nbsp;</td>
1824           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1825           <td class="mdname" nowrap> <em>User</em>, </td>
1826         </tr>
1827         <tr>
1828           <td class="md" nowrap align="right"></td>
1829           <td class="md"></td>
1830           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1831           <td class="mdname" nowrap> <em>Chan</em></td>
1832         </tr>
1833         <tr>
1834           <td class="md"></td>
1835           <td class="md">)&nbsp;</td>
1836           <td class="md" colspan="2"><code> [virtual]</code></td>
1837         </tr>
1838       </table>
1839     </td>
1840   </tr>
1841 </table>
1842 <table cellspacing="5" cellpadding="0" border="0">
1843   <tr>
1844     <td>
1845       &nbsp;
1846     </td>
1847     <td>
1848
1849 <p>
1850 Checks if a user is on a channel. 
1851 <p>
1852 This function will return true or false to indicate if user 'User' is on channel 'Chan'.
1853 <p>
1854 Definition at line <a class="el" href="modules_8cpp-source.html#l00570">570</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1855 <p>
1856 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="l00571"></a>00571 {
1857 <a name="l00572"></a>00572         <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);
1858 <a name="l00573"></a>00573 }
1859 </pre></div>
1860 <p>
1861     </td>
1862   </tr>
1863 </table>
1864 <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>
1865 <table class="mdTable" cellpadding="2" cellspacing="0">
1866   <tr>
1867     <td class="mdRow">
1868       <table cellpadding="0" cellspacing="0" border="0">
1869         <tr>
1870           <td class="md" nowrap valign="top">bool Server::IsUlined           </td>
1871           <td class="md" valign="top">(&nbsp;</td>
1872           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1873           <td class="mdname1" valign="top" nowrap> <em>server</em>          </td>
1874           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1875           <td class="md" nowrap><code> [virtual]</code></td>
1876         </tr>
1877       </table>
1878     </td>
1879   </tr>
1880 </table>
1881 <table cellspacing="5" cellpadding="0" border="0">
1882   <tr>
1883     <td>
1884       &nbsp;
1885     </td>
1886     <td>
1887
1888 <p>
1889 Returns true if the servername you give is ulined. 
1890 <p>
1891 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.
1892 <p>
1893 Definition at line <a class="el" href="modules_8cpp-source.html#l00442">442</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1894 <p>
1895 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="l00443"></a>00443 {
1896 <a name="l00444"></a>00444         <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());
1897 <a name="l00445"></a>00445 }
1898 </pre></div>
1899 <p>
1900     </td>
1901   </tr>
1902 </table>
1903 <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>
1904 <table class="mdTable" cellpadding="2" cellspacing="0">
1905   <tr>
1906     <td class="mdRow">
1907       <table cellpadding="0" cellspacing="0" border="0">
1908         <tr>
1909           <td class="md" nowrap valign="top">bool Server::IsValidMask           </td>
1910           <td class="md" valign="top">(&nbsp;</td>
1911           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1912           <td class="mdname1" valign="top" nowrap> <em>mask</em>          </td>
1913           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1914           <td class="md" nowrap><code> [virtual]</code></td>
1915         </tr>
1916       </table>
1917     </td>
1918   </tr>
1919 </table>
1920 <table cellspacing="5" cellpadding="0" border="0">
1921   <tr>
1922     <td>
1923       &nbsp;
1924     </td>
1925     <td>
1926
1927 <p>
1928 Returns true if a nick!ident string is correctly formatted, false if otherwise. 
1929 <p>
1930
1931 <p>
1932 Definition at line <a class="el" href="modules_8cpp-source.html#l00755">755</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00756"></a>00756 {
1933 <a name="l00757"></a>00757         <span class="keyword">const</span> <span class="keywordtype">char</span>* dest = mask.c_str();
1934 <a name="l00758"></a>00758         <span class="keywordflow">if</span> (strchr(dest,<span class="charliteral">'!'</span>)==0)
1935 <a name="l00759"></a>00759                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1936 <a name="l00760"></a>00760         <span class="keywordflow">if</span> (strchr(dest,<span class="charliteral">'@'</span>)==0)
1937 <a name="l00761"></a>00761                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1938 <a name="l00762"></a>00762         <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; strlen(dest); i++)
1939 <a name="l00763"></a>00763                 <span class="keywordflow">if</span> (dest[i] &lt; 32)
1940 <a name="l00764"></a>00764                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
1941 <a name="l00765"></a>00765         <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; strlen(dest); i++)
1942 <a name="l00766"></a>00766                 <span class="keywordflow">if</span> (dest[i] &gt; 126)
1943 <a name="l00767"></a>00767                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
1944 <a name="l00768"></a>00768         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> c = 0;
1945 <a name="l00769"></a>00769         <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; strlen(dest); i++)
1946 <a name="l00770"></a>00770                 <span class="keywordflow">if</span> (dest[i] == <span class="charliteral">'!'</span>)
1947 <a name="l00771"></a>00771                         c++;
1948 <a name="l00772"></a>00772         <span class="keywordflow">if</span> (c&gt;1)
1949 <a name="l00773"></a>00773                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1950 <a name="l00774"></a>00774         c = 0;
1951 <a name="l00775"></a>00775         <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; strlen(dest); i++)
1952 <a name="l00776"></a>00776                 <span class="keywordflow">if</span> (dest[i] == <span class="charliteral">'@'</span>)
1953 <a name="l00777"></a>00777                         c++;
1954 <a name="l00778"></a>00778         <span class="keywordflow">if</span> (c&gt;1)
1955 <a name="l00779"></a>00779                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1956 <a name="l00780"></a>00780 
1957 <a name="l00781"></a>00781         <span class="keywordflow">return</span> <span class="keyword">true</span>;
1958 <a name="l00782"></a>00782 }
1959 </pre></div>
1960 <p>
1961     </td>
1962   </tr>
1963 </table>
1964 <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>
1965 <table class="mdTable" cellpadding="2" cellspacing="0">
1966   <tr>
1967     <td class="mdRow">
1968       <table cellpadding="0" cellspacing="0" border="0">
1969         <tr>
1970           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> * Server::JoinUserToChannel           </td>
1971           <td class="md" valign="top">(&nbsp;</td>
1972           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1973           <td class="mdname" nowrap> <em>user</em>, </td>
1974         </tr>
1975         <tr>
1976           <td class="md" nowrap align="right"></td>
1977           <td class="md"></td>
1978           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1979           <td class="mdname" nowrap> <em>cname</em>, </td>
1980         </tr>
1981         <tr>
1982           <td class="md" nowrap align="right"></td>
1983           <td class="md"></td>
1984           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
1985           <td class="mdname" nowrap> <em>key</em></td>
1986         </tr>
1987         <tr>
1988           <td class="md"></td>
1989           <td class="md">)&nbsp;</td>
1990           <td class="md" colspan="2"><code> [virtual]</code></td>
1991         </tr>
1992       </table>
1993     </td>
1994   </tr>
1995 </table>
1996 <table cellspacing="5" cellpadding="0" border="0">
1997   <tr>
1998     <td>
1999       &nbsp;
2000     </td>
2001     <td>
2002
2003 <p>
2004 Forces a user to join a channel. 
2005 <p>
2006 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.
2007 <p>
2008 Definition at line <a class="el" href="modules_8cpp-source.html#l00410">410</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00411"></a>00411 {
2009 <a name="l00412"></a>00412         <span class="keywordflow">return</span> add_channel(user,cname.c_str(),key.c_str(),<span class="keyword">false</span>);
2010 <a name="l00413"></a>00413 }
2011 </pre></div>
2012 <p>
2013     </td>
2014   </tr>
2015 </table>
2016 <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>
2017 <table class="mdTable" cellpadding="2" cellspacing="0">
2018   <tr>
2019     <td class="mdRow">
2020       <table cellpadding="0" cellspacing="0" border="0">
2021         <tr>
2022           <td class="md" nowrap valign="top">void Server::Log           </td>
2023           <td class="md" valign="top">(&nbsp;</td>
2024           <td class="md" nowrap valign="top">int&nbsp;</td>
2025           <td class="mdname" nowrap> <em>level</em>, </td>
2026         </tr>
2027         <tr>
2028           <td class="md" nowrap align="right"></td>
2029           <td class="md"></td>
2030           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2031           <td class="mdname" nowrap> <em>s</em></td>
2032         </tr>
2033         <tr>
2034           <td class="md"></td>
2035           <td class="md">)&nbsp;</td>
2036           <td class="md" colspan="2"><code> [virtual]</code></td>
2037         </tr>
2038       </table>
2039     </td>
2040   </tr>
2041 </table>
2042 <table cellspacing="5" cellpadding="0" border="0">
2043   <tr>
2044     <td>
2045       &nbsp;
2046     </td>
2047     <td>
2048
2049 <p>
2050 Writes a log string. 
2051 <p>
2052 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.
2053 <p>
2054 Definition at line <a class="el" href="modules_8cpp-source.html#l00452">452</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00453"></a>00453 {
2055 <a name="l00454"></a>00454         log(level,<span class="stringliteral">"%s"</span>,s.c_str());
2056 <a name="l00455"></a>00455 }
2057 </pre></div>
2058 <p>
2059     </td>
2060   </tr>
2061 </table>
2062 <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>
2063 <table class="mdTable" cellpadding="2" cellspacing="0">
2064   <tr>
2065     <td class="mdRow">
2066       <table cellpadding="0" cellspacing="0" border="0">
2067         <tr>
2068           <td class="md" nowrap valign="top">bool Server::MatchText           </td>
2069           <td class="md" valign="top">(&nbsp;</td>
2070           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2071           <td class="mdname" nowrap> <em>sliteral</em>, </td>
2072         </tr>
2073         <tr>
2074           <td class="md" nowrap align="right"></td>
2075           <td class="md"></td>
2076           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2077           <td class="mdname" nowrap> <em>spattern</em></td>
2078         </tr>
2079         <tr>
2080           <td class="md"></td>
2081           <td class="md">)&nbsp;</td>
2082           <td class="md" colspan="2"><code> [virtual]</code></td>
2083         </tr>
2084       </table>
2085     </td>
2086   </tr>
2087 </table>
2088 <table cellspacing="5" cellpadding="0" border="0">
2089   <tr>
2090     <td>
2091       &nbsp;
2092     </td>
2093     <td>
2094
2095 <p>
2096 Matches text against a glob pattern. 
2097 <p>
2098 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.
2099 <p>
2100 Definition at line <a class="el" href="modules_8cpp-source.html#l00397">397</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00398"></a>00398 {
2101 <a name="l00399"></a>00399         <span class="keywordtype">char</span> literal[MAXBUF],pattern[MAXBUF];
2102 <a name="l00400"></a>00400         strlcpy(literal,sliteral.c_str(),MAXBUF);
2103 <a name="l00401"></a>00401         strlcpy(pattern,spattern.c_str(),MAXBUF);
2104 <a name="l00402"></a>00402         <span class="keywordflow">return</span> match(literal,pattern);
2105 <a name="l00403"></a>00403 }
2106 </pre></div>
2107 <p>
2108     </td>
2109   </tr>
2110 </table>
2111 <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>
2112 <table class="mdTable" cellpadding="2" cellspacing="0">
2113   <tr>
2114     <td class="mdRow">
2115       <table cellpadding="0" cellspacing="0" border="0">
2116         <tr>
2117           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> * Server::PartUserFromChannel           </td>
2118           <td class="md" valign="top">(&nbsp;</td>
2119           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2120           <td class="mdname" nowrap> <em>user</em>, </td>
2121         </tr>
2122         <tr>
2123           <td class="md" nowrap align="right"></td>
2124           <td class="md"></td>
2125           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2126           <td class="mdname" nowrap> <em>cname</em>, </td>
2127         </tr>
2128         <tr>
2129           <td class="md" nowrap align="right"></td>
2130           <td class="md"></td>
2131           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2132           <td class="mdname" nowrap> <em>reason</em></td>
2133         </tr>
2134         <tr>
2135           <td class="md"></td>
2136           <td class="md">)&nbsp;</td>
2137           <td class="md" colspan="2"><code> [virtual]</code></td>
2138         </tr>
2139       </table>
2140     </td>
2141   </tr>
2142 </table>
2143 <table cellspacing="5" cellpadding="0" border="0">
2144   <tr>
2145     <td>
2146       &nbsp;
2147     </td>
2148     <td>
2149
2150 <p>
2151 Forces a user to part a channel. 
2152 <p>
2153 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.
2154 <p>
2155 Definition at line <a class="el" href="modules_8cpp-source.html#l00415">415</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00416"></a>00416 {
2156 <a name="l00417"></a>00417         <span class="keywordflow">return</span> del_channel(user,cname.c_str(),reason.c_str(),<span class="keyword">false</span>);
2157 <a name="l00418"></a>00418 }
2158 </pre></div>
2159 <p>
2160     </td>
2161   </tr>
2162 </table>
2163 <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>
2164 <table class="mdTable" cellpadding="2" cellspacing="0">
2165   <tr>
2166     <td class="mdRow">
2167       <table cellpadding="0" cellspacing="0" border="0">
2168         <tr>
2169           <td class="md" nowrap valign="top">bool Server::PseudoToUser           </td>
2170           <td class="md" valign="top">(&nbsp;</td>
2171           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2172           <td class="mdname" nowrap> <em>alive</em>, </td>
2173         </tr>
2174         <tr>
2175           <td class="md" nowrap align="right"></td>
2176           <td class="md"></td>
2177           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2178           <td class="mdname" nowrap> <em>zombie</em>, </td>
2179         </tr>
2180         <tr>
2181           <td class="md" nowrap align="right"></td>
2182           <td class="md"></td>
2183           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2184           <td class="mdname" nowrap> <em>message</em></td>
2185         </tr>
2186         <tr>
2187           <td class="md"></td>
2188           <td class="md">)&nbsp;</td>
2189           <td class="md" colspan="2"><code> [virtual]</code></td>
2190         </tr>
2191       </table>
2192     </td>
2193   </tr>
2194 </table>
2195 <table cellspacing="5" cellpadding="0" border="0">
2196   <tr>
2197     <td>
2198       &nbsp;
2199     </td>
2200     <td>
2201
2202 <p>
2203 This user takes one user, and switches their file descriptor with another user, so that one user "becomes" the other. 
2204 <p>
2205 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.
2206 <p>
2207 Definition at line <a class="el" href="modules_8cpp-source.html#l00670">670</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2208 <p>
2209 References <a class="el" href="channels_8h-source.html#l00252">ucrec::channel</a>, <a class="el" href="users_8h-source.html#l00146">userrec::chans</a>, <a class="el" href="users_8cpp-source.html#l00228">userrec::ClearBuffer()</a>, <a class="el" href="connection_8h-source.html#l00042">connection::fd</a>, <a class="el" href="modules_8h-source.html#l00100">FD_MAGIC_NUMBER</a>, <a class="el" href="connection_8h-source.html#l00046">connection::host</a>, <a class="el" href="users_8h-source.html#l00126">userrec::ident</a>, <a class="el" href="channels_8h-source.html#l00106">chanrec::name</a>, <a class="el" href="users_8h-source.html#l00121">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="l00671"></a>00671 {
2210 <a name="l00672"></a>00672         zombie-&gt;<a class="code" href="classconnection.html#fd">fd</a> = alive-&gt;<a class="code" href="classconnection.html#fd">fd</a>;
2211 <a name="l00673"></a>00673         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>;
2212 <a name="l00674"></a>00674         alive-&gt;<a class="code" href="classuserrec.html#ClearBuffer_28_29">ClearBuffer</a>();
2213 <a name="l00675"></a>00675         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>);
2214 <a name="l00676"></a>00676         kill_link(alive,message.c_str());
2215 <a name="l00677"></a>00677         <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;
2216 <a name="l00678"></a>00678         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i != MAXCHANS; i++)
2217 <a name="l00679"></a>00679         {
2218 <a name="l00680"></a>00680                 <span class="keywordflow">if</span> (zombie-&gt;<a class="code" href="classuserrec.html#chans_5BMAXCHANS_5D">chans</a>[i].<a class="code" href="classucrec.html#channel">channel</a> != NULL)
2219 <a name="l00681"></a>00681                 {
2220 <a name="l00682"></a>00682                         <span class="keywordflow">if</span> (zombie-&gt;<a class="code" href="classuserrec.html#chans_5BMAXCHANS_5D">chans</a>[i].<a class="code" href="classucrec.html#channel">channel</a>-&gt;<a class="code" href="classchanrec.html#name_5BCHANMAX_5D">name</a>)
2221 <a name="l00683"></a>00683                         {
2222 <a name="l00684"></a>00684                                 <a class="code" href="classchanrec.html">chanrec</a>* Ptr = zombie-&gt;<a class="code" href="classuserrec.html#chans_5BMAXCHANS_5D">chans</a>[i].<a class="code" href="classucrec.html#channel">channel</a>;
2223 <a name="l00685"></a>00685                                 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>);
2224 <a name="l00686"></a>00686                                 <span class="keywordflow">if</span> (Ptr-&gt;<a class="code" href="classchanrec.html#topicset">topicset</a>)
2225 <a name="l00687"></a>00687                                 {
2226 <a name="l00688"></a>00688                                         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>);
2227 <a name="l00689"></a>00689                                         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>);
2228 <a name="l00690"></a>00690                                 }
2229 <a name="l00691"></a>00691                                 userlist(zombie,Ptr);
2230 <a name="l00692"></a>00692                                 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>);
2231 <a name="l00693"></a>00693 
2232 <a name="l00694"></a>00694                         }
2233 <a name="l00695"></a>00695                 }
2234 <a name="l00696"></a>00696         }
2235 <a name="l00697"></a>00697         <span class="keywordflow">return</span> <span class="keyword">true</span>;
2236 <a name="l00698"></a>00698 }
2237 </pre></div>
2238 <p>
2239     </td>
2240   </tr>
2241 </table>
2242 <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>
2243 <table class="mdTable" cellpadding="2" cellspacing="0">
2244   <tr>
2245     <td class="mdRow">
2246       <table cellpadding="0" cellspacing="0" border="0">
2247         <tr>
2248           <td class="md" nowrap valign="top">void Server::QuitUser           </td>
2249           <td class="md" valign="top">(&nbsp;</td>
2250           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2251           <td class="mdname" nowrap> <em>user</em>, </td>
2252         </tr>
2253         <tr>
2254           <td class="md" nowrap align="right"></td>
2255           <td class="md"></td>
2256           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2257           <td class="mdname" nowrap> <em>reason</em></td>
2258         </tr>
2259         <tr>
2260           <td class="md"></td>
2261           <td class="md">)&nbsp;</td>
2262           <td class="md" colspan="2"><code> [virtual]</code></td>
2263         </tr>
2264       </table>
2265     </td>
2266   </tr>
2267 </table>
2268 <table cellspacing="5" cellpadding="0" border="0">
2269   <tr>
2270     <td>
2271       &nbsp;
2272     </td>
2273     <td>
2274
2275 <p>
2276 Forces a user to quit with the specified reason. 
2277 <p>
2278 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>
2279 WARNING!<p>
2280 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.
2281 <p>
2282 Definition at line <a class="el" href="modules_8cpp-source.html#l00437">437</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00438"></a>00438 {
2283 <a name="l00439"></a>00439         kill_link(user,reason.c_str());
2284 <a name="l00440"></a>00440 }
2285 </pre></div>
2286 <p>
2287     </td>
2288   </tr>
2289 </table>
2290 <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>
2291 <table class="mdTable" cellpadding="2" cellspacing="0">
2292   <tr>
2293     <td class="mdRow">
2294       <table cellpadding="0" cellspacing="0" border="0">
2295         <tr>
2296           <td class="md" nowrap valign="top">void Server::Send           </td>
2297           <td class="md" valign="top">(&nbsp;</td>
2298           <td class="md" nowrap valign="top">int&nbsp;</td>
2299           <td class="mdname" nowrap> <em>Socket</em>, </td>
2300         </tr>
2301         <tr>
2302           <td class="md" nowrap align="right"></td>
2303           <td class="md"></td>
2304           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2305           <td class="mdname" nowrap> <em>s</em></td>
2306         </tr>
2307         <tr>
2308           <td class="md"></td>
2309           <td class="md">)&nbsp;</td>
2310           <td class="md" colspan="2"><code> [virtual]</code></td>
2311         </tr>
2312       </table>
2313     </td>
2314   </tr>
2315 </table>
2316 <table cellspacing="5" cellpadding="0" border="0">
2317   <tr>
2318     <td>
2319       &nbsp;
2320     </td>
2321     <td>
2322
2323 <p>
2324 Sends a line of text down a TCP/IP socket. 
2325 <p>
2326 This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.
2327 <p>
2328 Definition at line <a class="el" href="modules_8cpp-source.html#l00467">467</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00468"></a>00468 {
2329 <a name="l00469"></a>00469         Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
2330 <a name="l00470"></a>00470 }
2331 </pre></div>
2332 <p>
2333     </td>
2334   </tr>
2335 </table>
2336 <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>
2337 <table class="mdTable" cellpadding="2" cellspacing="0">
2338   <tr>
2339     <td class="mdRow">
2340       <table cellpadding="0" cellspacing="0" border="0">
2341         <tr>
2342           <td class="md" nowrap valign="top">void Server::SendChannel           </td>
2343           <td class="md" valign="top">(&nbsp;</td>
2344           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2345           <td class="mdname" nowrap> <em>User</em>, </td>
2346         </tr>
2347         <tr>
2348           <td class="md" nowrap align="right"></td>
2349           <td class="md"></td>
2350           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
2351           <td class="mdname" nowrap> <em>Channel</em>, </td>
2352         </tr>
2353         <tr>
2354           <td class="md" nowrap align="right"></td>
2355           <td class="md"></td>
2356           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2357           <td class="mdname" nowrap> <em>s</em>, </td>
2358         </tr>
2359         <tr>
2360           <td class="md" nowrap align="right"></td>
2361           <td class="md"></td>
2362           <td class="md" nowrap>bool&nbsp;</td>
2363           <td class="mdname" nowrap> <em>IncludeSender</em></td>
2364         </tr>
2365         <tr>
2366           <td class="md"></td>
2367           <td class="md">)&nbsp;</td>
2368           <td class="md" colspan="2"><code> [virtual]</code></td>
2369         </tr>
2370       </table>
2371     </td>
2372   </tr>
2373 </table>
2374 <table cellspacing="5" cellpadding="0" border="0">
2375   <tr>
2376     <td>
2377       &nbsp;
2378     </td>
2379     <td>
2380
2381 <p>
2382 Sends text from a user to a channel (mulicast). 
2383 <p>
2384 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).
2385 <p>
2386 Definition at line <a class="el" href="modules_8cpp-source.html#l00501">501</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00502"></a>00502 {
2387 <a name="l00503"></a>00503         <span class="keywordflow">if</span> (IncludeSender)
2388 <a name="l00504"></a>00504         {
2389 <a name="l00505"></a>00505                 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
2390 <a name="l00506"></a>00506         }
2391 <a name="l00507"></a>00507         <span class="keywordflow">else</span>
2392 <a name="l00508"></a>00508         {
2393 <a name="l00509"></a>00509                 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
2394 <a name="l00510"></a>00510         }
2395 <a name="l00511"></a>00511 }
2396 </pre></div>
2397 <p>
2398     </td>
2399   </tr>
2400 </table>
2401 <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>
2402 <table class="mdTable" cellpadding="2" cellspacing="0">
2403   <tr>
2404     <td class="mdRow">
2405       <table cellpadding="0" cellspacing="0" border="0">
2406         <tr>
2407           <td class="md" nowrap valign="top">void Server::SendChannelServerNotice           </td>
2408           <td class="md" valign="top">(&nbsp;</td>
2409           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2410           <td class="mdname" nowrap> <em>ServName</em>, </td>
2411         </tr>
2412         <tr>
2413           <td class="md" nowrap align="right"></td>
2414           <td class="md"></td>
2415           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
2416           <td class="mdname" nowrap> <em>Channel</em>, </td>
2417         </tr>
2418         <tr>
2419           <td class="md" nowrap align="right"></td>
2420           <td class="md"></td>
2421           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2422           <td class="mdname" nowrap> <em>text</em></td>
2423         </tr>
2424         <tr>
2425           <td class="md"></td>
2426           <td class="md">)&nbsp;</td>
2427           <td class="md" colspan="2"><code> [virtual]</code></td>
2428         </tr>
2429       </table>
2430     </td>
2431   </tr>
2432 </table>
2433 <table cellspacing="5" cellpadding="0" border="0">
2434   <tr>
2435     <td>
2436       &nbsp;
2437     </td>
2438     <td>
2439
2440 <p>
2441 Writes text to a channel, but from a server, including all. 
2442 <p>
2443 This can be used to send server notices to a group of users.
2444 <p>
2445 Definition at line <a class="el" href="modules_8cpp-source.html#l00496">496</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00497"></a>00497 {
2446 <a name="l00498"></a>00498         WriteChannelWithServ((<span class="keywordtype">char</span>*)ServName.c_str(), Channel, <span class="stringliteral">"%s"</span>, text.c_str());
2447 <a name="l00499"></a>00499 }
2448 </pre></div>
2449 <p>
2450     </td>
2451   </tr>
2452 </table>
2453 <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>
2454 <table class="mdTable" cellpadding="2" cellspacing="0">
2455   <tr>
2456     <td class="mdRow">
2457       <table cellpadding="0" cellspacing="0" border="0">
2458         <tr>
2459           <td class="md" nowrap valign="top">void Server::SendCommon           </td>
2460           <td class="md" valign="top">(&nbsp;</td>
2461           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2462           <td class="mdname" nowrap> <em>User</em>, </td>
2463         </tr>
2464         <tr>
2465           <td class="md" nowrap align="right"></td>
2466           <td class="md"></td>
2467           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2468           <td class="mdname" nowrap> <em>text</em>, </td>
2469         </tr>
2470         <tr>
2471           <td class="md" nowrap align="right"></td>
2472           <td class="md"></td>
2473           <td class="md" nowrap>bool&nbsp;</td>
2474           <td class="mdname" nowrap> <em>IncludeSender</em></td>
2475         </tr>
2476         <tr>
2477           <td class="md"></td>
2478           <td class="md">)&nbsp;</td>
2479           <td class="md" colspan="2"><code> [virtual]</code></td>
2480         </tr>
2481       </table>
2482     </td>
2483   </tr>
2484 </table>
2485 <table cellspacing="5" cellpadding="0" border="0">
2486   <tr>
2487     <td>
2488       &nbsp;
2489     </td>
2490     <td>
2491
2492 <p>
2493 Sends text from a user to one or more channels (mulicast). 
2494 <p>
2495 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.
2496 <p>
2497 Definition at line <a class="el" href="modules_8cpp-source.html#l00518">518</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00519"></a>00519 {
2498 <a name="l00520"></a>00520         <span class="keywordflow">if</span> (IncludeSender)
2499 <a name="l00521"></a>00521         {
2500 <a name="l00522"></a>00522                 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str());
2501 <a name="l00523"></a>00523         }
2502 <a name="l00524"></a>00524         <span class="keywordflow">else</span>
2503 <a name="l00525"></a>00525         {
2504 <a name="l00526"></a>00526                 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str());
2505 <a name="l00527"></a>00527         }
2506 <a name="l00528"></a>00528 }
2507 </pre></div>
2508 <p>
2509     </td>
2510   </tr>
2511 </table>
2512 <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>
2513 <table class="mdTable" cellpadding="2" cellspacing="0">
2514   <tr>
2515     <td class="mdRow">
2516       <table cellpadding="0" cellspacing="0" border="0">
2517         <tr>
2518           <td class="md" nowrap valign="top">void Server::SendFrom           </td>
2519           <td class="md" valign="top">(&nbsp;</td>
2520           <td class="md" nowrap valign="top">int&nbsp;</td>
2521           <td class="mdname" nowrap> <em>Socket</em>, </td>
2522         </tr>
2523         <tr>
2524           <td class="md" nowrap align="right"></td>
2525           <td class="md"></td>
2526           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2527           <td class="mdname" nowrap> <em>User</em>, </td>
2528         </tr>
2529         <tr>
2530           <td class="md" nowrap align="right"></td>
2531           <td class="md"></td>
2532           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2533           <td class="mdname" nowrap> <em>s</em></td>
2534         </tr>
2535         <tr>
2536           <td class="md"></td>
2537           <td class="md">)&nbsp;</td>
2538           <td class="md" colspan="2"><code> [virtual]</code></td>
2539         </tr>
2540       </table>
2541     </td>
2542   </tr>
2543 </table>
2544 <table cellspacing="5" cellpadding="0" border="0">
2545   <tr>
2546     <td>
2547       &nbsp;
2548     </td>
2549     <td>
2550
2551 <p>
2552 Sends text from a user to a socket. 
2553 <p>
2554 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)
2555 <p>
2556 Definition at line <a class="el" href="modules_8cpp-source.html#l00477">477</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00478"></a>00478 {
2557 <a name="l00479"></a>00479         WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str());
2558 <a name="l00480"></a>00480 }
2559 </pre></div>
2560 <p>
2561     </td>
2562   </tr>
2563 </table>
2564 <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>
2565 <table class="mdTable" cellpadding="2" cellspacing="0">
2566   <tr>
2567     <td class="mdRow">
2568       <table cellpadding="0" cellspacing="0" border="0">
2569         <tr>
2570           <td class="md" nowrap valign="top">void Server::SendMode           </td>
2571           <td class="md" valign="top">(&nbsp;</td>
2572           <td class="md" nowrap valign="top">char **&nbsp;</td>
2573           <td class="mdname" nowrap> <em>parameters</em>, </td>
2574         </tr>
2575         <tr>
2576           <td class="md" nowrap align="right"></td>
2577           <td class="md"></td>
2578           <td class="md" nowrap>int&nbsp;</td>
2579           <td class="mdname" nowrap> <em>pcnt</em>, </td>
2580         </tr>
2581         <tr>
2582           <td class="md" nowrap align="right"></td>
2583           <td class="md"></td>
2584           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2585           <td class="mdname" nowrap> <em>user</em></td>
2586         </tr>
2587         <tr>
2588           <td class="md"></td>
2589           <td class="md">)&nbsp;</td>
2590           <td class="md" colspan="2"><code> [virtual]</code></td>
2591         </tr>
2592       </table>
2593     </td>
2594   </tr>
2595 </table>
2596 <table cellspacing="5" cellpadding="0" border="0">
2597   <tr>
2598     <td>
2599       &nbsp;
2600     </td>
2601     <td>
2602
2603 <p>
2604 Sends a servermode. 
2605 <p>
2606 you must format the parameters array with the target, modes and parameters for those modes.<p>
2607 For example:<p>
2608 char *modes[3];<p>
2609 modes[0] = ChannelName;<p>
2610 modes[1] = "+o";<p>
2611 modes[2] = user-&gt;nick;<p>
2612 Srv-&gt;SendMode(modes,3,user);<p>
2613 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!
2614 <p>
2615 Definition at line <a class="el" href="modules_8cpp-source.html#l00462">462</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2616 <p>
2617 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="l00463"></a>00463 {
2618 <a name="l00464"></a>00464         <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);
2619 <a name="l00465"></a>00465 }
2620 </pre></div>
2621 <p>
2622     </td>
2623   </tr>
2624 </table>
2625 <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>
2626 <table class="mdTable" cellpadding="2" cellspacing="0">
2627   <tr>
2628     <td class="mdRow">
2629       <table cellpadding="0" cellspacing="0" border="0">
2630         <tr>
2631           <td class="md" nowrap valign="top">void Server::SendOpers           </td>
2632           <td class="md" valign="top">(&nbsp;</td>
2633           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2634           <td class="mdname1" valign="top" nowrap> <em>s</em>          </td>
2635           <td class="md" valign="top">&nbsp;)&nbsp;</td>
2636           <td class="md" nowrap><code> [virtual]</code></td>
2637         </tr>
2638       </table>
2639     </td>
2640   </tr>
2641 </table>
2642 <table cellspacing="5" cellpadding="0" border="0">
2643   <tr>
2644     <td>
2645       &nbsp;
2646     </td>
2647     <td>
2648
2649 <p>
2650 Sends text to all opers. 
2651 <p>
2652 This method sends a server notice to all opers with the usermode +s.
2653 <p>
2654 Definition at line <a class="el" href="modules_8cpp-source.html#l00392">392</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00393"></a>00393 {
2655 <a name="l00394"></a>00394         WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str());
2656 <a name="l00395"></a>00395 }
2657 </pre></div>
2658 <p>
2659     </td>
2660   </tr>
2661 </table>
2662 <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>
2663 <table class="mdTable" cellpadding="2" cellspacing="0">
2664   <tr>
2665     <td class="mdRow">
2666       <table cellpadding="0" cellspacing="0" border="0">
2667         <tr>
2668           <td class="md" nowrap valign="top">void Server::SendServ           </td>
2669           <td class="md" valign="top">(&nbsp;</td>
2670           <td class="md" nowrap valign="top">int&nbsp;</td>
2671           <td class="mdname" nowrap> <em>Socket</em>, </td>
2672         </tr>
2673         <tr>
2674           <td class="md" nowrap align="right"></td>
2675           <td class="md"></td>
2676           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2677           <td class="mdname" nowrap> <em>s</em></td>
2678         </tr>
2679         <tr>
2680           <td class="md"></td>
2681           <td class="md">)&nbsp;</td>
2682           <td class="md" colspan="2"><code> [virtual]</code></td>
2683         </tr>
2684       </table>
2685     </td>
2686   </tr>
2687 </table>
2688 <table cellspacing="5" cellpadding="0" border="0">
2689   <tr>
2690     <td>
2691       &nbsp;
2692     </td>
2693     <td>
2694
2695 <p>
2696 Sends text from the server to a socket. 
2697 <p>
2698 This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)
2699 <p>
2700 Definition at line <a class="el" href="modules_8cpp-source.html#l00472">472</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00473"></a>00473 {
2701 <a name="l00474"></a>00474         WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
2702 <a name="l00475"></a>00475 }
2703 </pre></div>
2704 <p>
2705     </td>
2706   </tr>
2707 </table>
2708 <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>
2709 <table class="mdTable" cellpadding="2" cellspacing="0">
2710   <tr>
2711     <td class="mdRow">
2712       <table cellpadding="0" cellspacing="0" border="0">
2713         <tr>
2714           <td class="md" nowrap valign="top">void Server::SendTo           </td>
2715           <td class="md" valign="top">(&nbsp;</td>
2716           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2717           <td class="mdname" nowrap> <em>Source</em>, </td>
2718         </tr>
2719         <tr>
2720           <td class="md" nowrap align="right"></td>
2721           <td class="md"></td>
2722           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2723           <td class="mdname" nowrap> <em>Dest</em>, </td>
2724         </tr>
2725         <tr>
2726           <td class="md" nowrap align="right"></td>
2727           <td class="md"></td>
2728           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2729           <td class="mdname" nowrap> <em>s</em></td>
2730         </tr>
2731         <tr>
2732           <td class="md"></td>
2733           <td class="md">)&nbsp;</td>
2734           <td class="md" colspan="2"><code> [virtual]</code></td>
2735         </tr>
2736       </table>
2737     </td>
2738   </tr>
2739 </table>
2740 <table cellspacing="5" cellpadding="0" border="0">
2741   <tr>
2742     <td>
2743       &nbsp;
2744     </td>
2745     <td>
2746
2747 <p>
2748 Sends text from a user to another user. 
2749 <p>
2750 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>
2751 :user!ident TEXT<p>
2752 The format will become:<p>
2753 :localserver TEXT<p>
2754 Which is useful for numerics and server notices to single users, etc.
2755 <p>
2756 Definition at line <a class="el" href="modules_8cpp-source.html#l00482">482</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2757 <p>
2758 References <a class="el" href="connection_8h-source.html#l00042">connection::fd</a>.<div class="fragment"><pre class="fragment"><a name="l00483"></a>00483 {
2759 <a name="l00484"></a>00484         <span class="keywordflow">if</span> (!Source)
2760 <a name="l00485"></a>00485         {
2761 <a name="l00486"></a>00486                 <span class="comment">// if source is NULL, then the message originates from the local server</span>
2762 <a name="l00487"></a>00487                 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());
2763 <a name="l00488"></a>00488         }
2764 <a name="l00489"></a>00489         <span class="keywordflow">else</span>
2765 <a name="l00490"></a>00490         {
2766 <a name="l00491"></a>00491                 <span class="comment">// otherwise it comes from the user specified</span>
2767 <a name="l00492"></a>00492                 WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str());
2768 <a name="l00493"></a>00493         }
2769 <a name="l00494"></a>00494 }
2770 </pre></div>
2771 <p>
2772     </td>
2773   </tr>
2774 </table>
2775 <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>
2776 <table class="mdTable" cellpadding="2" cellspacing="0">
2777   <tr>
2778     <td class="mdRow">
2779       <table cellpadding="0" cellspacing="0" border="0">
2780         <tr>
2781           <td class="md" nowrap valign="top">void Server::SendToModeMask           </td>
2782           <td class="md" valign="top">(&nbsp;</td>
2783           <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2784           <td class="mdname" nowrap> <em>modes</em>, </td>
2785         </tr>
2786         <tr>
2787           <td class="md" nowrap align="right"></td>
2788           <td class="md"></td>
2789           <td class="md" nowrap>int&nbsp;</td>
2790           <td class="mdname" nowrap> <em>flags</em>, </td>
2791         </tr>
2792         <tr>
2793           <td class="md" nowrap align="right"></td>
2794           <td class="md"></td>
2795           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2796           <td class="mdname" nowrap> <em>text</em></td>
2797         </tr>
2798         <tr>
2799           <td class="md"></td>
2800           <td class="md">)&nbsp;</td>
2801           <td class="md" colspan="2"><code> [virtual]</code></td>
2802         </tr>
2803       </table>
2804     </td>
2805   </tr>
2806 </table>
2807 <table cellspacing="5" cellpadding="0" border="0">
2808   <tr>
2809     <td>
2810       &nbsp;
2811     </td>
2812     <td>
2813
2814 <p>
2815 Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter. 
2816 <p>
2817 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>
2818 Serv-&gt;SendToModeMask("xi", WM_OR, "m00");<p>
2819 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.
2820 <p>
2821 Definition at line <a class="el" href="modules_8cpp-source.html#l00405">405</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00406"></a>00406 {
2822 <a name="l00407"></a>00407         WriteMode(modes.c_str(),flags,<span class="stringliteral">"%s"</span>,text.c_str());
2823 <a name="l00408"></a>00408 }
2824 </pre></div>
2825 <p>
2826     </td>
2827   </tr>
2828 </table>
2829 <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>
2830 <table class="mdTable" cellpadding="2" cellspacing="0">
2831   <tr>
2832     <td class="mdRow">
2833       <table cellpadding="0" cellspacing="0" border="0">
2834         <tr>
2835           <td class="md" nowrap valign="top">void Server::SendWallops           </td>
2836           <td class="md" valign="top">(&nbsp;</td>
2837           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2838           <td class="mdname" nowrap> <em>User</em>, </td>
2839         </tr>
2840         <tr>
2841           <td class="md" nowrap align="right"></td>
2842           <td class="md"></td>
2843           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2844           <td class="mdname" nowrap> <em>text</em></td>
2845         </tr>
2846         <tr>
2847           <td class="md"></td>
2848           <td class="md">)&nbsp;</td>
2849           <td class="md" colspan="2"><code> [virtual]</code></td>
2850         </tr>
2851       </table>
2852     </td>
2853   </tr>
2854 </table>
2855 <table cellspacing="5" cellpadding="0" border="0">
2856   <tr>
2857     <td>
2858       &nbsp;
2859     </td>
2860     <td>
2861
2862 <p>
2863 Sends a WALLOPS message. 
2864 <p>
2865 This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.
2866 <p>
2867 Definition at line <a class="el" href="modules_8cpp-source.html#l00530">530</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00531"></a>00531 {
2868 <a name="l00532"></a>00532         WriteWallOps(User,<span class="keyword">false</span>,<span class="stringliteral">"%s"</span>,text.c_str());
2869 <a name="l00533"></a>00533 }
2870 </pre></div>
2871 <p>
2872     </td>
2873   </tr>
2874 </table>
2875 <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>
2876 <table class="mdTable" cellpadding="2" cellspacing="0">
2877   <tr>
2878     <td class="mdRow">
2879       <table cellpadding="0" cellspacing="0" border="0">
2880         <tr>
2881           <td class="md" nowrap valign="top">bool Server::UserToPseudo           </td>
2882           <td class="md" valign="top">(&nbsp;</td>
2883           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2884           <td class="mdname" nowrap> <em>user</em>, </td>
2885         </tr>
2886         <tr>
2887           <td class="md" nowrap align="right"></td>
2888           <td class="md"></td>
2889           <td class="md" nowrap><a class="el" href="namespaceirc.html#string">std::string</a>&nbsp;</td>
2890           <td class="mdname" nowrap> <em>message</em></td>
2891         </tr>
2892         <tr>
2893           <td class="md"></td>
2894           <td class="md">)&nbsp;</td>
2895           <td class="md" colspan="2"><code> [virtual]</code></td>
2896         </tr>
2897       </table>
2898     </td>
2899   </tr>
2900 </table>
2901 <table cellspacing="5" cellpadding="0" border="0">
2902   <tr>
2903     <td>
2904       &nbsp;
2905     </td>
2906     <td>
2907
2908 <p>
2909 Remove a user's connection to the irc server, but leave their client in existence in the user hash. 
2910 <p>
2911 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.
2912 <p>
2913 Definition at line <a class="el" href="modules_8cpp-source.html#l00639">639</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2914 <p>
2915 References <a class="el" href="users_8cpp-source.html#l00228">userrec::ClearBuffer()</a>, <a class="el" href="modules_8h-source.html#l00023">DEBUG</a>, <a class="el" href="connection_8h-source.html#l00042">connection::fd</a>, <a class="el" href="modules_8h-source.html#l00100">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#l00126">userrec::ident</a>.<div class="fragment"><pre class="fragment"><a name="l00640"></a>00640 {
2916 <a name="l00641"></a>00641         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> old_fd = user-&gt;<a class="code" href="classconnection.html#fd">fd</a>;
2917 <a name="l00642"></a>00642         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>;
2918 <a name="l00643"></a>00643         user-&gt;<a class="code" href="classuserrec.html#ClearBuffer_28_29">ClearBuffer</a>();
2919 <a name="l00644"></a>00644         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());
2920 <a name="l00645"></a>00645 <span class="preprocessor">#ifdef USE_KQUEUE</span>
2921 <a name="l00646"></a>00646 <span class="preprocessor"></span>        <span class="keyword">struct </span>kevent ke;
2922 <a name="l00647"></a>00647         EV_SET(&amp;ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
2923 <a name="l00648"></a>00648         <span class="keywordtype">int</span> i = kevent(kq, &amp;ke, 1, 0, 0, NULL);
2924 <a name="l00649"></a>00649         <span class="keywordflow">if</span> (i == -1)
2925 <a name="l00650"></a>00650         {
2926 <a name="l00651"></a>00651                 log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"kqueue: Failed to remove user from queue!"</span>);
2927 <a name="l00652"></a>00652         }
2928 <a name="l00653"></a>00653 <span class="preprocessor">#endif</span>
2929 <a name="l00654"></a>00654 <span class="preprocessor"></span><span class="preprocessor">#ifdef USE_EPOLL</span>
2930 <a name="l00655"></a>00655 <span class="preprocessor"></span>        <span class="keyword">struct </span>epoll_event ev;
2931 <a name="l00656"></a>00656         ev.events = EPOLLIN | EPOLLET;
2932 <a name="l00657"></a>00657         ev.data.fd = old_fd;
2933 <a name="l00658"></a>00658         <span class="keywordtype">int</span> i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &amp;ev);
2934 <a name="l00659"></a>00659         <span class="keywordflow">if</span> (i &lt; 0)
2935 <a name="l00660"></a>00660         {
2936 <a name="l00661"></a>00661                 log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"epoll: List deletion failure!"</span>);
2937 <a name="l00662"></a>00662         }
2938 <a name="l00663"></a>00663 <span class="preprocessor">#endif</span>
2939 <a name="l00664"></a>00664 <span class="preprocessor"></span>
2940 <a name="l00665"></a>00665         shutdown(old_fd,2);
2941 <a name="l00666"></a>00666         close(old_fd);
2942 <a name="l00667"></a>00667         <span class="keywordflow">return</span> <span class="keyword">true</span>;
2943 <a name="l00668"></a>00668 }
2944 </pre></div>
2945 <p>
2946     </td>
2947   </tr>
2948 </table>
2949 <hr>The documentation for this class was generated from the following files:<ul>
2950 <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>
2951 <hr size="1"><address style="align: right;"><small>Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by&nbsp;
2952 <a href="http://www.doxygen.org/index.html">
2953 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4-20050815 </small></address>
2954 </body>
2955 </html>