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