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