]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classServer.html
Changed documentation to add parameters
[user/henk/code/inspircd.git] / docs / module-doc / classServer.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 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.3.3 -->
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">Compound&nbsp;List</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">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
8 <h1>Server Class Reference</h1>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="8,7,88,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="8,98,88,125" 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#a0">Server</a> ()</td></tr>
25
26 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor. </em> <a href="#a0"></a><em><br><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#a1">~Server</a> ()</td></tr>
28
29 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default destructor. </em> <a href="#a1"></a><em><br><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#a2">SendOpers</a> (std::string s)</td></tr>
31
32 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends text to all opers. </em> <a href="#a2"></a><em><br><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#a3">Log</a> (int level, std::string s)</td></tr>
34
35 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Writes a log string. </em> <a href="#a3"></a><em><br><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#a4">Send</a> (int Socket, std::string s)</td></tr>
37
38 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends a line of text down a TCP/IP socket. </em> <a href="#a4"></a><em><br><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#a5">SendServ</a> (int Socket, std::string s)</td></tr>
40
41 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends text from the server to a socket. </em> <a href="#a5"></a><em><br><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#a6">SendChannelServerNotice</a> (std::string ServName, <a class="el" href="classchanrec.html">chanrec</a> *Channel, std::string 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. </em> <a href="#a6"></a><em><br><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#a7">SendFrom</a> (int Socket, <a class="el" href="classuserrec.html">userrec</a> *User, std::string s)</td></tr>
46
47 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends text from a user to a socket. </em> <a href="#a7"></a><em><br><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#a8">SendTo</a> (<a class="el" href="classuserrec.html">userrec</a> *Source, <a class="el" href="classuserrec.html">userrec</a> *Dest, std::string s)</td></tr>
49
50 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends text from a user to another user. </em> <a href="#a8"></a><em><br><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#a9">SendChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *User, <a class="el" href="classchanrec.html">chanrec</a> *Channel, std::string 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). </em> <a href="#a9"></a><em><br><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#a10">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. </em> <a href="#a10"></a><em><br><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#a11">SendCommon</a> (<a class="el" href="classuserrec.html">userrec</a> *User, std::string 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). </em> <a href="#a11"></a><em><br><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#a12">SendWallops</a> (<a class="el" href="classuserrec.html">userrec</a> *User, std::string text)</td></tr>
61
62 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends a WALLOPS message. </em> <a href="#a12"></a><em><br><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#a13">IsNick</a> (std::string nick)</td></tr>
64
65 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if a nick is valid. </em> <a href="#a13"></a><em><br><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#a14">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. </em> <a href="#a14"></a><em><br><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#a15">FindNick</a> (std::string 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. </em> <a href="#a15"></a><em><br><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#a16">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. </em> <a href="#a16"></a><em><br><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#a17">FindChannel</a> (std::string 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. </em> <a href="#a17"></a><em><br><br></td></tr>
78 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a18">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. </em> <a href="#a18"></a><em><br><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#a19">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. </em> <a href="#a19"></a><em><br><br></td></tr>
84 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a20">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. </em> <a href="#a20"></a><em><br><br></td></tr>
87 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a21">GetNetworkName</a> ()</td></tr>
88
89 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the network name, global to all linked servers. </em> <a href="#a21"></a><em><br><br></td></tr>
90 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a22">GetServerDescription</a> ()</td></tr>
91
92 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the server description string of the local server. </em> <a href="#a22"></a><em><br><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#a23">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. </em> <a href="#a23"></a><em><br><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#a24">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. </em> <a href="#a24"></a><em><br><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#a25">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. </em> <a href="#a25"></a><em><br><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#a26">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. </em> <a href="#a26"></a><em><br><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#a27">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. </em> <a href="#a27"></a><em><br><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#a28">SendToModeMask</a> (std::string modes, int flags, std::string 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. </em> <a href="#a28"></a><em><br><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#a29">JoinUserToChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string cname, std::string key)</td></tr>
112
113 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Forces a user to join a channel. </em> <a href="#a29"></a><em><br><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#a30">PartUserFromChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string cname, std::string reason)</td></tr>
115
116 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Forces a user to part a channel. </em> <a href="#a30"></a><em><br><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#a31">ChangeUserNick</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string nickname)</td></tr>
118
119 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Forces a user nickchange. </em> <a href="#a31"></a><em><br><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#a32">QuitUser</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string reason)</td></tr>
121
122 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Forces a user to quit with the specified reason. </em> <a href="#a32"></a><em><br><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#a33">MatchText</a> (std::string sliteral, std::string spattern)</td></tr>
124
125 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Matches text against a glob pattern. </em> <a href="#a33"></a><em><br><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#a34">CallCommandHandler</a> (std::string 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. </em> <a href="#a34"></a><em><br><br></td></tr>
129 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a35">ChangeHost</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string host)</td></tr>
130
131 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change displayed hostname of a user. </em> <a href="#a35"></a><em><br><br></td></tr>
132 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a36">ChangeGECOS</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string gecos)</td></tr>
133
134 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change GECOS (fullname) of a user. </em> <a href="#a36"></a><em><br><br></td></tr>
135 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a37">IsUlined</a> (std::string server)</td></tr>
136
137 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if the servername you give is ulined. </em> <a href="#a37"></a><em><br><br></td></tr>
138 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="modules_8h.html#a33">chanuserlist</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a38">GetUsers</a> (<a class="el" href="classchanrec.html">chanrec</a> *chan)</td></tr>
139
140 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fetches the userlist of a channel. </em> <a href="#a38"></a><em><br><br></td></tr>
141 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a39">UserToPseudo</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string message)</td></tr>
142
143 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove a user's connection to the irc server, but leave their client in existence in the user hash. </em> <a href="#a39"></a><em><br><br></td></tr>
144 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a40">PseudoToUser</a> (<a class="el" href="classuserrec.html">userrec</a> *alive, <a class="el" href="classuserrec.html">userrec</a> *zombie, std::string message)</td></tr>
145
146 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This user takes one user, and switches their file descriptor with another user, so that one user "becomes" the other. </em> <a href="#a40"></a><em><br><br></td></tr>
147 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a41">AddGLine</a> (long duration, std::string source, std::string reason, std::string hostmask)</td></tr>
148
149 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a G-line The G-line is propogated to all of the servers in the mesh and enforced as soon as it is added. </em> <a href="#a41"></a><em><br><br></td></tr>
150 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a42">AddQLine</a> (long duration, std::string source, std::string reason, std::string nickname)</td></tr>
151
152 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a Q-line The Q-line is propogated to all of the servers in the mesh and enforced as soon as it is added. </em> <a href="#a42"></a><em><br><br></td></tr>
153 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a43">AddZLine</a> (long duration, std::string source, std::string reason, std::string ipaddr)</td></tr>
154
155 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a Z-line The Z-line is propogated to all of the servers in the mesh and enforced as soon as it is added. </em> <a href="#a43"></a><em><br><br></td></tr>
156 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a44">AddKLine</a> (long duration, std::string source, std::string reason, std::string hostmask)</td></tr>
157
158 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a K-line The K-line is enforced as soon as it is added. </em> <a href="#a44"></a><em><br><br></td></tr>
159 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a45">AddELine</a> (long duration, std::string source, std::string reason, std::string hostmask)</td></tr>
160
161 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a E-line The E-line is enforced as soon as it is added. </em> <a href="#a45"></a><em><br><br></td></tr>
162 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a46">DelGLine</a> (std::string hostmask)</td></tr>
163
164 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a G-Line from all servers on the mesh. </em> <a href="#a46"></a><em><br><br></td></tr>
165 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a47">DelQLine</a> (std::string nickname)</td></tr>
166
167 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a Q-Line from all servers on the mesh. </em> <a href="#a47"></a><em><br><br></td></tr>
168 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a48">DelZLine</a> (std::string ipaddr)</td></tr>
169
170 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a Z-Line from all servers on the mesh. </em> <a href="#a48"></a><em><br><br></td></tr>
171 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a49">DelKLine</a> (std::string hostmask)</td></tr>
172
173 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a local K-Line. </em> <a href="#a49"></a><em><br><br></td></tr>
174 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a50">DelELine</a> (std::string hostmask)</td></tr>
175
176 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes a local E-Line. </em> <a href="#a50"></a><em><br><br></td></tr>
177 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual long&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a51">CalcDuration</a> (std::string duration)</td></tr>
178
179 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculates a duration This method will take a string containing a formatted duration (e.g. </em> <a href="#a51"></a><em><br><br></td></tr>
180 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a52">IsValidMask</a> (std::string mask)</td></tr>
181
182 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if a nick!ident string is correctly formatted, false if otherwise. </em> <a href="#a52"></a><em><br><br></td></tr>
183 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a53">MeshSendAll</a> (std::string text)</td></tr>
184
185 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends a line of text to all connected servers. </em> <a href="#a53"></a><em><br><br></td></tr>
186 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a54">MeshSendCommon</a> (<a class="el" href="classuserrec.html">userrec</a> *user, std::string text)</td></tr>
187
188 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method sends a line of text to all servers who have users which share common channels with the user you provide. </em> <a href="#a54"></a><em><br><br></td></tr>
189 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a55">MeshSendAllAlive</a> (std::string text)</td></tr>
190
191 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function is equivalent to Server::MeshSendToAll except it will only route to servers which are directly routable. </em> <a href="#a55"></a><em><br><br></td></tr>
192 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a56">MeshSendUnicast</a> (std::string destination, std::string text)</td></tr>
193
194 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function sends a line of text directly to a server. </em> <a href="#a56"></a><em><br><br></td></tr>
195 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a57">MeshSendAllExcept</a> (std::string target, std::string text)</td></tr>
196
197 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function sends to all servers EXCEPT the one you specify. </em> <a href="#a57"></a><em><br><br></td></tr>
198 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a58">MeshCheckChan</a> (<a class="el" href="classchanrec.html">chanrec</a> *c, std::string servername)</td></tr>
199
200 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function is used to check if any users on channel c are on server servername. </em> <a href="#a58"></a><em><br><br></td></tr>
201 <tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classServer.html#a59">MeshCheckCommon</a> (<a class="el" href="classuserrec.html">userrec</a> *u, std::string servername)</td></tr>
202
203 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function is used to check if user u has any channels in common with users on servername. </em> <a href="#a59"></a><em><br><br></td></tr>
204 <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#a60">FindModule</a> (std::string name)</td></tr>
205
206 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function finds a module by name. </em> <a href="#a60"></a><em><br><br></td></tr>
207 </table>
208 <hr><a name="_details"></a><h2>Detailed Description</h2>
209 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. 
210 <p>
211 All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks. 
212 <p>
213
214 <p>
215 Definition at line <a class="el" href="modules_8h-source.html#l00694">694</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
216 <a name="a0" doxytag="Server::Server"></a><p>
217 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
218   <tr>
219     <td class="mdRow">
220       <table cellpadding="0" cellspacing="0" border="0">
221         <tr>
222           <td class="md" nowrap valign="top"> Server::Server </td>
223           <td class="md" valign="top">(&nbsp;</td>
224           <td class="mdname1" valign="top" nowrap>          </td>
225           <td class="md" valign="top">&nbsp;)&nbsp;</td>
226           <td class="md" nowrap></td>
227         </tr>
228
229       </table>
230     </td>
231   </tr>
232 </table>
233 <table cellspacing=5 cellpadding=0 border=0>
234   <tr>
235     <td>
236       &nbsp;
237     </td>
238     <td>
239
240 <p>
241 Default constructor. 
242 <p>
243 Creates a Server object.
244 <p>
245 Definition at line <a class="el" href="modules_8cpp-source.html#l00364">364</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
246 <p>
247 <div class="fragment"><pre>00365 {
248 00366 }
249 </pre></div>    </td>
250   </tr>
251 </table>
252 <a name="a1" doxytag="Server::~Server"></a><p>
253 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
254   <tr>
255     <td class="mdRow">
256       <table cellpadding="0" cellspacing="0" border="0">
257         <tr>
258           <td class="md" nowrap valign="top"> Server::~<a class="el" href="classServer.html">Server</a> </td>
259           <td class="md" valign="top">(&nbsp;</td>
260           <td class="mdname1" valign="top" nowrap>          </td>
261           <td class="md" valign="top">&nbsp;)&nbsp;</td>
262           <td class="md" nowrap><code> [virtual]</code></td>
263         </tr>
264
265       </table>
266     </td>
267   </tr>
268 </table>
269 <table cellspacing=5 cellpadding=0 border=0>
270   <tr>
271     <td>
272       &nbsp;
273     </td>
274     <td>
275
276 <p>
277 Default destructor. 
278 <p>
279 Destroys a Server object.
280 <p>
281 Definition at line <a class="el" href="modules_8cpp-source.html#l00368">368</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
282 <p>
283 <div class="fragment"><pre>00369 {
284 00370 }
285 </pre></div>    </td>
286   </tr>
287 </table>
288 <hr><h2>Member Function Documentation</h2>
289 <a name="a26" doxytag="Server::AddCommand"></a><p>
290 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
291   <tr>
292     <td class="mdRow">
293       <table cellpadding="0" cellspacing="0" border="0">
294         <tr>
295           <td class="md" nowrap valign="top"> void Server::AddCommand </td>
296           <td class="md" valign="top">(&nbsp;</td>
297           <td class="md" nowrap valign="top">char *&nbsp;</td>
298           <td class="mdname" nowrap> <em>cmd</em>, </td>
299         </tr>
300         <tr>
301           <td></td>
302           <td></td>
303           <td class="md" nowrap>handlerfunc&nbsp;</td>
304           <td class="mdname" nowrap> <em>f</em>, </td>
305         </tr>
306         <tr>
307           <td></td>
308           <td></td>
309           <td class="md" nowrap>char&nbsp;</td>
310           <td class="mdname" nowrap> <em>flags</em>, </td>
311         </tr>
312         <tr>
313           <td></td>
314           <td></td>
315           <td class="md" nowrap>int&nbsp;</td>
316           <td class="mdname" nowrap> <em>minparams</em>, </td>
317         </tr>
318         <tr>
319           <td></td>
320           <td></td>
321           <td class="md" nowrap>char *&nbsp;</td>
322           <td class="mdname" nowrap> <em>source</em></td>
323         </tr>
324         <tr>
325           <td></td>
326           <td class="md">)&nbsp;</td>
327           <td class="md" colspan="2"><code> [virtual]</code></td>
328         </tr>
329
330       </table>
331     </td>
332   </tr>
333 </table>
334 <table cellspacing=5 cellpadding=0 border=0>
335   <tr>
336     <td>
337       &nbsp;
338     </td>
339     <td>
340
341 <p>
342 Adds a command to the command table. 
343 <p>
344 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>
345 typedef void (handlerfunc) (char**, int, userrec*); ... void <a class="el" href="commands_8h.html#a5">handle_kill(char **parameters, int pcnt, userrec *user)</a><p>
346 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.
347 <p>
348 Definition at line <a class="el" href="modules_8cpp-source.html#l00437">437</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
349 <p>
350 References <a class="el" href="modules_8h.html#a35">createcommand()</a>.
351 <p>
352 <div class="fragment"><pre>00438 {
353 00439         <a class="code" href="modules_8h.html#a35">createcommand</a>(cmd,f,flags,minparams,source);
354 00440 }
355 </pre></div>    </td>
356   </tr>
357 </table>
358 <a name="a45" doxytag="Server::AddELine"></a><p>
359 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
360   <tr>
361     <td class="mdRow">
362       <table cellpadding="0" cellspacing="0" border="0">
363         <tr>
364           <td class="md" nowrap valign="top"> void Server::AddELine </td>
365           <td class="md" valign="top">(&nbsp;</td>
366           <td class="md" nowrap valign="top">long&nbsp;</td>
367           <td class="mdname" nowrap> <em>duration</em>, </td>
368         </tr>
369         <tr>
370           <td></td>
371           <td></td>
372           <td class="md" nowrap>std::string&nbsp;</td>
373           <td class="mdname" nowrap> <em>source</em>, </td>
374         </tr>
375         <tr>
376           <td></td>
377           <td></td>
378           <td class="md" nowrap>std::string&nbsp;</td>
379           <td class="mdname" nowrap> <em>reason</em>, </td>
380         </tr>
381         <tr>
382           <td></td>
383           <td></td>
384           <td class="md" nowrap>std::string&nbsp;</td>
385           <td class="mdname" nowrap> <em>hostmask</em></td>
386         </tr>
387         <tr>
388           <td></td>
389           <td class="md">)&nbsp;</td>
390           <td class="md" colspan="2"><code> [virtual]</code></td>
391         </tr>
392
393       </table>
394     </td>
395   </tr>
396 </table>
397 <table cellspacing=5 cellpadding=0 border=0>
398   <tr>
399     <td>
400       &nbsp;
401     </td>
402     <td>
403
404 <p>
405 Adds a E-line The E-line is enforced as soon as it is added. 
406 <p>
407 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#a51">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. 
408 <p>
409 Definition at line <a class="el" href="modules_8cpp-source.html#l00699">699</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
410 <p>
411 References <a class="el" href="xline_8h.html#a5">add_eline()</a>, and <a class="el" href="commands_8h.html#a76">duration()</a>.
412 <p>
413 <div class="fragment"><pre>00700 {
414 00701         <a class="code" href="xline_8h.html#a5">add_eline</a>(duration, source.c_str(), reason.c_str(), hostmask.c_str());
415 00702 }
416 </pre></div>    </td>
417   </tr>
418 </table>
419 <a name="a25" doxytag="Server::AddExtendedListMode"></a><p>
420 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
421   <tr>
422     <td class="mdRow">
423       <table cellpadding="0" cellspacing="0" border="0">
424         <tr>
425           <td class="md" nowrap valign="top"> bool Server::AddExtendedListMode </td>
426           <td class="md" valign="top">(&nbsp;</td>
427           <td class="md" nowrap valign="top">char&nbsp;</td>
428           <td class="mdname1" valign="top" nowrap> <em>modechar</em>          </td>
429           <td class="md" valign="top">&nbsp;)&nbsp;</td>
430           <td class="md" nowrap><code> [virtual]</code></td>
431         </tr>
432
433       </table>
434     </td>
435   </tr>
436 </table>
437 <table cellspacing=5 cellpadding=0 border=0>
438   <tr>
439     <td>
440       &nbsp;
441     </td>
442     <td>
443
444 <p>
445 Adds an extended mode letter which is parsed by a module and handled in a list fashion. 
446 <p>
447 This call is used to implement modes like +q and +a. The characteristics of these modes are as follows:<p>
448 (1) They are ALWAYS on channels, not on users, therefore their type is MT_CHANNEL<p>
449 (2) They always take exactly one parameter when being added or removed<p>
450 (3) They can be set multiple times, usually on users in channels<p>
451 (4) The mode and its parameter are NOT stored in the channels modes structure<p>
452 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.
453 <p>
454 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>.
455 <p>
456 References <a class="el" href="modules_8cpp-source.html#l00218">DoAddExtendedMode()</a>, <a class="el" href="modules_8cpp-source.html#l00228">ModeMakeList()</a>, and <a class="el" href="modules_8h-source.html#l00031">MT_CHANNEL</a>.
457 <p>
458 <div class="fragment"><pre>00606 {
459 00607         <span class="keywordtype">bool</span> res = <a class="code" href="modules_8cpp.html#a57">DoAddExtendedMode</a>(modechar,MT_CHANNEL,<span class="keyword">false</span>,1,1);
460 00608         <span class="keywordflow">if</span> (res)
461 00609                 <a class="code" href="modules_8cpp.html#a58">ModeMakeList</a>(modechar);
462 00610         <span class="keywordflow">return</span> res;
463 00611 }
464 </pre></div>    </td>
465   </tr>
466 </table>
467 <a name="a24" doxytag="Server::AddExtendedMode"></a><p>
468 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
469   <tr>
470     <td class="mdRow">
471       <table cellpadding="0" cellspacing="0" border="0">
472         <tr>
473           <td class="md" nowrap valign="top"> bool Server::AddExtendedMode </td>
474           <td class="md" valign="top">(&nbsp;</td>
475           <td class="md" nowrap valign="top">char&nbsp;</td>
476           <td class="mdname" nowrap> <em>modechar</em>, </td>
477         </tr>
478         <tr>
479           <td></td>
480           <td></td>
481           <td class="md" nowrap>int&nbsp;</td>
482           <td class="mdname" nowrap> <em>type</em>, </td>
483         </tr>
484         <tr>
485           <td></td>
486           <td></td>
487           <td class="md" nowrap>bool&nbsp;</td>
488           <td class="mdname" nowrap> <em>requires_oper</em>, </td>
489         </tr>
490         <tr>
491           <td></td>
492           <td></td>
493           <td class="md" nowrap>int&nbsp;</td>
494           <td class="mdname" nowrap> <em>params_when_on</em>, </td>
495         </tr>
496         <tr>
497           <td></td>
498           <td></td>
499           <td class="md" nowrap>int&nbsp;</td>
500           <td class="mdname" nowrap> <em>params_when_off</em></td>
501         </tr>
502         <tr>
503           <td></td>
504           <td class="md">)&nbsp;</td>
505           <td class="md" colspan="2"><code> [virtual]</code></td>
506         </tr>
507
508       </table>
509     </td>
510   </tr>
511 </table>
512 <table cellspacing=5 cellpadding=0 border=0>
513   <tr>
514     <td>
515       &nbsp;
516     </td>
517     <td>
518
519 <p>
520 Adds an extended mode letter which is parsed by a module. 
521 <p>
522 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.
523 <p>
524 Definition at line <a class="el" href="modules_8cpp-source.html#l00577">577</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
525 <p>
526 References <a class="el" href="modules_8h-source.html#l00023">DEBUG</a>, <a class="el" href="modules_8cpp-source.html#l00218">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>.
527 <p>
528 <div class="fragment"><pre>00578 {
529 00579         <span class="keywordflow">if</span> (((modechar &gt;= <span class="charliteral">'A'</span>) &amp;&amp; (modechar &lt;= 'Z')) || ((modechar &gt;= <span class="charliteral">'a'</span>) &amp;&amp; (modechar &lt;= <span class="charliteral">'z'</span>)))
530 00580         {
531 00581                 <span class="keywordflow">if</span> (type == <a class="code" href="modules_8h.html#a7">MT_SERVER</a>)
532 00582                 {
533 00583                         log(DEBUG,<span class="stringliteral">"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"</span>);
534 00584                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
535 00585                 }
536 00586                 <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#a6">MT_CLIENT</a>))
537 00587                 {
538 00588                         log(DEBUG,<span class="stringliteral">"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"</span>);
539 00589                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
540 00590                 }
541 00591                 <span class="keywordflow">if</span> ((params_when_on&gt;1) || (params_when_off&gt;1))
542 00592                 {
543 00593                         log(DEBUG,<span class="stringliteral">"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"</span>);
544 00594                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
545 00595                 }
546 00596                 <span class="keywordflow">return</span> <a class="code" href="modules_8cpp.html#a57">DoAddExtendedMode</a>(modechar,type,requires_oper,params_when_on,params_when_off);
547 00597         }
548 00598         <span class="keywordflow">else</span>
549 00599         {
550 00600                 log(DEBUG,<span class="stringliteral">"*** API ERROR *** Muppet modechar detected."</span>);
551 00601         }
552 00602         <span class="keywordflow">return</span> <span class="keyword">false</span>;
553 00603 }
554 </pre></div>    </td>
555   </tr>
556 </table>
557 <a name="a41" doxytag="Server::AddGLine"></a><p>
558 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
559   <tr>
560     <td class="mdRow">
561       <table cellpadding="0" cellspacing="0" border="0">
562         <tr>
563           <td class="md" nowrap valign="top"> void Server::AddGLine </td>
564           <td class="md" valign="top">(&nbsp;</td>
565           <td class="md" nowrap valign="top">long&nbsp;</td>
566           <td class="mdname" nowrap> <em>duration</em>, </td>
567         </tr>
568         <tr>
569           <td></td>
570           <td></td>
571           <td class="md" nowrap>std::string&nbsp;</td>
572           <td class="mdname" nowrap> <em>source</em>, </td>
573         </tr>
574         <tr>
575           <td></td>
576           <td></td>
577           <td class="md" nowrap>std::string&nbsp;</td>
578           <td class="mdname" nowrap> <em>reason</em>, </td>
579         </tr>
580         <tr>
581           <td></td>
582           <td></td>
583           <td class="md" nowrap>std::string&nbsp;</td>
584           <td class="mdname" nowrap> <em>hostmask</em></td>
585         </tr>
586         <tr>
587           <td></td>
588           <td class="md">)&nbsp;</td>
589           <td class="md" colspan="2"><code> [virtual]</code></td>
590         </tr>
591
592       </table>
593     </td>
594   </tr>
595 </table>
596 <table cellspacing=5 cellpadding=0 border=0>
597   <tr>
598     <td>
599       &nbsp;
600     </td>
601     <td>
602
603 <p>
604 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. 
605 <p>
606 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#a51">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.
607 <p>
608 Definition at line <a class="el" href="modules_8cpp-source.html#l00679">679</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
609 <p>
610 References <a class="el" href="xline_8h.html#a1">add_gline()</a>, and <a class="el" href="commands_8h.html#a76">duration()</a>.
611 <p>
612 <div class="fragment"><pre>00680 {
613 00681         <a class="code" href="xline_8h.html#a1">add_gline</a>(duration, source.c_str(), reason.c_str(), hostmask.c_str());
614 00682 }
615 </pre></div>    </td>
616   </tr>
617 </table>
618 <a name="a44" doxytag="Server::AddKLine"></a><p>
619 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
620   <tr>
621     <td class="mdRow">
622       <table cellpadding="0" cellspacing="0" border="0">
623         <tr>
624           <td class="md" nowrap valign="top"> void Server::AddKLine </td>
625           <td class="md" valign="top">(&nbsp;</td>
626           <td class="md" nowrap valign="top">long&nbsp;</td>
627           <td class="mdname" nowrap> <em>duration</em>, </td>
628         </tr>
629         <tr>
630           <td></td>
631           <td></td>
632           <td class="md" nowrap>std::string&nbsp;</td>
633           <td class="mdname" nowrap> <em>source</em>, </td>
634         </tr>
635         <tr>
636           <td></td>
637           <td></td>
638           <td class="md" nowrap>std::string&nbsp;</td>
639           <td class="mdname" nowrap> <em>reason</em>, </td>
640         </tr>
641         <tr>
642           <td></td>
643           <td></td>
644           <td class="md" nowrap>std::string&nbsp;</td>
645           <td class="mdname" nowrap> <em>hostmask</em></td>
646         </tr>
647         <tr>
648           <td></td>
649           <td class="md">)&nbsp;</td>
650           <td class="md" colspan="2"><code> [virtual]</code></td>
651         </tr>
652
653       </table>
654     </td>
655   </tr>
656 </table>
657 <table cellspacing=5 cellpadding=0 border=0>
658   <tr>
659     <td>
660       &nbsp;
661     </td>
662     <td>
663
664 <p>
665 Adds a K-line The K-line is enforced as soon as it is added. 
666 <p>
667 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#a51">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. 
668 <p>
669 Definition at line <a class="el" href="modules_8cpp-source.html#l00694">694</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
670 <p>
671 References <a class="el" href="xline_8h.html#a4">add_kline()</a>, and <a class="el" href="commands_8h.html#a76">duration()</a>.
672 <p>
673 <div class="fragment"><pre>00695 {
674 00696         <a class="code" href="xline_8h.html#a4">add_kline</a>(duration, source.c_str(), reason.c_str(), hostmask.c_str());
675 00697 }
676 </pre></div>    </td>
677   </tr>
678 </table>
679 <a name="a42" doxytag="Server::AddQLine"></a><p>
680 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
681   <tr>
682     <td class="mdRow">
683       <table cellpadding="0" cellspacing="0" border="0">
684         <tr>
685           <td class="md" nowrap valign="top"> void Server::AddQLine </td>
686           <td class="md" valign="top">(&nbsp;</td>
687           <td class="md" nowrap valign="top">long&nbsp;</td>
688           <td class="mdname" nowrap> <em>duration</em>, </td>
689         </tr>
690         <tr>
691           <td></td>
692           <td></td>
693           <td class="md" nowrap>std::string&nbsp;</td>
694           <td class="mdname" nowrap> <em>source</em>, </td>
695         </tr>
696         <tr>
697           <td></td>
698           <td></td>
699           <td class="md" nowrap>std::string&nbsp;</td>
700           <td class="mdname" nowrap> <em>reason</em>, </td>
701         </tr>
702         <tr>
703           <td></td>
704           <td></td>
705           <td class="md" nowrap>std::string&nbsp;</td>
706           <td class="mdname" nowrap> <em>nickname</em></td>
707         </tr>
708         <tr>
709           <td></td>
710           <td class="md">)&nbsp;</td>
711           <td class="md" colspan="2"><code> [virtual]</code></td>
712         </tr>
713
714       </table>
715     </td>
716   </tr>
717 </table>
718 <table cellspacing=5 cellpadding=0 border=0>
719   <tr>
720     <td>
721       &nbsp;
722     </td>
723     <td>
724
725 <p>
726 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. 
727 <p>
728 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#a51">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. 
729 <p>
730 Definition at line <a class="el" href="modules_8cpp-source.html#l00684">684</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
731 <p>
732 References <a class="el" href="xline_8h.html#a2">add_qline()</a>, and <a class="el" href="commands_8h.html#a76">duration()</a>.
733 <p>
734 <div class="fragment"><pre>00685 {
735 00686         <a class="code" href="xline_8h.html#a2">add_qline</a>(duration, source.c_str(), reason.c_str(), nickname.c_str());
736 00687 }
737 </pre></div>    </td>
738   </tr>
739 </table>
740 <a name="a43" doxytag="Server::AddZLine"></a><p>
741 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
742   <tr>
743     <td class="mdRow">
744       <table cellpadding="0" cellspacing="0" border="0">
745         <tr>
746           <td class="md" nowrap valign="top"> void Server::AddZLine </td>
747           <td class="md" valign="top">(&nbsp;</td>
748           <td class="md" nowrap valign="top">long&nbsp;</td>
749           <td class="mdname" nowrap> <em>duration</em>, </td>
750         </tr>
751         <tr>
752           <td></td>
753           <td></td>
754           <td class="md" nowrap>std::string&nbsp;</td>
755           <td class="mdname" nowrap> <em>source</em>, </td>
756         </tr>
757         <tr>
758           <td></td>
759           <td></td>
760           <td class="md" nowrap>std::string&nbsp;</td>
761           <td class="mdname" nowrap> <em>reason</em>, </td>
762         </tr>
763         <tr>
764           <td></td>
765           <td></td>
766           <td class="md" nowrap>std::string&nbsp;</td>
767           <td class="mdname" nowrap> <em>ipaddr</em></td>
768         </tr>
769         <tr>
770           <td></td>
771           <td class="md">)&nbsp;</td>
772           <td class="md" colspan="2"><code> [virtual]</code></td>
773         </tr>
774
775       </table>
776     </td>
777   </tr>
778 </table>
779 <table cellspacing=5 cellpadding=0 border=0>
780   <tr>
781     <td>
782       &nbsp;
783     </td>
784     <td>
785
786 <p>
787 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. 
788 <p>
789 The duration must be in seconds, however you can use the <a class="el" href="classServer.html#a51">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. 
790 <p>
791 Definition at line <a class="el" href="modules_8cpp-source.html#l00689">689</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
792 <p>
793 References <a class="el" href="xline_8h.html#a3">add_zline()</a>, and <a class="el" href="commands_8h.html#a76">duration()</a>.
794 <p>
795 <div class="fragment"><pre>00690 {
796 00691         <a class="code" href="xline_8h.html#a3">add_zline</a>(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
797 00692 }
798 </pre></div>    </td>
799   </tr>
800 </table>
801 <a name="a51" doxytag="Server::CalcDuration"></a><p>
802 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
803   <tr>
804     <td class="mdRow">
805       <table cellpadding="0" cellspacing="0" border="0">
806         <tr>
807           <td class="md" nowrap valign="top"> long Server::CalcDuration </td>
808           <td class="md" valign="top">(&nbsp;</td>
809           <td class="md" nowrap valign="top">std::string&nbsp;</td>
810           <td class="mdname1" valign="top" nowrap> <em>duration</em>          </td>
811           <td class="md" valign="top">&nbsp;)&nbsp;</td>
812           <td class="md" nowrap><code> [virtual]</code></td>
813         </tr>
814
815       </table>
816     </td>
817   </tr>
818 </table>
819 <table cellspacing=5 cellpadding=0 border=0>
820   <tr>
821     <td>
822       &nbsp;
823     </td>
824     <td>
825
826 <p>
827 Calculates a duration This method will take a string containing a formatted duration (e.g. 
828 <p>
829 "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.
830 <p>
831 Definition at line <a class="el" href="modules_8cpp-source.html#l00729">729</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
832 <p>
833 References <a class="el" href="commands_8h.html#a76">duration()</a>.
834 <p>
835 <div class="fragment"><pre>00730 {
836 00731         <span class="keywordflow">return</span> <a class="code" href="commands_8h.html#a76">duration</a>(delta.c_str());
837 00732 }
838 </pre></div>    </td>
839   </tr>
840 </table>
841 <a name="a34" doxytag="Server::CallCommandHandler"></a><p>
842 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
843   <tr>
844     <td class="mdRow">
845       <table cellpadding="0" cellspacing="0" border="0">
846         <tr>
847           <td class="md" nowrap valign="top"> void Server::CallCommandHandler </td>
848           <td class="md" valign="top">(&nbsp;</td>
849           <td class="md" nowrap valign="top">std::string&nbsp;</td>
850           <td class="mdname" nowrap> <em>commandname</em>, </td>
851         </tr>
852         <tr>
853           <td></td>
854           <td></td>
855           <td class="md" nowrap>char **&nbsp;</td>
856           <td class="mdname" nowrap> <em>parameters</em>, </td>
857         </tr>
858         <tr>
859           <td></td>
860           <td></td>
861           <td class="md" nowrap>int&nbsp;</td>
862           <td class="mdname" nowrap> <em>pcnt</em>, </td>
863         </tr>
864         <tr>
865           <td></td>
866           <td></td>
867           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
868           <td class="mdname" nowrap> <em>user</em></td>
869         </tr>
870         <tr>
871           <td></td>
872           <td class="md">)&nbsp;</td>
873           <td class="md" colspan="2"><code> [virtual]</code></td>
874         </tr>
875
876       </table>
877     </td>
878   </tr>
879 </table>
880 <table cellspacing=5 cellpadding=0 border=0>
881   <tr>
882     <td>
883       &nbsp;
884     </td>
885     <td>
886
887 <p>
888 Calls the handler for a command, either implemented by the core or by another module. 
889 <p>
890 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>
891 ) 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#a26">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.
892 <p>
893 Definition at line <a class="el" href="modules_8cpp-source.html#l00427">427</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
894 <p>
895 <div class="fragment"><pre>00428 {
896 00429         call_handler(commandname.c_str(),parameters,pcnt,user);
897 00430 }
898 </pre></div>    </td>
899   </tr>
900 </table>
901 <a name="a36" doxytag="Server::ChangeGECOS"></a><p>
902 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
903   <tr>
904     <td class="mdRow">
905       <table cellpadding="0" cellspacing="0" border="0">
906         <tr>
907           <td class="md" nowrap valign="top"> void Server::ChangeGECOS </td>
908           <td class="md" valign="top">(&nbsp;</td>
909           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
910           <td class="mdname" nowrap> <em>user</em>, </td>
911         </tr>
912         <tr>
913           <td></td>
914           <td></td>
915           <td class="md" nowrap>std::string&nbsp;</td>
916           <td class="mdname" nowrap> <em>gecos</em></td>
917         </tr>
918         <tr>
919           <td></td>
920           <td class="md">)&nbsp;</td>
921           <td class="md" colspan="2"><code> [virtual]</code></td>
922         </tr>
923
924       </table>
925     </td>
926   </tr>
927 </table>
928 <table cellspacing=5 cellpadding=0 border=0>
929   <tr>
930     <td>
931       &nbsp;
932     </td>
933     <td>
934
935 <p>
936 Change GECOS (fullname) of a user. 
937 <p>
938 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.
939 <p>
940 Definition at line <a class="el" href="modules_8cpp-source.html#l00520">520</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
941 <p>
942 References <a class="el" href="message_8h.html#a8">ChangeName()</a>.
943 <p>
944 <div class="fragment"><pre>00521 {
945 00522         <a class="code" href="message_8h.html#a8">ChangeName</a>(user,gecos.c_str());
946 00523 }
947 </pre></div>    </td>
948   </tr>
949 </table>
950 <a name="a35" doxytag="Server::ChangeHost"></a><p>
951 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
952   <tr>
953     <td class="mdRow">
954       <table cellpadding="0" cellspacing="0" border="0">
955         <tr>
956           <td class="md" nowrap valign="top"> void Server::ChangeHost </td>
957           <td class="md" valign="top">(&nbsp;</td>
958           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
959           <td class="mdname" nowrap> <em>user</em>, </td>
960         </tr>
961         <tr>
962           <td></td>
963           <td></td>
964           <td class="md" nowrap>std::string&nbsp;</td>
965           <td class="mdname" nowrap> <em>host</em></td>
966         </tr>
967         <tr>
968           <td></td>
969           <td class="md">)&nbsp;</td>
970           <td class="md" colspan="2"><code> [virtual]</code></td>
971         </tr>
972
973       </table>
974     </td>
975   </tr>
976 </table>
977 <table cellspacing=5 cellpadding=0 border=0>
978   <tr>
979     <td>
980       &nbsp;
981     </td>
982     <td>
983
984 <p>
985 Change displayed hostname of a user. 
986 <p>
987 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.
988 <p>
989 Definition at line <a class="el" href="modules_8cpp-source.html#l00515">515</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
990 <p>
991 References <a class="el" href="message_8h.html#a9">ChangeDisplayedHost()</a>.
992 <p>
993 <div class="fragment"><pre>00516 {
994 00517         <a class="code" href="message_8h.html#a9">ChangeDisplayedHost</a>(user,host.c_str());
995 00518 }
996 </pre></div>    </td>
997   </tr>
998 </table>
999 <a name="a31" doxytag="Server::ChangeUserNick"></a><p>
1000 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1001   <tr>
1002     <td class="mdRow">
1003       <table cellpadding="0" cellspacing="0" border="0">
1004         <tr>
1005           <td class="md" nowrap valign="top"> void Server::ChangeUserNick </td>
1006           <td class="md" valign="top">(&nbsp;</td>
1007           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1008           <td class="mdname" nowrap> <em>user</em>, </td>
1009         </tr>
1010         <tr>
1011           <td></td>
1012           <td></td>
1013           <td class="md" nowrap>std::string&nbsp;</td>
1014           <td class="mdname" nowrap> <em>nickname</em></td>
1015         </tr>
1016         <tr>
1017           <td></td>
1018           <td class="md">)&nbsp;</td>
1019           <td class="md" colspan="2"><code> [virtual]</code></td>
1020         </tr>
1021
1022       </table>
1023     </td>
1024   </tr>
1025 </table>
1026 <table cellspacing=5 cellpadding=0 border=0>
1027   <tr>
1028     <td>
1029       &nbsp;
1030     </td>
1031     <td>
1032
1033 <p>
1034 Forces a user nickchange. 
1035 <p>
1036 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.
1037 <p>
1038 Definition at line <a class="el" href="modules_8cpp-source.html#l00412">412</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1039 <p>
1040 <div class="fragment"><pre>00413 {
1041 00414         force_nickchange(user,nickname.c_str());
1042 00415 }
1043 </pre></div>    </td>
1044   </tr>
1045 </table>
1046 <a name="a18" doxytag="Server::ChanMode"></a><p>
1047 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1048   <tr>
1049     <td class="mdRow">
1050       <table cellpadding="0" cellspacing="0" border="0">
1051         <tr>
1052           <td class="md" nowrap valign="top"> std::string Server::ChanMode </td>
1053           <td class="md" valign="top">(&nbsp;</td>
1054           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1055           <td class="mdname" nowrap> <em>User</em>, </td>
1056         </tr>
1057         <tr>
1058           <td></td>
1059           <td></td>
1060           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1061           <td class="mdname" nowrap> <em>Chan</em></td>
1062         </tr>
1063         <tr>
1064           <td></td>
1065           <td class="md">)&nbsp;</td>
1066           <td class="md" colspan="2"><code> [virtual]</code></td>
1067         </tr>
1068
1069       </table>
1070     </td>
1071   </tr>
1072 </table>
1073 <table cellspacing=5 cellpadding=0 border=0>
1074   <tr>
1075     <td>
1076       &nbsp;
1077     </td>
1078     <td>
1079
1080 <p>
1081 Attempts to look up a user's privilages on a channel. 
1082 <p>
1083 This function will return a string containing either @, , +, or an empty string, representing the user's privilages upon the channel you specify.
1084 <p>
1085 Definition at line <a class="el" href="modules_8cpp-source.html#l00545">545</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1086 <p>
1087 References <a class="el" href="message_8h.html#a12">cmode()</a>.
1088 <p>
1089 <div class="fragment"><pre>00546 {
1090 00547         <span class="keywordflow">return</span> <a class="code" href="message_8h.html#a12">cmode</a>(User,Chan);
1091 00548 }
1092 </pre></div>    </td>
1093   </tr>
1094 </table>
1095 <a name="a10" doxytag="Server::CommonChannels"></a><p>
1096 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1097   <tr>
1098     <td class="mdRow">
1099       <table cellpadding="0" cellspacing="0" border="0">
1100         <tr>
1101           <td class="md" nowrap valign="top"> bool Server::CommonChannels </td>
1102           <td class="md" valign="top">(&nbsp;</td>
1103           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1104           <td class="mdname" nowrap> <em>u1</em>, </td>
1105         </tr>
1106         <tr>
1107           <td></td>
1108           <td></td>
1109           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1110           <td class="mdname" nowrap> <em>u2</em></td>
1111         </tr>
1112         <tr>
1113           <td></td>
1114           <td class="md">)&nbsp;</td>
1115           <td class="md" colspan="2"><code> [virtual]</code></td>
1116         </tr>
1117
1118       </table>
1119     </td>
1120   </tr>
1121 </table>
1122 <table cellspacing=5 cellpadding=0 border=0>
1123   <tr>
1124     <td>
1125       &nbsp;
1126     </td>
1127     <td>
1128
1129 <p>
1130 Returns true if two users share a common channel. 
1131 <p>
1132 This method is used internally by the NICK and QUIT commands, and the <a class="el" href="classServer.html#a11">Server::SendCommon</a> method.
1133 <p>
1134 Definition at line <a class="el" href="modules_8cpp-source.html#l00493">493</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1135 <p>
1136 References <a class="el" href="message_8h.html#a0">common_channels()</a>.
1137 <p>
1138 <div class="fragment"><pre>00494 {
1139 00495         <span class="keywordflow">return</span> (<a class="code" href="message_8h.html#a0">common_channels</a>(u1,u2) != 0);
1140 00496 }
1141 </pre></div>    </td>
1142   </tr>
1143 </table>
1144 <a name="a14" doxytag="Server::CountUsers"></a><p>
1145 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1146   <tr>
1147     <td class="mdRow">
1148       <table cellpadding="0" cellspacing="0" border="0">
1149         <tr>
1150           <td class="md" nowrap valign="top"> int Server::CountUsers </td>
1151           <td class="md" valign="top">(&nbsp;</td>
1152           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1153           <td class="mdname1" valign="top" nowrap> <em>c</em>          </td>
1154           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1155           <td class="md" nowrap><code> [virtual]</code></td>
1156         </tr>
1157
1158       </table>
1159     </td>
1160   </tr>
1161 </table>
1162 <table cellspacing=5 cellpadding=0 border=0>
1163   <tr>
1164     <td>
1165       &nbsp;
1166     </td>
1167     <td>
1168
1169 <p>
1170 Returns a count of the number of users on a channel. 
1171 <p>
1172 This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel.
1173 <p>
1174 Definition at line <a class="el" href="modules_8cpp-source.html#l00613">613</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1175 <p>
1176 <div class="fragment"><pre>00614 {
1177 00615         <span class="keywordflow">return</span> usercount(c);
1178 00616 }
1179 </pre></div>    </td>
1180   </tr>
1181 </table>
1182 <a name="a50" doxytag="Server::DelELine"></a><p>
1183 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1184   <tr>
1185     <td class="mdRow">
1186       <table cellpadding="0" cellspacing="0" border="0">
1187         <tr>
1188           <td class="md" nowrap valign="top"> bool Server::DelELine </td>
1189           <td class="md" valign="top">(&nbsp;</td>
1190           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1191           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1192           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1193           <td class="md" nowrap><code> [virtual]</code></td>
1194         </tr>
1195
1196       </table>
1197     </td>
1198   </tr>
1199 </table>
1200 <table cellspacing=5 cellpadding=0 border=0>
1201   <tr>
1202     <td>
1203       &nbsp;
1204     </td>
1205     <td>
1206
1207 <p>
1208 Deletes a local E-Line. 
1209 <p>
1210
1211 <p>
1212 Definition at line <a class="el" href="modules_8cpp-source.html#l00724">724</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1213 <p>
1214 References <a class="el" href="xline_8h.html#a10">del_eline()</a>.
1215 <p>
1216 <div class="fragment"><pre>00725 {
1217 00726         <a class="code" href="xline_8h.html#a10">del_eline</a>(hostmask.c_str());
1218 00727 }
1219 </pre></div>    </td>
1220   </tr>
1221 </table>
1222 <a name="a46" doxytag="Server::DelGLine"></a><p>
1223 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1224   <tr>
1225     <td class="mdRow">
1226       <table cellpadding="0" cellspacing="0" border="0">
1227         <tr>
1228           <td class="md" nowrap valign="top"> bool Server::DelGLine </td>
1229           <td class="md" valign="top">(&nbsp;</td>
1230           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1231           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1232           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1233           <td class="md" nowrap><code> [virtual]</code></td>
1234         </tr>
1235
1236       </table>
1237     </td>
1238   </tr>
1239 </table>
1240 <table cellspacing=5 cellpadding=0 border=0>
1241   <tr>
1242     <td>
1243       &nbsp;
1244     </td>
1245     <td>
1246
1247 <p>
1248 Deletes a G-Line from all servers on the mesh. 
1249 <p>
1250
1251 <p>
1252 Definition at line <a class="el" href="modules_8cpp-source.html#l00704">704</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1253 <p>
1254 References <a class="el" href="xline_8h.html#a6">del_gline()</a>.
1255 <p>
1256 <div class="fragment"><pre>00705 {
1257 00706         <a class="code" href="xline_8h.html#a6">del_gline</a>(hostmask.c_str());
1258 00707 }
1259 </pre></div>    </td>
1260   </tr>
1261 </table>
1262 <a name="a49" doxytag="Server::DelKLine"></a><p>
1263 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1264   <tr>
1265     <td class="mdRow">
1266       <table cellpadding="0" cellspacing="0" border="0">
1267         <tr>
1268           <td class="md" nowrap valign="top"> bool Server::DelKLine </td>
1269           <td class="md" valign="top">(&nbsp;</td>
1270           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1271           <td class="mdname1" valign="top" nowrap> <em>hostmask</em>          </td>
1272           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1273           <td class="md" nowrap><code> [virtual]</code></td>
1274         </tr>
1275
1276       </table>
1277     </td>
1278   </tr>
1279 </table>
1280 <table cellspacing=5 cellpadding=0 border=0>
1281   <tr>
1282     <td>
1283       &nbsp;
1284     </td>
1285     <td>
1286
1287 <p>
1288 Deletes a local K-Line. 
1289 <p>
1290
1291 <p>
1292 Definition at line <a class="el" href="modules_8cpp-source.html#l00719">719</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1293 <p>
1294 References <a class="el" href="xline_8h.html#a9">del_kline()</a>.
1295 <p>
1296 <div class="fragment"><pre>00720 {
1297 00721         <a class="code" href="xline_8h.html#a9">del_kline</a>(hostmask.c_str());
1298 00722 }
1299 </pre></div>    </td>
1300   </tr>
1301 </table>
1302 <a name="a47" doxytag="Server::DelQLine"></a><p>
1303 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1304   <tr>
1305     <td class="mdRow">
1306       <table cellpadding="0" cellspacing="0" border="0">
1307         <tr>
1308           <td class="md" nowrap valign="top"> bool Server::DelQLine </td>
1309           <td class="md" valign="top">(&nbsp;</td>
1310           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1311           <td class="mdname1" valign="top" nowrap> <em>nickname</em>          </td>
1312           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1313           <td class="md" nowrap><code> [virtual]</code></td>
1314         </tr>
1315
1316       </table>
1317     </td>
1318   </tr>
1319 </table>
1320 <table cellspacing=5 cellpadding=0 border=0>
1321   <tr>
1322     <td>
1323       &nbsp;
1324     </td>
1325     <td>
1326
1327 <p>
1328 Deletes a Q-Line from all servers on the mesh. 
1329 <p>
1330
1331 <p>
1332 Definition at line <a class="el" href="modules_8cpp-source.html#l00709">709</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1333 <p>
1334 References <a class="el" href="xline_8h.html#a7">del_qline()</a>.
1335 <p>
1336 <div class="fragment"><pre>00710 {
1337 00711         <a class="code" href="xline_8h.html#a7">del_qline</a>(nickname.c_str());
1338 00712 }
1339 </pre></div>    </td>
1340   </tr>
1341 </table>
1342 <a name="a48" doxytag="Server::DelZLine"></a><p>
1343 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1344   <tr>
1345     <td class="mdRow">
1346       <table cellpadding="0" cellspacing="0" border="0">
1347         <tr>
1348           <td class="md" nowrap valign="top"> bool Server::DelZLine </td>
1349           <td class="md" valign="top">(&nbsp;</td>
1350           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1351           <td class="mdname1" valign="top" nowrap> <em>ipaddr</em>          </td>
1352           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1353           <td class="md" nowrap><code> [virtual]</code></td>
1354         </tr>
1355
1356       </table>
1357     </td>
1358   </tr>
1359 </table>
1360 <table cellspacing=5 cellpadding=0 border=0>
1361   <tr>
1362     <td>
1363       &nbsp;
1364     </td>
1365     <td>
1366
1367 <p>
1368 Deletes a Z-Line from all servers on the mesh. 
1369 <p>
1370
1371 <p>
1372 Definition at line <a class="el" href="modules_8cpp-source.html#l00714">714</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1373 <p>
1374 References <a class="el" href="xline_8h.html#a8">del_zline()</a>.
1375 <p>
1376 <div class="fragment"><pre>00715 {
1377 00716         <a class="code" href="xline_8h.html#a8">del_zline</a>(ipaddr.c_str());
1378 00717 }
1379 </pre></div>    </td>
1380   </tr>
1381 </table>
1382 <a name="a17" doxytag="Server::FindChannel"></a><p>
1383 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1384   <tr>
1385     <td class="mdRow">
1386       <table cellpadding="0" cellspacing="0" border="0">
1387         <tr>
1388           <td class="md" nowrap valign="top"> <a class="el" href="classchanrec.html">chanrec</a> * Server::FindChannel </td>
1389           <td class="md" valign="top">(&nbsp;</td>
1390           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1391           <td class="mdname1" valign="top" nowrap> <em>channel</em>          </td>
1392           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1393           <td class="md" nowrap><code> [virtual]</code></td>
1394         </tr>
1395
1396       </table>
1397     </td>
1398   </tr>
1399 </table>
1400 <table cellspacing=5 cellpadding=0 border=0>
1401   <tr>
1402     <td>
1403       &nbsp;
1404     </td>
1405     <td>
1406
1407 <p>
1408 Attempts to look up a channel and return a pointer to it. 
1409 <p>
1410 This function will return NULL if the channel does not exist.
1411 <p>
1412 Definition at line <a class="el" href="modules_8cpp-source.html#l00540">540</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1413 <p>
1414 <div class="fragment"><pre>00541 {
1415 00542         <span class="keywordflow">return</span> FindChan(channel.c_str());
1416 00543 }
1417 </pre></div>    </td>
1418   </tr>
1419 </table>
1420 <a name="a16" doxytag="Server::FindDescriptor"></a><p>
1421 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1422   <tr>
1423     <td class="mdRow">
1424       <table cellpadding="0" cellspacing="0" border="0">
1425         <tr>
1426           <td class="md" nowrap valign="top"> <a class="el" href="classuserrec.html">userrec</a> * Server::FindDescriptor </td>
1427           <td class="md" valign="top">(&nbsp;</td>
1428           <td class="md" nowrap valign="top">int&nbsp;</td>
1429           <td class="mdname1" valign="top" nowrap> <em>socket</em>          </td>
1430           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1431           <td class="md" nowrap><code> [virtual]</code></td>
1432         </tr>
1433
1434       </table>
1435     </td>
1436   </tr>
1437 </table>
1438 <table cellspacing=5 cellpadding=0 border=0>
1439   <tr>
1440     <td>
1441       &nbsp;
1442     </td>
1443     <td>
1444
1445 <p>
1446 Attempts to look up a nick using the file descriptor associated with that nick. 
1447 <p>
1448 This function will return NULL if the file descriptor is not associated with a valid user.
1449 <p>
1450 Definition at line <a class="el" href="modules_8cpp-source.html#l00535">535</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1451 <p>
1452 References <a class="el" href="modules_8cpp-source.html#l00116">fd_ref_table</a>.
1453 <p>
1454 <div class="fragment"><pre>00536 {
1455 00537         <span class="keywordflow">return</span> (socket &lt; 65536 ? <a class="code" href="modules_8cpp.html#a36">fd_ref_table</a>[socket] : NULL);
1456 00538 }
1457 </pre></div>    </td>
1458   </tr>
1459 </table>
1460 <a name="a60" doxytag="Server::FindModule"></a><p>
1461 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1462   <tr>
1463     <td class="mdRow">
1464       <table cellpadding="0" cellspacing="0" border="0">
1465         <tr>
1466           <td class="md" nowrap valign="top"> <a class="el" href="classModule.html">Module</a> * Server::FindModule </td>
1467           <td class="md" valign="top">(&nbsp;</td>
1468           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1469           <td class="mdname1" valign="top" nowrap> <em>name</em>          </td>
1470           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1471           <td class="md" nowrap><code> [virtual]</code></td>
1472         </tr>
1473
1474       </table>
1475     </td>
1476   </tr>
1477 </table>
1478 <table cellspacing=5 cellpadding=0 border=0>
1479   <tr>
1480     <td>
1481       &nbsp;
1482     </td>
1483     <td>
1484
1485 <p>
1486 This function finds a module by name. 
1487 <p>
1488 You must provide the filename of the module. If the module cannot be found (is not loaded) the function will return NULL.
1489 <p>
1490 Definition at line <a class="el" href="modules_8cpp-source.html#l00807">807</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1491 <p>
1492 References <a class="el" href="modules_8cpp-source.html#l01016">MODCOUNT</a>, <a class="el" href="channels_8cpp-source.html#l00086">module_names</a>, and <a class="el" href="channels_8cpp-source.html#l00059">modules</a>.
1493 <p>
1494 <div class="fragment"><pre>00808 {
1495 00809         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt;= <a class="code" href="modules_8cpp.html#a1">MODCOUNT</a>; i++)
1496 00810         {
1497 00811                 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a26">module_names</a>[i] == name)
1498 00812                 {
1499 00813                         <span class="keywordflow">return</span> <a class="code" href="channels_8cpp.html#a2">modules</a>[i];
1500 00814                 }
1501 00815         }
1502 00816         <span class="keywordflow">return</span> NULL;
1503 00817 }
1504 </pre></div>    </td>
1505   </tr>
1506 </table>
1507 <a name="a15" doxytag="Server::FindNick"></a><p>
1508 <table class="mdTable" width="100%" 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="classuserrec.html">userrec</a> * Server::FindNick </td>
1514           <td class="md" valign="top">(&nbsp;</td>
1515           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1516           <td class="mdname1" valign="top" nowrap> <em>nick</em>          </td>
1517           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1518           <td class="md" nowrap><code> [virtual]</code></td>
1519         </tr>
1520
1521       </table>
1522     </td>
1523   </tr>
1524 </table>
1525 <table cellspacing=5 cellpadding=0 border=0>
1526   <tr>
1527     <td>
1528       &nbsp;
1529     </td>
1530     <td>
1531
1532 <p>
1533 Attempts to look up a nick and return a pointer to it. 
1534 <p>
1535 This function will return NULL if the nick does not exist.
1536 <p>
1537 Definition at line <a class="el" href="modules_8cpp-source.html#l00530">530</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1538 <p>
1539 <div class="fragment"><pre>00531 {
1540 00532         <span class="keywordflow">return</span> Find(nick);
1541 00533 }
1542 </pre></div>    </td>
1543   </tr>
1544 </table>
1545 <a name="a23" doxytag="Server::GetAdmin"></a><p>
1546 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1547   <tr>
1548     <td class="mdRow">
1549       <table cellpadding="0" cellspacing="0" border="0">
1550         <tr>
1551           <td class="md" nowrap valign="top"> <a class="el" href="classAdmin.html">Admin</a> Server::GetAdmin </td>
1552           <td class="md" valign="top">(&nbsp;</td>
1553           <td class="mdname1" valign="top" nowrap>          </td>
1554           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1555           <td class="md" nowrap><code> [virtual]</code></td>
1556         </tr>
1557
1558       </table>
1559     </td>
1560   </tr>
1561 </table>
1562 <table cellspacing=5 cellpadding=0 border=0>
1563   <tr>
1564     <td>
1565       &nbsp;
1566     </td>
1567     <td>
1568
1569 <p>
1570 Returns the information of the server as returned by the /ADMIN command. 
1571 <p>
1572 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#o2">Admin::Nick</a>, <a class="el" href="classAdmin.html#o1">Admin::Email</a> and <a class="el" href="classAdmin.html#o0">Admin::Name</a> contain the information for the server where the module is loaded.
1573 <p>
1574 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>.
1575 <p>
1576 <div class="fragment"><pre>00571 {
1577 00572         <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick());
1578 00573 }
1579 </pre></div>    </td>
1580   </tr>
1581 </table>
1582 <a name="a21" doxytag="Server::GetNetworkName"></a><p>
1583 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1584   <tr>
1585     <td class="mdRow">
1586       <table cellpadding="0" cellspacing="0" border="0">
1587         <tr>
1588           <td class="md" nowrap valign="top"> std::string Server::GetNetworkName </td>
1589           <td class="md" valign="top">(&nbsp;</td>
1590           <td class="mdname1" valign="top" nowrap>          </td>
1591           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1592           <td class="md" nowrap><code> [virtual]</code></td>
1593         </tr>
1594
1595       </table>
1596     </td>
1597   </tr>
1598 </table>
1599 <table cellspacing=5 cellpadding=0 border=0>
1600   <tr>
1601     <td>
1602       &nbsp;
1603     </td>
1604     <td>
1605
1606 <p>
1607 Returns the network name, global to all linked servers. 
1608 <p>
1609
1610 <p>
1611 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>.
1612 <p>
1613 <div class="fragment"><pre>00561 {
1614 00562         <span class="keywordflow">return</span> getnetworkname();
1615 00563 }
1616 </pre></div>    </td>
1617   </tr>
1618 </table>
1619 <a name="a22" doxytag="Server::GetServerDescription"></a><p>
1620 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1621   <tr>
1622     <td class="mdRow">
1623       <table cellpadding="0" cellspacing="0" border="0">
1624         <tr>
1625           <td class="md" nowrap valign="top"> std::string Server::GetServerDescription </td>
1626           <td class="md" valign="top">(&nbsp;</td>
1627           <td class="mdname1" valign="top" nowrap>          </td>
1628           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1629           <td class="md" nowrap><code> [virtual]</code></td>
1630         </tr>
1631
1632       </table>
1633     </td>
1634   </tr>
1635 </table>
1636 <table cellspacing=5 cellpadding=0 border=0>
1637   <tr>
1638     <td>
1639       &nbsp;
1640     </td>
1641     <td>
1642
1643 <p>
1644 Returns the server description string of the local server. 
1645 <p>
1646
1647 <p>
1648 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>.
1649 <p>
1650 <div class="fragment"><pre>00566 {
1651 00567         <span class="keywordflow">return</span> getserverdesc();
1652 00568 }
1653 </pre></div>    </td>
1654   </tr>
1655 </table>
1656 <a name="a20" doxytag="Server::GetServerName"></a><p>
1657 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1658   <tr>
1659     <td class="mdRow">
1660       <table cellpadding="0" cellspacing="0" border="0">
1661         <tr>
1662           <td class="md" nowrap valign="top"> std::string Server::GetServerName </td>
1663           <td class="md" valign="top">(&nbsp;</td>
1664           <td class="mdname1" valign="top" nowrap>          </td>
1665           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1666           <td class="md" nowrap><code> [virtual]</code></td>
1667         </tr>
1668
1669       </table>
1670     </td>
1671   </tr>
1672 </table>
1673 <table cellspacing=5 cellpadding=0 border=0>
1674   <tr>
1675     <td>
1676       &nbsp;
1677     </td>
1678     <td>
1679
1680 <p>
1681 Returns the server name of the server where the module is loaded. 
1682 <p>
1683
1684 <p>
1685 Definition at line <a class="el" href="modules_8cpp-source.html#l00555">555</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1686 <p>
1687 <div class="fragment"><pre>00556 {
1688 00557         <span class="keywordflow">return</span> getservername();
1689 00558 }
1690 </pre></div>    </td>
1691   </tr>
1692 </table>
1693 <a name="a38" doxytag="Server::GetUsers"></a><p>
1694 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1695   <tr>
1696     <td class="mdRow">
1697       <table cellpadding="0" cellspacing="0" border="0">
1698         <tr>
1699           <td class="md" nowrap valign="top"> <a class="el" href="modules_8h.html#a33">chanuserlist</a> Server::GetUsers </td>
1700           <td class="md" valign="top">(&nbsp;</td>
1701           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1702           <td class="mdname1" valign="top" nowrap> <em>chan</em>          </td>
1703           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1704           <td class="md" nowrap><code> [virtual]</code></td>
1705         </tr>
1706
1707       </table>
1708     </td>
1709   </tr>
1710 </table>
1711 <table cellspacing=5 cellpadding=0 border=0>
1712   <tr>
1713     <td>
1714       &nbsp;
1715     </td>
1716     <td>
1717
1718 <p>
1719 Fetches the userlist of a channel. 
1720 <p>
1721 This function must be here and not a member of userrec or chanrec due to include constraints.
1722 <p>
1723 Definition at line <a class="el" href="modules_8cpp-source.html#l00400">400</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1724 <p>
1725 References <a class="el" href="modules_8h-source.html#l00072">chanuserlist</a>, <a class="el" href="channels_8cpp-source.html#l00221">chanrec::GetUsers()</a>, and <a class="el" href="channels_8cpp-source.html#l00073">list</a>.
1726 <p>
1727 <div class="fragment"><pre>00401 {
1728 00402         <a class="code" href="modules_8h.html#a33">chanuserlist</a> userl;
1729 00403         userl.clear();
1730 00404         std::vector&lt;char*&gt; *<a class="code" href="channels_8cpp.html#a15">list</a> = chan-&gt;<a class="code" href="classchanrec.html#a7">GetUsers</a>();
1731 00405         <span class="keywordflow">for</span> (std::vector&lt;char*&gt;::iterator i = <a class="code" href="channels_8cpp.html#a15">list</a>-&gt;begin(); i != <a class="code" href="channels_8cpp.html#a15">list</a>-&gt;end(); i++)
1732 00406         {
1733 00407                 <span class="keywordtype">char</span>* o = *i;
1734 00408                 userl.push_back((<a class="code" href="classuserrec.html">userrec</a>*)o);
1735 00409         }
1736 00410         <span class="keywordflow">return</span> userl;
1737 00411 }
1738 </pre></div>    </td>
1739   </tr>
1740 </table>
1741 <a name="a13" doxytag="Server::IsNick"></a><p>
1742 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1743   <tr>
1744     <td class="mdRow">
1745       <table cellpadding="0" cellspacing="0" border="0">
1746         <tr>
1747           <td class="md" nowrap valign="top"> bool Server::IsNick </td>
1748           <td class="md" valign="top">(&nbsp;</td>
1749           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1750           <td class="mdname1" valign="top" nowrap> <em>nick</em>          </td>
1751           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1752           <td class="md" nowrap><code> [virtual]</code></td>
1753         </tr>
1754
1755       </table>
1756     </td>
1757   </tr>
1758 </table>
1759 <table cellspacing=5 cellpadding=0 border=0>
1760   <tr>
1761     <td>
1762       &nbsp;
1763     </td>
1764     <td>
1765
1766 <p>
1767 Returns true if a nick is valid. 
1768 <p>
1769 Nicks for unregistered connections will return false.
1770 <p>
1771 Definition at line <a class="el" href="modules_8cpp-source.html#l00525">525</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1772 <p>
1773 References <a class="el" href="message_8h.html#a11">isnick()</a>.
1774 <p>
1775 <div class="fragment"><pre>00526 {
1776 00527         <span class="keywordflow">return</span> (<a class="code" href="message_8h.html#a11">isnick</a>(nick.c_str()) != 0);
1777 00528 }
1778 </pre></div>    </td>
1779   </tr>
1780 </table>
1781 <a name="a19" doxytag="Server::IsOnChannel"></a><p>
1782 <table class="mdTable" width="100%" 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::IsOnChannel </td>
1788           <td class="md" valign="top">(&nbsp;</td>
1789           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1790           <td class="mdname" nowrap> <em>User</em>, </td>
1791         </tr>
1792         <tr>
1793           <td></td>
1794           <td></td>
1795           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
1796           <td class="mdname" nowrap> <em>Chan</em></td>
1797         </tr>
1798         <tr>
1799           <td></td>
1800           <td class="md">)&nbsp;</td>
1801           <td class="md" colspan="2"><code> [virtual]</code></td>
1802         </tr>
1803
1804       </table>
1805     </td>
1806   </tr>
1807 </table>
1808 <table cellspacing=5 cellpadding=0 border=0>
1809   <tr>
1810     <td>
1811       &nbsp;
1812     </td>
1813     <td>
1814
1815 <p>
1816 Checks if a user is on a channel. 
1817 <p>
1818 This function will return true or false to indicate if user 'User' is on channel 'Chan'.
1819 <p>
1820 Definition at line <a class="el" href="modules_8cpp-source.html#l00550">550</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1821 <p>
1822 References <a class="el" href="message_8h.html#a14">has_channel()</a>.
1823 <p>
1824 <div class="fragment"><pre>00551 {
1825 00552         <span class="keywordflow">return</span> <a class="code" href="message_8h.html#a14">has_channel</a>(User,Chan);
1826 00553 }
1827 </pre></div>    </td>
1828   </tr>
1829 </table>
1830 <a name="a37" doxytag="Server::IsUlined"></a><p>
1831 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1832   <tr>
1833     <td class="mdRow">
1834       <table cellpadding="0" cellspacing="0" border="0">
1835         <tr>
1836           <td class="md" nowrap valign="top"> bool Server::IsUlined </td>
1837           <td class="md" valign="top">(&nbsp;</td>
1838           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1839           <td class="mdname1" valign="top" nowrap> <em>server</em>          </td>
1840           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1841           <td class="md" nowrap><code> [virtual]</code></td>
1842         </tr>
1843
1844       </table>
1845     </td>
1846   </tr>
1847 </table>
1848 <table cellspacing=5 cellpadding=0 border=0>
1849   <tr>
1850     <td>
1851       &nbsp;
1852     </td>
1853     <td>
1854
1855 <p>
1856 Returns true if the servername you give is ulined. 
1857 <p>
1858 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.
1859 <p>
1860 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>.
1861 <p>
1862 References <a class="el" href="commands_8h.html#a75">is_uline()</a>.
1863 <p>
1864 <div class="fragment"><pre>00423 {
1865 00424         <span class="keywordflow">return</span> <a class="code" href="commands_8h.html#a75">is_uline</a>(server.c_str());
1866 00425 }
1867 </pre></div>    </td>
1868   </tr>
1869 </table>
1870 <a name="a52" doxytag="Server::IsValidMask"></a><p>
1871 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1872   <tr>
1873     <td class="mdRow">
1874       <table cellpadding="0" cellspacing="0" border="0">
1875         <tr>
1876           <td class="md" nowrap valign="top"> bool Server::IsValidMask </td>
1877           <td class="md" valign="top">(&nbsp;</td>
1878           <td class="md" nowrap valign="top">std::string&nbsp;</td>
1879           <td class="mdname1" valign="top" nowrap> <em>mask</em>          </td>
1880           <td class="md" valign="top">&nbsp;)&nbsp;</td>
1881           <td class="md" nowrap><code> [virtual]</code></td>
1882         </tr>
1883
1884       </table>
1885     </td>
1886   </tr>
1887 </table>
1888 <table cellspacing=5 cellpadding=0 border=0>
1889   <tr>
1890     <td>
1891       &nbsp;
1892     </td>
1893     <td>
1894
1895 <p>
1896 Returns true if a nick!ident string is correctly formatted, false if otherwise. 
1897 <p>
1898
1899 <p>
1900 Definition at line <a class="el" href="modules_8cpp-source.html#l00734">734</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
1901 <p>
1902 <div class="fragment"><pre>00735 {
1903 00736         <span class="keyword">const</span> <span class="keywordtype">char</span>* dest = mask.c_str();
1904 00737         <span class="keywordflow">if</span> (strchr(dest,<span class="charliteral">'!'</span>)==0)
1905 00738                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1906 00739         <span class="keywordflow">if</span> (strchr(dest,<span class="charliteral">'@'</span>)==0)
1907 00740                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1908 00741         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; strlen(dest); i++)
1909 00742                 <span class="keywordflow">if</span> (dest[i] &lt; 32)
1910 00743                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
1911 00744         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; strlen(dest); i++)
1912 00745                 <span class="keywordflow">if</span> (dest[i] &gt; 126)
1913 00746                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
1914 00747         <span class="keywordtype">int</span> c = 0;
1915 00748         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; strlen(dest); i++)
1916 00749                 <span class="keywordflow">if</span> (dest[i] == <span class="charliteral">'!'</span>)
1917 00750                         c++;
1918 00751         <span class="keywordflow">if</span> (c&gt;1)
1919 00752                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1920 00753         c = 0;
1921 00754         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; strlen(dest); i++)
1922 00755                 <span class="keywordflow">if</span> (dest[i] == <span class="charliteral">'@'</span>)
1923 00756                         c++;
1924 00757         <span class="keywordflow">if</span> (c&gt;1)
1925 00758                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
1926 00759 
1927 00760         <span class="keywordflow">return</span> <span class="keyword">true</span>;
1928 00761 }
1929 </pre></div>    </td>
1930   </tr>
1931 </table>
1932 <a name="a29" doxytag="Server::JoinUserToChannel"></a><p>
1933 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1934   <tr>
1935     <td class="mdRow">
1936       <table cellpadding="0" cellspacing="0" border="0">
1937         <tr>
1938           <td class="md" nowrap valign="top"> <a class="el" href="classchanrec.html">chanrec</a> * Server::JoinUserToChannel </td>
1939           <td class="md" valign="top">(&nbsp;</td>
1940           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
1941           <td class="mdname" nowrap> <em>user</em>, </td>
1942         </tr>
1943         <tr>
1944           <td></td>
1945           <td></td>
1946           <td class="md" nowrap>std::string&nbsp;</td>
1947           <td class="mdname" nowrap> <em>cname</em>, </td>
1948         </tr>
1949         <tr>
1950           <td></td>
1951           <td></td>
1952           <td class="md" nowrap>std::string&nbsp;</td>
1953           <td class="mdname" nowrap> <em>key</em></td>
1954         </tr>
1955         <tr>
1956           <td></td>
1957           <td class="md">)&nbsp;</td>
1958           <td class="md" colspan="2"><code> [virtual]</code></td>
1959         </tr>
1960
1961       </table>
1962     </td>
1963   </tr>
1964 </table>
1965 <table cellspacing=5 cellpadding=0 border=0>
1966   <tr>
1967     <td>
1968       &nbsp;
1969     </td>
1970     <td>
1971
1972 <p>
1973 Forces a user to join a channel. 
1974 <p>
1975 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.
1976 <p>
1977 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>.
1978 <p>
1979 <div class="fragment"><pre>00391 {
1980 00392         <span class="keywordflow">return</span> add_channel(user,cname.c_str(),key.c_str(),<span class="keyword">false</span>);
1981 00393 }
1982 </pre></div>    </td>
1983   </tr>
1984 </table>
1985 <a name="a3" doxytag="Server::Log"></a><p>
1986 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1987   <tr>
1988     <td class="mdRow">
1989       <table cellpadding="0" cellspacing="0" border="0">
1990         <tr>
1991           <td class="md" nowrap valign="top"> void Server::Log </td>
1992           <td class="md" valign="top">(&nbsp;</td>
1993           <td class="md" nowrap valign="top">int&nbsp;</td>
1994           <td class="mdname" nowrap> <em>level</em>, </td>
1995         </tr>
1996         <tr>
1997           <td></td>
1998           <td></td>
1999           <td class="md" nowrap>std::string&nbsp;</td>
2000           <td class="mdname" nowrap> <em>s</em></td>
2001         </tr>
2002         <tr>
2003           <td></td>
2004           <td class="md">)&nbsp;</td>
2005           <td class="md" colspan="2"><code> [virtual]</code></td>
2006         </tr>
2007
2008       </table>
2009     </td>
2010   </tr>
2011 </table>
2012 <table cellspacing=5 cellpadding=0 border=0>
2013   <tr>
2014     <td>
2015       &nbsp;
2016     </td>
2017     <td>
2018
2019 <p>
2020 Writes a log string. 
2021 <p>
2022 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.
2023 <p>
2024 Definition at line <a class="el" href="modules_8cpp-source.html#l00432">432</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2025 <p>
2026 <div class="fragment"><pre>00433 {
2027 00434         log(level,<span class="stringliteral">"%s"</span>,s.c_str());
2028 00435 }
2029 </pre></div>    </td>
2030   </tr>
2031 </table>
2032 <a name="a33" doxytag="Server::MatchText"></a><p>
2033 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2034   <tr>
2035     <td class="mdRow">
2036       <table cellpadding="0" cellspacing="0" border="0">
2037         <tr>
2038           <td class="md" nowrap valign="top"> bool Server::MatchText </td>
2039           <td class="md" valign="top">(&nbsp;</td>
2040           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2041           <td class="mdname" nowrap> <em>sliteral</em>, </td>
2042         </tr>
2043         <tr>
2044           <td></td>
2045           <td></td>
2046           <td class="md" nowrap>std::string&nbsp;</td>
2047           <td class="mdname" nowrap> <em>spattern</em></td>
2048         </tr>
2049         <tr>
2050           <td></td>
2051           <td class="md">)&nbsp;</td>
2052           <td class="md" colspan="2"><code> [virtual]</code></td>
2053         </tr>
2054
2055       </table>
2056     </td>
2057   </tr>
2058 </table>
2059 <table cellspacing=5 cellpadding=0 border=0>
2060   <tr>
2061     <td>
2062       &nbsp;
2063     </td>
2064     <td>
2065
2066 <p>
2067 Matches text against a glob pattern. 
2068 <p>
2069 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.
2070 <p>
2071 Definition at line <a class="el" href="modules_8cpp-source.html#l00377">377</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2072 <p>
2073 <div class="fragment"><pre>00378 {
2074 00379         <span class="keywordtype">char</span> literal[MAXBUF],pattern[MAXBUF];
2075 00380         strlcpy(literal,sliteral.c_str(),MAXBUF);
2076 00381         strlcpy(pattern,spattern.c_str(),MAXBUF);
2077 00382         <span class="keywordflow">return</span> match(literal,pattern);
2078 00383 }
2079 </pre></div>    </td>
2080   </tr>
2081 </table>
2082 <a name="a58" doxytag="Server::MeshCheckChan"></a><p>
2083 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2084   <tr>
2085     <td class="mdRow">
2086       <table cellpadding="0" cellspacing="0" border="0">
2087         <tr>
2088           <td class="md" nowrap valign="top"> bool Server::MeshCheckChan </td>
2089           <td class="md" valign="top">(&nbsp;</td>
2090           <td class="md" nowrap valign="top"><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
2091           <td class="mdname" nowrap> <em>c</em>, </td>
2092         </tr>
2093         <tr>
2094           <td></td>
2095           <td></td>
2096           <td class="md" nowrap>std::string&nbsp;</td>
2097           <td class="mdname" nowrap> <em>servername</em></td>
2098         </tr>
2099         <tr>
2100           <td></td>
2101           <td class="md">)&nbsp;</td>
2102           <td class="md" colspan="2"><code> [virtual]</code></td>
2103         </tr>
2104
2105       </table>
2106     </td>
2107   </tr>
2108 </table>
2109 <table cellspacing=5 cellpadding=0 border=0>
2110   <tr>
2111     <td>
2112       &nbsp;
2113     </td>
2114     <td>
2115
2116 <p>
2117 This function is used to check if any users on channel c are on server servername. 
2118 <p>
2119 This is used internally by PRIVMSG etc. You should not need to use it.
2120 <p>
2121 Definition at line <a class="el" href="modules_8cpp-source.html#l00789">789</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2122 <p>
2123 <div class="fragment"><pre>00790 {
2124 00791         <span class="keywordflow">if</span> (c)
2125 00792         {
2126 00793                 <span class="keywordflow">return</span> ChanAnyOnThisServer(c,(<span class="keywordtype">char</span>*)servername.c_str());
2127 00794         }
2128 00795         <span class="keywordflow">else</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;
2129 00796 }
2130 </pre></div>    </td>
2131   </tr>
2132 </table>
2133 <a name="a59" doxytag="Server::MeshCheckCommon"></a><p>
2134 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2135   <tr>
2136     <td class="mdRow">
2137       <table cellpadding="0" cellspacing="0" border="0">
2138         <tr>
2139           <td class="md" nowrap valign="top"> bool Server::MeshCheckCommon </td>
2140           <td class="md" valign="top">(&nbsp;</td>
2141           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2142           <td class="mdname" nowrap> <em>u</em>, </td>
2143         </tr>
2144         <tr>
2145           <td></td>
2146           <td></td>
2147           <td class="md" nowrap>std::string&nbsp;</td>
2148           <td class="mdname" nowrap> <em>servername</em></td>
2149         </tr>
2150         <tr>
2151           <td></td>
2152           <td class="md">)&nbsp;</td>
2153           <td class="md" colspan="2"><code> [virtual]</code></td>
2154         </tr>
2155
2156       </table>
2157     </td>
2158   </tr>
2159 </table>
2160 <table cellspacing=5 cellpadding=0 border=0>
2161   <tr>
2162     <td>
2163       &nbsp;
2164     </td>
2165     <td>
2166
2167 <p>
2168 This function is used to check if user u has any channels in common with users on servername. 
2169 <p>
2170 This is used internally by <a class="el" href="classServer.html#a54">Server::MeshSendCommon</a>. You should very rarely need to use it.
2171 <p>
2172 Definition at line <a class="el" href="modules_8cpp-source.html#l00798">798</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2173 <p>
2174 <div class="fragment"><pre>00799 {
2175 00800         <span class="keywordflow">if</span> (u)
2176 00801         {
2177 00802                 <span class="keywordflow">return</span> CommonOnThisServer(u,(<span class="keywordtype">char</span>*)servername.c_str());
2178 00803         }
2179 00804         <span class="keywordflow">else</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;
2180 00805 }
2181 </pre></div>    </td>
2182   </tr>
2183 </table>
2184 <a name="a53" doxytag="Server::MeshSendAll"></a><p>
2185 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2186   <tr>
2187     <td class="mdRow">
2188       <table cellpadding="0" cellspacing="0" border="0">
2189         <tr>
2190           <td class="md" nowrap valign="top"> void Server::MeshSendAll </td>
2191           <td class="md" valign="top">(&nbsp;</td>
2192           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2193           <td class="mdname1" valign="top" nowrap> <em>text</em>          </td>
2194           <td class="md" valign="top">&nbsp;)&nbsp;</td>
2195           <td class="md" nowrap><code> [virtual]</code></td>
2196         </tr>
2197
2198       </table>
2199     </td>
2200   </tr>
2201 </table>
2202 <table cellspacing=5 cellpadding=0 border=0>
2203   <tr>
2204     <td>
2205       &nbsp;
2206     </td>
2207     <td>
2208
2209 <p>
2210 Sends a line of text to all connected servers. 
2211 <p>
2212 If a server is not directly reachable, the core deals with routing the message, and will also deal with failures transparently.
2213 <p>
2214 Definition at line <a class="el" href="modules_8cpp-source.html#l00763">763</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2215 <p>
2216 <div class="fragment"><pre>00764 {
2217 00765         NetSendToAll((<span class="keywordtype">char</span>*)text.c_str());
2218 00766 }
2219 </pre></div>    </td>
2220   </tr>
2221 </table>
2222 <a name="a55" doxytag="Server::MeshSendAllAlive"></a><p>
2223 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2224   <tr>
2225     <td class="mdRow">
2226       <table cellpadding="0" cellspacing="0" border="0">
2227         <tr>
2228           <td class="md" nowrap valign="top"> void Server::MeshSendAllAlive </td>
2229           <td class="md" valign="top">(&nbsp;</td>
2230           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2231           <td class="mdname1" valign="top" nowrap> <em>text</em>          </td>
2232           <td class="md" valign="top">&nbsp;)&nbsp;</td>
2233           <td class="md" nowrap><code> [virtual]</code></td>
2234         </tr>
2235
2236       </table>
2237     </td>
2238   </tr>
2239 </table>
2240 <table cellspacing=5 cellpadding=0 border=0>
2241   <tr>
2242     <td>
2243       &nbsp;
2244     </td>
2245     <td>
2246
2247 <p>
2248 This function is equivalent to Server::MeshSendToAll except it will only route to servers which are directly routable. 
2249 <p>
2250
2251 <p>
2252 Definition at line <a class="el" href="modules_8cpp-source.html#l00774">774</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2253 <p>
2254 <div class="fragment"><pre>00775 {
2255 00776         NetSendToAllAlive((<span class="keywordtype">char</span>*)text.c_str());
2256 00777 }
2257 </pre></div>    </td>
2258   </tr>
2259 </table>
2260 <a name="a57" doxytag="Server::MeshSendAllExcept"></a><p>
2261 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2262   <tr>
2263     <td class="mdRow">
2264       <table cellpadding="0" cellspacing="0" border="0">
2265         <tr>
2266           <td class="md" nowrap valign="top"> void Server::MeshSendAllExcept </td>
2267           <td class="md" valign="top">(&nbsp;</td>
2268           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2269           <td class="mdname" nowrap> <em>target</em>, </td>
2270         </tr>
2271         <tr>
2272           <td></td>
2273           <td></td>
2274           <td class="md" nowrap>std::string&nbsp;</td>
2275           <td class="mdname" nowrap> <em>text</em></td>
2276         </tr>
2277         <tr>
2278           <td></td>
2279           <td class="md">)&nbsp;</td>
2280           <td class="md" colspan="2"><code> [virtual]</code></td>
2281         </tr>
2282
2283       </table>
2284     </td>
2285   </tr>
2286 </table>
2287 <table cellspacing=5 cellpadding=0 border=0>
2288   <tr>
2289     <td>
2290       &nbsp;
2291     </td>
2292     <td>
2293
2294 <p>
2295 This function sends to all servers EXCEPT the one you specify. 
2296 <p>
2297 You should usually use this function to send messages, specifying the SENDER of your message as 'target'. This will prevent message loops.
2298 <p>
2299 Definition at line <a class="el" href="modules_8cpp-source.html#l00784">784</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2300 <p>
2301 <div class="fragment"><pre>00785 {
2302 00786         NetSendToAllExcept(target.c_str(),(<span class="keywordtype">char</span>*)text.c_str());
2303 00787 }
2304 </pre></div>    </td>
2305   </tr>
2306 </table>
2307 <a name="a54" doxytag="Server::MeshSendCommon"></a><p>
2308 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2309   <tr>
2310     <td class="mdRow">
2311       <table cellpadding="0" cellspacing="0" border="0">
2312         <tr>
2313           <td class="md" nowrap valign="top"> void Server::MeshSendCommon </td>
2314           <td class="md" valign="top">(&nbsp;</td>
2315           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2316           <td class="mdname" nowrap> <em>user</em>, </td>
2317         </tr>
2318         <tr>
2319           <td></td>
2320           <td></td>
2321           <td class="md" nowrap>std::string&nbsp;</td>
2322           <td class="mdname" nowrap> <em>text</em></td>
2323         </tr>
2324         <tr>
2325           <td></td>
2326           <td class="md">)&nbsp;</td>
2327           <td class="md" colspan="2"><code> [virtual]</code></td>
2328         </tr>
2329
2330       </table>
2331     </td>
2332   </tr>
2333 </table>
2334 <table cellspacing=5 cellpadding=0 border=0>
2335   <tr>
2336     <td>
2337       &nbsp;
2338     </td>
2339     <td>
2340
2341 <p>
2342 This method sends a line of text to all servers who have users which share common channels with the user you provide. 
2343 <p>
2344 For example, if user A is on server A, and they are on channels #one and #two, and user B is on server B, and also on channel #one, but user C is on server C and on neither #one or #two, this function will cause the text to only be sent to server B. However, if server B is only reachable via C, it will route it to C (you do not have to worry about this routing, it is done transparently, but its good to know how things work!)
2345 <p>
2346 Definition at line <a class="el" href="modules_8cpp-source.html#l00768">768</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2347 <p>
2348 <div class="fragment"><pre>00769 {
2349 00770         <span class="keywordflow">if</span> (user)
2350 00771                 NetSendToCommon(user,(<span class="keywordtype">char</span>*)text.c_str());
2351 00772 }
2352 </pre></div>    </td>
2353   </tr>
2354 </table>
2355 <a name="a56" doxytag="Server::MeshSendUnicast"></a><p>
2356 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2357   <tr>
2358     <td class="mdRow">
2359       <table cellpadding="0" cellspacing="0" border="0">
2360         <tr>
2361           <td class="md" nowrap valign="top"> void Server::MeshSendUnicast </td>
2362           <td class="md" valign="top">(&nbsp;</td>
2363           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2364           <td class="mdname" nowrap> <em>destination</em>, </td>
2365         </tr>
2366         <tr>
2367           <td></td>
2368           <td></td>
2369           <td class="md" nowrap>std::string&nbsp;</td>
2370           <td class="mdname" nowrap> <em>text</em></td>
2371         </tr>
2372         <tr>
2373           <td></td>
2374           <td class="md">)&nbsp;</td>
2375           <td class="md" colspan="2"><code> [virtual]</code></td>
2376         </tr>
2377
2378       </table>
2379     </td>
2380   </tr>
2381 </table>
2382 <table cellspacing=5 cellpadding=0 border=0>
2383   <tr>
2384     <td>
2385       &nbsp;
2386     </td>
2387     <td>
2388
2389 <p>
2390 This function sends a line of text directly to a server. 
2391 <p>
2392 If the server is not directly routable at this time, the server attempts to route text through the mesh.
2393 <p>
2394 Definition at line <a class="el" href="modules_8cpp-source.html#l00779">779</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2395 <p>
2396 <div class="fragment"><pre>00780 {
2397 00781         NetSendToOne((<span class="keywordtype">char</span>*)destination.c_str(),(<span class="keywordtype">char</span>*)text.c_str());
2398 00782 }
2399 </pre></div>    </td>
2400   </tr>
2401 </table>
2402 <a name="a30" doxytag="Server::PartUserFromChannel"></a><p>
2403 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2404   <tr>
2405     <td class="mdRow">
2406       <table cellpadding="0" cellspacing="0" border="0">
2407         <tr>
2408           <td class="md" nowrap valign="top"> <a class="el" href="classchanrec.html">chanrec</a> * Server::PartUserFromChannel </td>
2409           <td class="md" valign="top">(&nbsp;</td>
2410           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2411           <td class="mdname" nowrap> <em>user</em>, </td>
2412         </tr>
2413         <tr>
2414           <td></td>
2415           <td></td>
2416           <td class="md" nowrap>std::string&nbsp;</td>
2417           <td class="mdname" nowrap> <em>cname</em>, </td>
2418         </tr>
2419         <tr>
2420           <td></td>
2421           <td></td>
2422           <td class="md" nowrap>std::string&nbsp;</td>
2423           <td class="mdname" nowrap> <em>reason</em></td>
2424         </tr>
2425         <tr>
2426           <td></td>
2427           <td class="md">)&nbsp;</td>
2428           <td class="md" colspan="2"><code> [virtual]</code></td>
2429         </tr>
2430
2431       </table>
2432     </td>
2433   </tr>
2434 </table>
2435 <table cellspacing=5 cellpadding=0 border=0>
2436   <tr>
2437     <td>
2438       &nbsp;
2439     </td>
2440     <td>
2441
2442 <p>
2443 Forces a user to part a channel. 
2444 <p>
2445 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.
2446 <p>
2447 Definition at line <a class="el" href="modules_8cpp-source.html#l00395">395</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2448 <p>
2449 <div class="fragment"><pre>00396 {
2450 00397         <span class="keywordflow">return</span> del_channel(user,cname.c_str(),reason.c_str(),<span class="keyword">false</span>);
2451 00398 }
2452 </pre></div>    </td>
2453   </tr>
2454 </table>
2455 <a name="a40" doxytag="Server::PseudoToUser"></a><p>
2456 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2457   <tr>
2458     <td class="mdRow">
2459       <table cellpadding="0" cellspacing="0" border="0">
2460         <tr>
2461           <td class="md" nowrap valign="top"> bool Server::PseudoToUser </td>
2462           <td class="md" valign="top">(&nbsp;</td>
2463           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2464           <td class="mdname" nowrap> <em>alive</em>, </td>
2465         </tr>
2466         <tr>
2467           <td></td>
2468           <td></td>
2469           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2470           <td class="mdname" nowrap> <em>zombie</em>, </td>
2471         </tr>
2472         <tr>
2473           <td></td>
2474           <td></td>
2475           <td class="md" nowrap>std::string&nbsp;</td>
2476           <td class="mdname" nowrap> <em>message</em></td>
2477         </tr>
2478         <tr>
2479           <td></td>
2480           <td class="md">)&nbsp;</td>
2481           <td class="md" colspan="2"><code> [virtual]</code></td>
2482         </tr>
2483
2484       </table>
2485     </td>
2486   </tr>
2487 </table>
2488 <table cellspacing=5 cellpadding=0 border=0>
2489   <tr>
2490     <td>
2491       &nbsp;
2492     </td>
2493     <td>
2494
2495 <p>
2496 This user takes one user, and switches their file descriptor with another user, so that one user "becomes" the other. 
2497 <p>
2498 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.
2499 <p>
2500 Definition at line <a class="el" href="modules_8cpp-source.html#l00649">649</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2501 <p>
2502 References <a class="el" href="channels_8h-source.html#l00252">ucrec::channel</a>, <a class="el" href="users_8h-source.html#l00142">userrec::chans</a>, <a class="el" href="users_8cpp-source.html#l00224">userrec::ClearBuffer()</a>, <a class="el" href="connection_8h-source.html#l00301">connection::fd</a>, <a class="el" href="modules_8h-source.html#l00099">FD_MAGIC_NUMBER</a>, <a class="el" href="modules_8cpp-source.html#l00116">fd_ref_table</a>, <a class="el" href="connection_8h-source.html#l00305">connection::host</a>, <a class="el" href="users_8h-source.html#l00125">userrec::ident</a>, <a class="el" href="channels_8h-source.html#l00106">chanrec::name</a>, <a class="el" href="users_8h-source.html#l00121">userrec::nick</a>, <a class="el" href="channels_8h-source.html#l00131">chanrec::setby</a>, <a class="el" href="channels_8h-source.html#l00120">chanrec::topic</a>, and <a class="el" href="channels_8h-source.html#l00127">chanrec::topicset</a>.
2503 <p>
2504 <div class="fragment"><pre>00650 {
2505 00651         zombie-&gt;<a class="code" href="classconnection.html#o0">fd</a> = alive-&gt;<a class="code" href="classconnection.html#o0">fd</a>;
2506 00652         alive-&gt;<a class="code" href="classconnection.html#o0">fd</a> = <a class="code" href="modules_8h.html#a26">FD_MAGIC_NUMBER</a>;
2507 00653         alive-&gt;<a class="code" href="classuserrec.html#a11">ClearBuffer</a>();
2508 00654         Write(zombie-&gt;<a class="code" href="classconnection.html#o0">fd</a>,<span class="stringliteral">":%s!%s@%s NICK %s"</span>,alive-&gt;<a class="code" href="classuserrec.html#o0">nick</a>,alive-&gt;<a class="code" href="classuserrec.html#o1">ident</a>,alive-&gt;<a class="code" href="classconnection.html#o1">host</a>,zombie-&gt;<a class="code" href="classuserrec.html#o0">nick</a>);
2509 00655         kill_link(alive,message.c_str());
2510 00656         <a class="code" href="modules_8cpp.html#a36">fd_ref_table</a>[zombie-&gt;<a class="code" href="classconnection.html#o0">fd</a>] = zombie;
2511 00657         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i != MAXCHANS; i++)
2512 00658         {
2513 00659                 <span class="keywordflow">if</span> (zombie-&gt;chans[i].channel != NULL)
2514 00660                 {
2515 00661                         <span class="keywordflow">if</span> (zombie-&gt;chans[i].channel-&gt;name)
2516 00662                         {
2517 00663                                 <a class="code" href="classchanrec.html">chanrec</a>* Ptr = zombie-&gt;<a class="code" href="classuserrec.html#o5">chans</a>[i].<a class="code" href="classucrec.html#o1">channel</a>;
2518 00664                                 WriteFrom(zombie-&gt;fd,zombie,<span class="stringliteral">"JOIN %s"</span>,Ptr-&gt;<a class="code" href="classchanrec.html#o0">name</a>);
2519 00665                                 <span class="keywordflow">if</span> (Ptr-&gt;<a class="code" href="classchanrec.html#o5">topicset</a>)
2520 00666                                 {
2521 00667                                         WriteServ(zombie-&gt;fd,<span class="stringliteral">"332 %s %s :%s"</span>, zombie-&gt;nick, Ptr-&gt;<a class="code" href="classchanrec.html#o0">name</a>, Ptr-&gt;<a class="code" href="classchanrec.html#o3">topic</a>);
2522 00668                                         WriteServ(zombie-&gt;fd,<span class="stringliteral">"333 %s %s %s %d"</span>, zombie-&gt;nick, Ptr-&gt;<a class="code" href="classchanrec.html#o0">name</a>, Ptr-&gt;<a class="code" href="classchanrec.html#o6">setby</a>, Ptr-&gt;<a class="code" href="classchanrec.html#o5">topicset</a>);
2523 00669                                 }
2524 00670                                 userlist(zombie,Ptr);
2525 00671                                 WriteServ(zombie-&gt;fd,<span class="stringliteral">"366 %s %s :End of /NAMES list."</span>, zombie-&gt;nick, Ptr-&gt;<a class="code" href="classchanrec.html#o0">name</a>);
2526 00672 
2527 00673                         }
2528 00674                 }
2529 00675         }
2530 00676 
2531 00677 }
2532 </pre></div>    </td>
2533   </tr>
2534 </table>
2535 <a name="a32" doxytag="Server::QuitUser"></a><p>
2536 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2537   <tr>
2538     <td class="mdRow">
2539       <table cellpadding="0" cellspacing="0" border="0">
2540         <tr>
2541           <td class="md" nowrap valign="top"> void Server::QuitUser </td>
2542           <td class="md" valign="top">(&nbsp;</td>
2543           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2544           <td class="mdname" nowrap> <em>user</em>, </td>
2545         </tr>
2546         <tr>
2547           <td></td>
2548           <td></td>
2549           <td class="md" nowrap>std::string&nbsp;</td>
2550           <td class="mdname" nowrap> <em>reason</em></td>
2551         </tr>
2552         <tr>
2553           <td></td>
2554           <td class="md">)&nbsp;</td>
2555           <td class="md" colspan="2"><code> [virtual]</code></td>
2556         </tr>
2557
2558       </table>
2559     </td>
2560   </tr>
2561 </table>
2562 <table cellspacing=5 cellpadding=0 border=0>
2563   <tr>
2564     <td>
2565       &nbsp;
2566     </td>
2567     <td>
2568
2569 <p>
2570 Forces a user to quit with the specified reason. 
2571 <p>
2572 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>
2573 WARNING!<p>
2574 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.
2575 <p>
2576 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>.
2577 <p>
2578 <div class="fragment"><pre>00418 {
2579 00419         kill_link(user,reason.c_str());
2580 00420 }
2581 </pre></div>    </td>
2582   </tr>
2583 </table>
2584 <a name="a4" doxytag="Server::Send"></a><p>
2585 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2586   <tr>
2587     <td class="mdRow">
2588       <table cellpadding="0" cellspacing="0" border="0">
2589         <tr>
2590           <td class="md" nowrap valign="top"> void Server::Send </td>
2591           <td class="md" valign="top">(&nbsp;</td>
2592           <td class="md" nowrap valign="top">int&nbsp;</td>
2593           <td class="mdname" nowrap> <em>Socket</em>, </td>
2594         </tr>
2595         <tr>
2596           <td></td>
2597           <td></td>
2598           <td class="md" nowrap>std::string&nbsp;</td>
2599           <td class="mdname" nowrap> <em>s</em></td>
2600         </tr>
2601         <tr>
2602           <td></td>
2603           <td class="md">)&nbsp;</td>
2604           <td class="md" colspan="2"><code> [virtual]</code></td>
2605         </tr>
2606
2607       </table>
2608     </td>
2609   </tr>
2610 </table>
2611 <table cellspacing=5 cellpadding=0 border=0>
2612   <tr>
2613     <td>
2614       &nbsp;
2615     </td>
2616     <td>
2617
2618 <p>
2619 Sends a line of text down a TCP/IP socket. 
2620 <p>
2621 This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.
2622 <p>
2623 Definition at line <a class="el" href="modules_8cpp-source.html#l00447">447</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2624 <p>
2625 <div class="fragment"><pre>00448 {
2626 00449         Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
2627 00450 }
2628 </pre></div>    </td>
2629   </tr>
2630 </table>
2631 <a name="a9" doxytag="Server::SendChannel"></a><p>
2632 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2633   <tr>
2634     <td class="mdRow">
2635       <table cellpadding="0" cellspacing="0" border="0">
2636         <tr>
2637           <td class="md" nowrap valign="top"> void Server::SendChannel </td>
2638           <td class="md" valign="top">(&nbsp;</td>
2639           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2640           <td class="mdname" nowrap> <em>User</em>, </td>
2641         </tr>
2642         <tr>
2643           <td></td>
2644           <td></td>
2645           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
2646           <td class="mdname" nowrap> <em>Channel</em>, </td>
2647         </tr>
2648         <tr>
2649           <td></td>
2650           <td></td>
2651           <td class="md" nowrap>std::string&nbsp;</td>
2652           <td class="mdname" nowrap> <em>s</em>, </td>
2653         </tr>
2654         <tr>
2655           <td></td>
2656           <td></td>
2657           <td class="md" nowrap>bool&nbsp;</td>
2658           <td class="mdname" nowrap> <em>IncludeSender</em></td>
2659         </tr>
2660         <tr>
2661           <td></td>
2662           <td class="md">)&nbsp;</td>
2663           <td class="md" colspan="2"><code> [virtual]</code></td>
2664         </tr>
2665
2666       </table>
2667     </td>
2668   </tr>
2669 </table>
2670 <table cellspacing=5 cellpadding=0 border=0>
2671   <tr>
2672     <td>
2673       &nbsp;
2674     </td>
2675     <td>
2676
2677 <p>
2678 Sends text from a user to a channel (mulicast). 
2679 <p>
2680 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).
2681 <p>
2682 Definition at line <a class="el" href="modules_8cpp-source.html#l00481">481</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2683 <p>
2684 <div class="fragment"><pre>00482 {
2685 00483         <span class="keywordflow">if</span> (IncludeSender)
2686 00484         {
2687 00485                 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
2688 00486         }
2689 00487         <span class="keywordflow">else</span>
2690 00488         {
2691 00489                 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
2692 00490         }
2693 00491 }
2694 </pre></div>    </td>
2695   </tr>
2696 </table>
2697 <a name="a6" doxytag="Server::SendChannelServerNotice"></a><p>
2698 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2699   <tr>
2700     <td class="mdRow">
2701       <table cellpadding="0" cellspacing="0" border="0">
2702         <tr>
2703           <td class="md" nowrap valign="top"> void Server::SendChannelServerNotice </td>
2704           <td class="md" valign="top">(&nbsp;</td>
2705           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2706           <td class="mdname" nowrap> <em>ServName</em>, </td>
2707         </tr>
2708         <tr>
2709           <td></td>
2710           <td></td>
2711           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
2712           <td class="mdname" nowrap> <em>Channel</em>, </td>
2713         </tr>
2714         <tr>
2715           <td></td>
2716           <td></td>
2717           <td class="md" nowrap>std::string&nbsp;</td>
2718           <td class="mdname" nowrap> <em>text</em></td>
2719         </tr>
2720         <tr>
2721           <td></td>
2722           <td class="md">)&nbsp;</td>
2723           <td class="md" colspan="2"><code> [virtual]</code></td>
2724         </tr>
2725
2726       </table>
2727     </td>
2728   </tr>
2729 </table>
2730 <table cellspacing=5 cellpadding=0 border=0>
2731   <tr>
2732     <td>
2733       &nbsp;
2734     </td>
2735     <td>
2736
2737 <p>
2738 Writes text to a channel, but from a server, including all. 
2739 <p>
2740 This can be used to send server notices to a group of users.
2741 <p>
2742 Definition at line <a class="el" href="modules_8cpp-source.html#l00476">476</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2743 <p>
2744 <div class="fragment"><pre>00477 {
2745 00478         WriteChannelWithServ((<span class="keywordtype">char</span>*)ServName.c_str(), Channel, <span class="stringliteral">"%s"</span>, text.c_str());
2746 00479 }
2747 </pre></div>    </td>
2748   </tr>
2749 </table>
2750 <a name="a11" doxytag="Server::SendCommon"></a><p>
2751 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2752   <tr>
2753     <td class="mdRow">
2754       <table cellpadding="0" cellspacing="0" border="0">
2755         <tr>
2756           <td class="md" nowrap valign="top"> void Server::SendCommon </td>
2757           <td class="md" valign="top">(&nbsp;</td>
2758           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2759           <td class="mdname" nowrap> <em>User</em>, </td>
2760         </tr>
2761         <tr>
2762           <td></td>
2763           <td></td>
2764           <td class="md" nowrap>std::string&nbsp;</td>
2765           <td class="mdname" nowrap> <em>text</em>, </td>
2766         </tr>
2767         <tr>
2768           <td></td>
2769           <td></td>
2770           <td class="md" nowrap>bool&nbsp;</td>
2771           <td class="mdname" nowrap> <em>IncludeSender</em></td>
2772         </tr>
2773         <tr>
2774           <td></td>
2775           <td class="md">)&nbsp;</td>
2776           <td class="md" colspan="2"><code> [virtual]</code></td>
2777         </tr>
2778
2779       </table>
2780     </td>
2781   </tr>
2782 </table>
2783 <table cellspacing=5 cellpadding=0 border=0>
2784   <tr>
2785     <td>
2786       &nbsp;
2787     </td>
2788     <td>
2789
2790 <p>
2791 Sends text from a user to one or more channels (mulicast). 
2792 <p>
2793 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.
2794 <p>
2795 Definition at line <a class="el" href="modules_8cpp-source.html#l00498">498</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2796 <p>
2797 <div class="fragment"><pre>00499 {
2798 00500         <span class="keywordflow">if</span> (IncludeSender)
2799 00501         {
2800 00502                 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str());
2801 00503         }
2802 00504         <span class="keywordflow">else</span>
2803 00505         {
2804 00506                 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str());
2805 00507         }
2806 00508 }
2807 </pre></div>    </td>
2808   </tr>
2809 </table>
2810 <a name="a7" doxytag="Server::SendFrom"></a><p>
2811 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2812   <tr>
2813     <td class="mdRow">
2814       <table cellpadding="0" cellspacing="0" border="0">
2815         <tr>
2816           <td class="md" nowrap valign="top"> void Server::SendFrom </td>
2817           <td class="md" valign="top">(&nbsp;</td>
2818           <td class="md" nowrap valign="top">int&nbsp;</td>
2819           <td class="mdname" nowrap> <em>Socket</em>, </td>
2820         </tr>
2821         <tr>
2822           <td></td>
2823           <td></td>
2824           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2825           <td class="mdname" nowrap> <em>User</em>, </td>
2826         </tr>
2827         <tr>
2828           <td></td>
2829           <td></td>
2830           <td class="md" nowrap>std::string&nbsp;</td>
2831           <td class="mdname" nowrap> <em>s</em></td>
2832         </tr>
2833         <tr>
2834           <td></td>
2835           <td class="md">)&nbsp;</td>
2836           <td class="md" colspan="2"><code> [virtual]</code></td>
2837         </tr>
2838
2839       </table>
2840     </td>
2841   </tr>
2842 </table>
2843 <table cellspacing=5 cellpadding=0 border=0>
2844   <tr>
2845     <td>
2846       &nbsp;
2847     </td>
2848     <td>
2849
2850 <p>
2851 Sends text from a user to a socket. 
2852 <p>
2853 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)
2854 <p>
2855 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>.
2856 <p>
2857 <div class="fragment"><pre>00458 {
2858 00459         WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str());
2859 00460 }
2860 </pre></div>    </td>
2861   </tr>
2862 </table>
2863 <a name="a27" doxytag="Server::SendMode"></a><p>
2864 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2865   <tr>
2866     <td class="mdRow">
2867       <table cellpadding="0" cellspacing="0" border="0">
2868         <tr>
2869           <td class="md" nowrap valign="top"> void Server::SendMode </td>
2870           <td class="md" valign="top">(&nbsp;</td>
2871           <td class="md" nowrap valign="top">char **&nbsp;</td>
2872           <td class="mdname" nowrap> <em>parameters</em>, </td>
2873         </tr>
2874         <tr>
2875           <td></td>
2876           <td></td>
2877           <td class="md" nowrap>int&nbsp;</td>
2878           <td class="mdname" nowrap> <em>pcnt</em>, </td>
2879         </tr>
2880         <tr>
2881           <td></td>
2882           <td></td>
2883           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
2884           <td class="mdname" nowrap> <em>user</em></td>
2885         </tr>
2886         <tr>
2887           <td></td>
2888           <td class="md">)&nbsp;</td>
2889           <td class="md" colspan="2"><code> [virtual]</code></td>
2890         </tr>
2891
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 a servermode. 
2905 <p>
2906 you must format the parameters array with the target, modes and parameters for those modes.<p>
2907 For example:<p>
2908 char *modes[3];<p>
2909 modes[0] = ChannelName;<p>
2910 modes[1] = "+o";<p>
2911 modes[2] = user-&gt;nick;<p>
2912 Srv-&gt;SendMode(modes,3,user);<p>
2913 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!
2914 <p>
2915 Definition at line <a class="el" href="modules_8cpp-source.html#l00442">442</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2916 <p>
2917 References <a class="el" href="modules_8h.html#a36">server_mode()</a>.
2918 <p>
2919 <div class="fragment"><pre>00443 {
2920 00444         <a class="code" href="modules_8h.html#a36">server_mode</a>(parameters,pcnt,user);
2921 00445 }
2922 </pre></div>    </td>
2923   </tr>
2924 </table>
2925 <a name="a2" doxytag="Server::SendOpers"></a><p>
2926 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2927   <tr>
2928     <td class="mdRow">
2929       <table cellpadding="0" cellspacing="0" border="0">
2930         <tr>
2931           <td class="md" nowrap valign="top"> void Server::SendOpers </td>
2932           <td class="md" valign="top">(&nbsp;</td>
2933           <td class="md" nowrap valign="top">std::string&nbsp;</td>
2934           <td class="mdname1" valign="top" nowrap> <em>s</em>          </td>
2935           <td class="md" valign="top">&nbsp;)&nbsp;</td>
2936           <td class="md" nowrap><code> [virtual]</code></td>
2937         </tr>
2938
2939       </table>
2940     </td>
2941   </tr>
2942 </table>
2943 <table cellspacing=5 cellpadding=0 border=0>
2944   <tr>
2945     <td>
2946       &nbsp;
2947     </td>
2948     <td>
2949
2950 <p>
2951 Sends text to all opers. 
2952 <p>
2953 This method sends a server notice to all opers with the usermode +s.
2954 <p>
2955 Definition at line <a class="el" href="modules_8cpp-source.html#l00372">372</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
2956 <p>
2957 <div class="fragment"><pre>00373 {
2958 00374         WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str());
2959 00375 }
2960 </pre></div>    </td>
2961   </tr>
2962 </table>
2963 <a name="a5" doxytag="Server::SendServ"></a><p>
2964 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
2965   <tr>
2966     <td class="mdRow">
2967       <table cellpadding="0" cellspacing="0" border="0">
2968         <tr>
2969           <td class="md" nowrap valign="top"> void Server::SendServ </td>
2970           <td class="md" valign="top">(&nbsp;</td>
2971           <td class="md" nowrap valign="top">int&nbsp;</td>
2972           <td class="mdname" nowrap> <em>Socket</em>, </td>
2973         </tr>
2974         <tr>
2975           <td></td>
2976           <td></td>
2977           <td class="md" nowrap>std::string&nbsp;</td>
2978           <td class="mdname" nowrap> <em>s</em></td>
2979         </tr>
2980         <tr>
2981           <td></td>
2982           <td class="md">)&nbsp;</td>
2983           <td class="md" colspan="2"><code> [virtual]</code></td>
2984         </tr>
2985
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 Sends text from the server to a socket. 
2999 <p>
3000 This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)
3001 <p>
3002 Definition at line <a class="el" href="modules_8cpp-source.html#l00452">452</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
3003 <p>
3004 <div class="fragment"><pre>00453 {
3005 00454         WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
3006 00455 }
3007 </pre></div>    </td>
3008   </tr>
3009 </table>
3010 <a name="a8" doxytag="Server::SendTo"></a><p>
3011 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
3012   <tr>
3013     <td class="mdRow">
3014       <table cellpadding="0" cellspacing="0" border="0">
3015         <tr>
3016           <td class="md" nowrap valign="top"> void Server::SendTo </td>
3017           <td class="md" valign="top">(&nbsp;</td>
3018           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
3019           <td class="mdname" nowrap> <em>Source</em>, </td>
3020         </tr>
3021         <tr>
3022           <td></td>
3023           <td></td>
3024           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
3025           <td class="mdname" nowrap> <em>Dest</em>, </td>
3026         </tr>
3027         <tr>
3028           <td></td>
3029           <td></td>
3030           <td class="md" nowrap>std::string&nbsp;</td>
3031           <td class="mdname" nowrap> <em>s</em></td>
3032         </tr>
3033         <tr>
3034           <td></td>
3035           <td class="md">)&nbsp;</td>
3036           <td class="md" colspan="2"><code> [virtual]</code></td>
3037         </tr>
3038
3039       </table>
3040     </td>
3041   </tr>
3042 </table>
3043 <table cellspacing=5 cellpadding=0 border=0>
3044   <tr>
3045     <td>
3046       &nbsp;
3047     </td>
3048     <td>
3049
3050 <p>
3051 Sends text from a user to another user. 
3052 <p>
3053 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>
3054 :user!ident TEXT<p>
3055 The format will become:<p>
3056 :localserver TEXT<p>
3057 Which is useful for numerics and server notices to single users, etc.
3058 <p>
3059 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>.
3060 <p>
3061 References <a class="el" href="connection_8h-source.html#l00301">connection::fd</a>.
3062 <p>
3063 <div class="fragment"><pre>00463 {
3064 00464         <span class="keywordflow">if</span> (!Source)
3065 00465         {
3066 00466                 <span class="comment">// if source is NULL, then the message originates from the local server</span>
3067 00467                 Write(Dest-&gt;<a class="code" href="classconnection.html#o0">fd</a>,<span class="stringliteral">":%s %s"</span>,this-&gt;GetServerName().c_str(),s.c_str());
3068 00468         }
3069 00469         <span class="keywordflow">else</span>
3070 00470         {
3071 00471                 <span class="comment">// otherwise it comes from the user specified</span>
3072 00472                 WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str());
3073 00473         }
3074 00474 }
3075 </pre></div>    </td>
3076   </tr>
3077 </table>
3078 <a name="a28" doxytag="Server::SendToModeMask"></a><p>
3079 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
3080   <tr>
3081     <td class="mdRow">
3082       <table cellpadding="0" cellspacing="0" border="0">
3083         <tr>
3084           <td class="md" nowrap valign="top"> void Server::SendToModeMask </td>
3085           <td class="md" valign="top">(&nbsp;</td>
3086           <td class="md" nowrap valign="top">std::string&nbsp;</td>
3087           <td class="mdname" nowrap> <em>modes</em>, </td>
3088         </tr>
3089         <tr>
3090           <td></td>
3091           <td></td>
3092           <td class="md" nowrap>int&nbsp;</td>
3093           <td class="mdname" nowrap> <em>flags</em>, </td>
3094         </tr>
3095         <tr>
3096           <td></td>
3097           <td></td>
3098           <td class="md" nowrap>std::string&nbsp;</td>
3099           <td class="mdname" nowrap> <em>text</em></td>
3100         </tr>
3101         <tr>
3102           <td></td>
3103           <td class="md">)&nbsp;</td>
3104           <td class="md" colspan="2"><code> [virtual]</code></td>
3105         </tr>
3106
3107       </table>
3108     </td>
3109   </tr>
3110 </table>
3111 <table cellspacing=5 cellpadding=0 border=0>
3112   <tr>
3113     <td>
3114       &nbsp;
3115     </td>
3116     <td>
3117
3118 <p>
3119 Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter. 
3120 <p>
3121 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>
3122 Serv-&gt;SendToModeMask("xi", WM_OR, "m00");<p>
3123 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.
3124 <p>
3125 Definition at line <a class="el" href="modules_8cpp-source.html#l00385">385</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
3126 <p>
3127 <div class="fragment"><pre>00386 {
3128 00387         WriteMode(modes.c_str(),flags,<span class="stringliteral">"%s"</span>,text.c_str());
3129 00388 }
3130 </pre></div>    </td>
3131   </tr>
3132 </table>
3133 <a name="a12" doxytag="Server::SendWallops"></a><p>
3134 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
3135   <tr>
3136     <td class="mdRow">
3137       <table cellpadding="0" cellspacing="0" border="0">
3138         <tr>
3139           <td class="md" nowrap valign="top"> void Server::SendWallops </td>
3140           <td class="md" valign="top">(&nbsp;</td>
3141           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
3142           <td class="mdname" nowrap> <em>User</em>, </td>
3143         </tr>
3144         <tr>
3145           <td></td>
3146           <td></td>
3147           <td class="md" nowrap>std::string&nbsp;</td>
3148           <td class="mdname" nowrap> <em>text</em></td>
3149         </tr>
3150         <tr>
3151           <td></td>
3152           <td class="md">)&nbsp;</td>
3153           <td class="md" colspan="2"><code> [virtual]</code></td>
3154         </tr>
3155
3156       </table>
3157     </td>
3158   </tr>
3159 </table>
3160 <table cellspacing=5 cellpadding=0 border=0>
3161   <tr>
3162     <td>
3163       &nbsp;
3164     </td>
3165     <td>
3166
3167 <p>
3168 Sends a WALLOPS message. 
3169 <p>
3170 This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.
3171 <p>
3172 Definition at line <a class="el" href="modules_8cpp-source.html#l00510">510</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
3173 <p>
3174 <div class="fragment"><pre>00511 {
3175 00512         WriteWallOps(User,<span class="keyword">false</span>,<span class="stringliteral">"%s"</span>,text.c_str());
3176 00513 }
3177 </pre></div>    </td>
3178   </tr>
3179 </table>
3180 <a name="a39" doxytag="Server::UserToPseudo"></a><p>
3181 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
3182   <tr>
3183     <td class="mdRow">
3184       <table cellpadding="0" cellspacing="0" border="0">
3185         <tr>
3186           <td class="md" nowrap valign="top"> bool Server::UserToPseudo </td>
3187           <td class="md" valign="top">(&nbsp;</td>
3188           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
3189           <td class="mdname" nowrap> <em>user</em>, </td>
3190         </tr>
3191         <tr>
3192           <td></td>
3193           <td></td>
3194           <td class="md" nowrap>std::string&nbsp;</td>
3195           <td class="mdname" nowrap> <em>message</em></td>
3196         </tr>
3197         <tr>
3198           <td></td>
3199           <td class="md">)&nbsp;</td>
3200           <td class="md" colspan="2"><code> [virtual]</code></td>
3201         </tr>
3202
3203       </table>
3204     </td>
3205   </tr>
3206 </table>
3207 <table cellspacing=5 cellpadding=0 border=0>
3208   <tr>
3209     <td>
3210       &nbsp;
3211     </td>
3212     <td>
3213
3214 <p>
3215 Remove a user's connection to the irc server, but leave their client in existence in the user hash. 
3216 <p>
3217 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.
3218 <p>
3219 Definition at line <a class="el" href="modules_8cpp-source.html#l00619">619</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
3220 <p>
3221 References <a class="el" href="users_8cpp-source.html#l00224">userrec::ClearBuffer()</a>, <a class="el" href="modules_8h-source.html#l00023">DEBUG</a>, <a class="el" href="connection_8h-source.html#l00301">connection::fd</a>, <a class="el" href="modules_8h-source.html#l00099">FD_MAGIC_NUMBER</a>, <a class="el" href="connection_8h-source.html#l00305">connection::host</a>, and <a class="el" href="users_8h-source.html#l00125">userrec::ident</a>.
3222 <p>
3223 <div class="fragment"><pre>00620 {
3224 00621         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> old_fd = user-&gt;<a class="code" href="classconnection.html#o0">fd</a>;
3225 00622         user-&gt;<a class="code" href="classconnection.html#o0">fd</a> = <a class="code" href="modules_8h.html#a26">FD_MAGIC_NUMBER</a>;
3226 00623         user-&gt;<a class="code" href="classuserrec.html#a11">ClearBuffer</a>();
3227 00624         Write(old_fd,<span class="stringliteral">"ERROR :Closing link (%s@%s) [%s]"</span>,user-&gt;<a class="code" href="classuserrec.html#o1">ident</a>,user-&gt;<a class="code" href="classconnection.html#o1">host</a>,message.c_str());
3228 00625 <span class="preprocessor">#ifdef USE_KQUEUE</span>
3229 00626 <span class="preprocessor"></span>        <span class="keyword">struct </span>kevent ke;
3230 00627         EV_SET(&amp;ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
3231 00628         <span class="keywordtype">int</span> i = kevent(kq, &amp;ke, 1, 0, 0, NULL);
3232 00629         <span class="keywordflow">if</span> (i == -1)
3233 00630         {
3234 00631                 log(DEBUG,<span class="stringliteral">"kqueue: Failed to remove user from queue!"</span>);
3235 00632         }
3236 00633 <span class="preprocessor">#endif</span>
3237 00634 <span class="preprocessor"></span><span class="preprocessor">#ifdef USE_EPOLL</span>
3238 00635 <span class="preprocessor"></span>        <span class="keyword">struct </span>epoll_event ev;
3239 00636         ev.events = EPOLLIN | EPOLLET;
3240 00637         ev.data.fd = old_fd;
3241 00638         <span class="keywordtype">int</span> i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &amp;ev);
3242 00639         <span class="keywordflow">if</span> (i &lt; 0)
3243 00640         {
3244 00641                 log(DEBUG,<span class="stringliteral">"epoll: List deletion failure!"</span>);
3245 00642         }
3246 00643 <span class="preprocessor">#endif</span>
3247 00644 <span class="preprocessor"></span>
3248 00645         shutdown(old_fd,2);
3249 00646         close(old_fd);
3250 00647 }
3251 </pre></div>    </td>
3252   </tr>
3253 </table>
3254 <hr>The documentation for this class was generated from the following files:<ul>
3255 <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>
3256 <hr size="1"><address style="align: right;"><small>Generated on Wed May 25 22:03:22 2005 for InspIRCd by
3257 <a href="http://www.doxygen.org/index.html">
3258 <img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
3259 </a>1.3.3 </small></address>
3260 </body>
3261 </html>