]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classServer.html
Documentation update, 09/02/03
[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>Server class Reference</title>
4 <link href="doxygen.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.3-rc2 -->
7 <center>
8 <a class="qindex" href="main.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
9 <hr><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. 
10 <a href="#_details">More...</a>
11 <p>
12 <code>#include &lt;<a class="el" href="modules_8h-source.html">modules.h</a>&gt;</code>
13 <p>
14 <p>Inheritance diagram for Server:
15 <p><center><img src="classServer.png" usemap="#Server_map" border="0" alt=""></center>
16 <map name="Server_map">
17 <area href="classclassbase.html" alt="classbase" shape="rect" coords="0,0,68,24">
18 </map>
19 <a href="classServer-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
20 <tr><td></td></tr>
21 <tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
22 <tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a0">Server</a> ()</td></tr>
23 <tr><td>&nbsp;</td><td><font size=-1><em>Default constructor.</em> <a href="#a0"></a><em></em></font><br><br></td></tr>
24 <tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a1">~Server</a> ()</td></tr>
25 <tr><td>&nbsp;</td><td><font size=-1><em>Default destructor.</em> <a href="#a1"></a><em></em></font><br><br></td></tr>
26 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a2">SendOpers</a> (string s)</td></tr>
27 <tr><td>&nbsp;</td><td><font size=-1><em>Sends text to all opers.</em> <a href="#a2"></a><em></em></font><br><br></td></tr>
28 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a3">Log</a> (int level, string s)</td></tr>
29 <tr><td>&nbsp;</td><td><font size=-1><em>Writes a log string.</em> <a href="#a3"></a><em></em></font><br><br></td></tr>
30 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a4">Send</a> (int Socket, string s)</td></tr>
31 <tr><td>&nbsp;</td><td><font size=-1><em>Sends a line of text down a TCP/IP socket.</em> <a href="#a4"></a><em></em></font><br><br></td></tr>
32 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a5">SendServ</a> (int Socket, string s)</td></tr>
33 <tr><td>&nbsp;</td><td><font size=-1><em>Sends text from the server to a socket.</em> <a href="#a5"></a><em></em></font><br><br></td></tr>
34 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a6">SendFrom</a> (int Socket, <a class="el" href="classuserrec.html">userrec</a> *User, string s)</td></tr>
35 <tr><td>&nbsp;</td><td><font size=-1><em>Sends text from a user to a socket.</em> <a href="#a6"></a><em></em></font><br><br></td></tr>
36 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a7">SendTo</a> (<a class="el" href="classuserrec.html">userrec</a> *Source, <a class="el" href="classuserrec.html">userrec</a> *Dest, string s)</td></tr>
37 <tr><td>&nbsp;</td><td><font size=-1><em>Sends text from a user to another user.</em> <a href="#a7"></a><em></em></font><br><br></td></tr>
38 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a8">SendChannel</a> (<a class="el" href="classuserrec.html">userrec</a> *User, <a class="el" href="classchanrec.html">chanrec</a> *Channel, string s, bool IncludeSender)</td></tr>
39 <tr><td>&nbsp;</td><td><font size=-1><em>Sends text from a user to a channel (mulicast).</em> <a href="#a8"></a><em></em></font><br><br></td></tr>
40 <tr><td nowrap align=right valign=top>virtual bool&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a9">CommonChannels</a> (<a class="el" href="classuserrec.html">userrec</a> *u1, <a class="el" href="classuserrec.html">userrec</a> *u2)</td></tr>
41 <tr><td>&nbsp;</td><td><font size=-1><em>Returns true if two users share a common channel.</em> <a href="#a9"></a><em></em></font><br><br></td></tr>
42 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a10">SendCommon</a> (<a class="el" href="classuserrec.html">userrec</a> *User, string text, bool IncludeSender)</td></tr>
43 <tr><td>&nbsp;</td><td><font size=-1><em>Sends text from a user to one or more channels (mulicast).</em> <a href="#a10"></a><em></em></font><br><br></td></tr>
44 <tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a11">SendWallops</a> (<a class="el" href="classuserrec.html">userrec</a> *User, string text)</td></tr>
45 <tr><td>&nbsp;</td><td><font size=-1><em>Sends a WALLOPS message.</em> <a href="#a11"></a><em></em></font><br><br></td></tr>
46 <tr><td nowrap align=right valign=top>virtual bool&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a12">IsNick</a> (string nick)</td></tr>
47 <tr><td>&nbsp;</td><td><font size=-1><em>Returns true if a nick is valid.</em> <a href="#a12"></a><em></em></font><br><br></td></tr>
48 <tr><td nowrap align=right valign=top>virtual <a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a13">FindNick</a> (string nick)</td></tr>
49 <tr><td>&nbsp;</td><td><font size=-1><em>Attempts to look up a nick and return a pointer to it.</em> <a href="#a13"></a><em></em></font><br><br></td></tr>
50 <tr><td nowrap align=right valign=top>virtual <a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a14">FindChannel</a> (string channel)</td></tr>
51 <tr><td>&nbsp;</td><td><font size=-1><em>Attempts to look up a channel and return a pointer to it.</em> <a href="#a14"></a><em></em></font><br><br></td></tr>
52 <tr><td nowrap align=right valign=top>virtual string&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a15">ChanMode</a> (<a class="el" href="classuserrec.html">userrec</a> *User, <a class="el" href="classchanrec.html">chanrec</a> *Chan)</td></tr>
53 <tr><td>&nbsp;</td><td><font size=-1><em>Attempts to look up a user's privilages on a channel.</em> <a href="#a15"></a><em></em></font><br><br></td></tr>
54 <tr><td nowrap align=right valign=top>virtual string&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a16">GetServerName</a> ()</td></tr>
55 <tr><td>&nbsp;</td><td><font size=-1><em>Returns the server name of the server where the module is loaded.</em> <a href="#a16"></a><em></em></font><br><br></td></tr>
56 <tr><td nowrap align=right valign=top>virtual string&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a17">GetNetworkName</a> ()</td></tr>
57 <tr><td>&nbsp;</td><td><font size=-1><em>Returns the network name, global to all linked servers.</em> <a href="#a17"></a><em></em></font><br><br></td></tr>
58 <tr><td nowrap align=right valign=top>virtual <a class="el" href="classAdmin.html">Admin</a>&nbsp;</td><td valign=bottom><a class="el" href="classServer.html#a18">GetAdmin</a> ()</td></tr>
59 <tr><td>&nbsp;</td><td><font size=-1><em>Returns the information of the server as returned by the /ADMIN command.</em> <a href="#a18"></a><em></em></font><br><br></td></tr>
60 </table>
61 <hr><a name="_details"></a><h2>Detailed Description</h2>
62 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.
63 <p>
64 All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks. 
65 <p>
66
67 <p>
68 Definition at line <a class="el" href="modules_8h-source.html#l00113">113</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
69 <a name="a0" doxytag="Server::Server"></a><p>
70 <table width="100%" cellpadding="2" cellspacing="0" border="0">
71   <tr>
72     <td class="md">
73       <table cellpadding="0" cellspacing="0" border="0">
74         <tr>
75           <td class="md" nowrap valign="top"> Server::Server </td>
76           <td class="md" valign="top">(&nbsp;</td>
77           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
78           <td class="md" valign="top">)&nbsp;</td>
79           <td class="md" nowrap></td>
80         </tr>
81
82       </table>
83     </td>
84   </tr>
85 </table>
86 <table cellspacing=5 cellpadding=0 border=0>
87   <tr>
88     <td>
89       &nbsp;
90     </td>
91     <td>
92
93 <p>
94 Default constructor.
95 <p>
96 Creates a Server object.
97 <p>
98 Definition at line <a class="el" href="modules_8cpp-source.html#l00042">42</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
99 <p>
100 <div class="fragment"><pre>00043 {
101 00044 }
102 </pre></div>    </td>
103   </tr>
104 </table>
105 <a name="a1" doxytag="Server::~Server"></a><p>
106 <table width="100%" cellpadding="2" cellspacing="0" border="0">
107   <tr>
108     <td class="md">
109       <table cellpadding="0" cellspacing="0" border="0">
110         <tr>
111           <td class="md" nowrap valign="top"> Server::~Server </td>
112           <td class="md" valign="top">(&nbsp;</td>
113           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
114           <td class="md" valign="top">)&nbsp;</td>
115           <td class="md" nowrap><code> [virtual]</code></td>
116         </tr>
117
118       </table>
119     </td>
120   </tr>
121 </table>
122 <table cellspacing=5 cellpadding=0 border=0>
123   <tr>
124     <td>
125       &nbsp;
126     </td>
127     <td>
128
129 <p>
130 Default destructor.
131 <p>
132 Destroys a Server object.
133 <p>
134 Definition at line <a class="el" href="modules_8cpp-source.html#l00046">46</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
135 <p>
136 <div class="fragment"><pre>00047 {
137 00048 }
138 </pre></div>    </td>
139   </tr>
140 </table>
141 <hr><h2>Member Function Documentation</h2>
142 <a name="a15" doxytag="Server::ChanMode"></a><p>
143 <table width="100%" cellpadding="2" cellspacing="0" border="0">
144   <tr>
145     <td class="md">
146       <table cellpadding="0" cellspacing="0" border="0">
147         <tr>
148           <td class="md" nowrap valign="top"> string Server::ChanMode </td>
149           <td class="md" valign="top">(&nbsp;</td>
150           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
151           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
152         </tr>
153         <tr>
154           <td></td>
155           <td></td>
156           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
157           <td class="mdname" nowrap>&nbsp; <em>Chan</em></td>
158         </tr>
159         <tr>
160           <td></td>
161           <td class="md">)&nbsp;</td>
162           <td class="md" colspan="2"><code> [virtual]</code></td>
163         </tr>
164
165       </table>
166     </td>
167   </tr>
168 </table>
169 <table cellspacing=5 cellpadding=0 border=0>
170   <tr>
171     <td>
172       &nbsp;
173     </td>
174     <td>
175
176 <p>
177 Attempts to look up a user's privilages on a channel.
178 <p>
179 This function will return a string containing either @, , +, or an empty string, representing the user's privilages upon the channel you specify.
180 <p>
181 Definition at line <a class="el" href="modules_8cpp-source.html#l00129">129</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
182 <p>
183 <div class="fragment"><pre>00130 {
184 00131         string mode = cmode(User,Chan);
185 00132         <span class="keywordflow">return</span> mode;
186 00133 }
187 </pre></div>    </td>
188   </tr>
189 </table>
190 <a name="a9" doxytag="Server::CommonChannels"></a><p>
191 <table width="100%" cellpadding="2" cellspacing="0" border="0">
192   <tr>
193     <td class="md">
194       <table cellpadding="0" cellspacing="0" border="0">
195         <tr>
196           <td class="md" nowrap valign="top"> bool Server::CommonChannels </td>
197           <td class="md" valign="top">(&nbsp;</td>
198           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
199           <td class="mdname" nowrap>&nbsp; <em>u1</em>, </td>
200         </tr>
201         <tr>
202           <td></td>
203           <td></td>
204           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
205           <td class="mdname" nowrap>&nbsp; <em>u2</em></td>
206         </tr>
207         <tr>
208           <td></td>
209           <td class="md">)&nbsp;</td>
210           <td class="md" colspan="2"><code> [virtual]</code></td>
211         </tr>
212
213       </table>
214     </td>
215   </tr>
216 </table>
217 <table cellspacing=5 cellpadding=0 border=0>
218   <tr>
219     <td>
220       &nbsp;
221     </td>
222     <td>
223
224 <p>
225 Returns true if two users share a common channel.
226 <p>
227 This method is used internally by the NICK and QUIT commands, and the <a class="el" href="classServer.html#a10">Server::SendCommon</a> method.
228 <p>
229 Definition at line <a class="el" href="modules_8cpp-source.html#l00092">92</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
230 <p>
231 <div class="fragment"><pre>00093 {
232 00094         <span class="keywordflow">return</span> (common_channels(u1,u2) != 0);
233 00095 }
234 </pre></div>    </td>
235   </tr>
236 </table>
237 <a name="a14" doxytag="Server::FindChannel"></a><p>
238 <table width="100%" cellpadding="2" cellspacing="0" border="0">
239   <tr>
240     <td class="md">
241       <table cellpadding="0" cellspacing="0" border="0">
242         <tr>
243           <td class="md" nowrap valign="top"> <a class="el" href="classchanrec.html">chanrec</a> * Server::FindChannel </td>
244           <td class="md" valign="top">(&nbsp;</td>
245           <td class="md" nowrap valign="top">string&nbsp;</td>
246           <td class="mdname1" valign="top" nowrap>&nbsp; <em>channel</em>          </td>
247           <td class="md" valign="top">)&nbsp;</td>
248           <td class="md" nowrap><code> [virtual]</code></td>
249         </tr>
250
251       </table>
252     </td>
253   </tr>
254 </table>
255 <table cellspacing=5 cellpadding=0 border=0>
256   <tr>
257     <td>
258       &nbsp;
259     </td>
260     <td>
261
262 <p>
263 Attempts to look up a channel and return a pointer to it.
264 <p>
265 This function will return NULL if the channel does not exist.
266 <p>
267 Definition at line <a class="el" href="modules_8cpp-source.html#l00124">124</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
268 <p>
269 <div class="fragment"><pre>00125 {
270 00126         <span class="keywordflow">return</span> FindChan(channel.c_str());
271 00127 }
272 </pre></div>    </td>
273   </tr>
274 </table>
275 <a name="a13" doxytag="Server::FindNick"></a><p>
276 <table width="100%" cellpadding="2" cellspacing="0" border="0">
277   <tr>
278     <td class="md">
279       <table cellpadding="0" cellspacing="0" border="0">
280         <tr>
281           <td class="md" nowrap valign="top"> <a class="el" href="classuserrec.html">userrec</a> * Server::FindNick </td>
282           <td class="md" valign="top">(&nbsp;</td>
283           <td class="md" nowrap valign="top">string&nbsp;</td>
284           <td class="mdname1" valign="top" nowrap>&nbsp; <em>nick</em>          </td>
285           <td class="md" valign="top">)&nbsp;</td>
286           <td class="md" nowrap><code> [virtual]</code></td>
287         </tr>
288
289       </table>
290     </td>
291   </tr>
292 </table>
293 <table cellspacing=5 cellpadding=0 border=0>
294   <tr>
295     <td>
296       &nbsp;
297     </td>
298     <td>
299
300 <p>
301 Attempts to look up a nick and return a pointer to it.
302 <p>
303 This function will return NULL if the nick does not exist.
304 <p>
305 Definition at line <a class="el" href="modules_8cpp-source.html#l00119">119</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
306 <p>
307 <div class="fragment"><pre>00120 {
308 00121         <span class="keywordflow">return</span> Find(nick);
309 00122 }
310 </pre></div>    </td>
311   </tr>
312 </table>
313 <a name="a18" doxytag="Server::GetAdmin"></a><p>
314 <table width="100%" cellpadding="2" cellspacing="0" border="0">
315   <tr>
316     <td class="md">
317       <table cellpadding="0" cellspacing="0" border="0">
318         <tr>
319           <td class="md" nowrap valign="top"> <a class="el" href="classAdmin.html">Admin</a> Server::GetAdmin </td>
320           <td class="md" valign="top">(&nbsp;</td>
321           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
322           <td class="md" valign="top">)&nbsp;</td>
323           <td class="md" nowrap><code> [virtual]</code></td>
324         </tr>
325
326       </table>
327     </td>
328   </tr>
329 </table>
330 <table cellspacing=5 cellpadding=0 border=0>
331   <tr>
332     <td>
333       &nbsp;
334     </td>
335     <td>
336
337 <p>
338 Returns the information of the server as returned by the /ADMIN command.
339 <p>
340 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#m2">Admin::Nick</a>, <a class="el" href="classAdmin.html#m1">Admin::Email</a> and <a class="el" href="classAdmin.html#m0">Admin::Name</a> contain the information for the server where the module is loaded.
341 <p>
342 Definition at line <a class="el" href="modules_8cpp-source.html#l00145">145</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
343 <p>
344 <div class="fragment"><pre>00146 {
345 00147         <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick());
346 00148 }
347 </pre></div>    </td>
348   </tr>
349 </table>
350 <a name="a17" doxytag="Server::GetNetworkName"></a><p>
351 <table width="100%" cellpadding="2" cellspacing="0" border="0">
352   <tr>
353     <td class="md">
354       <table cellpadding="0" cellspacing="0" border="0">
355         <tr>
356           <td class="md" nowrap valign="top"> string Server::GetNetworkName </td>
357           <td class="md" valign="top">(&nbsp;</td>
358           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
359           <td class="md" valign="top">)&nbsp;</td>
360           <td class="md" nowrap><code> [virtual]</code></td>
361         </tr>
362
363       </table>
364     </td>
365   </tr>
366 </table>
367 <table cellspacing=5 cellpadding=0 border=0>
368   <tr>
369     <td>
370       &nbsp;
371     </td>
372     <td>
373
374 <p>
375 Returns the network name, global to all linked servers.
376 <p>
377
378 <p>
379 Definition at line <a class="el" href="modules_8cpp-source.html#l00140">140</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
380 <p>
381 <div class="fragment"><pre>00141 {
382 00142         <span class="keywordflow">return</span> getnetworkname();
383 00143 }
384 </pre></div>    </td>
385   </tr>
386 </table>
387 <a name="a16" doxytag="Server::GetServerName"></a><p>
388 <table width="100%" cellpadding="2" cellspacing="0" border="0">
389   <tr>
390     <td class="md">
391       <table cellpadding="0" cellspacing="0" border="0">
392         <tr>
393           <td class="md" nowrap valign="top"> string Server::GetServerName </td>
394           <td class="md" valign="top">(&nbsp;</td>
395           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
396           <td class="md" valign="top">)&nbsp;</td>
397           <td class="md" nowrap><code> [virtual]</code></td>
398         </tr>
399
400       </table>
401     </td>
402   </tr>
403 </table>
404 <table cellspacing=5 cellpadding=0 border=0>
405   <tr>
406     <td>
407       &nbsp;
408     </td>
409     <td>
410
411 <p>
412 Returns the server name of the server where the module is loaded.
413 <p>
414
415 <p>
416 Definition at line <a class="el" href="modules_8cpp-source.html#l00135">135</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
417 <p>
418 <div class="fragment"><pre>00136 {
419 00137         <span class="keywordflow">return</span> getservername();
420 00138 }
421 </pre></div>    </td>
422   </tr>
423 </table>
424 <a name="a12" doxytag="Server::IsNick"></a><p>
425 <table width="100%" cellpadding="2" cellspacing="0" border="0">
426   <tr>
427     <td class="md">
428       <table cellpadding="0" cellspacing="0" border="0">
429         <tr>
430           <td class="md" nowrap valign="top"> bool Server::IsNick </td>
431           <td class="md" valign="top">(&nbsp;</td>
432           <td class="md" nowrap valign="top">string&nbsp;</td>
433           <td class="mdname1" valign="top" nowrap>&nbsp; <em>nick</em>          </td>
434           <td class="md" valign="top">)&nbsp;</td>
435           <td class="md" nowrap><code> [virtual]</code></td>
436         </tr>
437
438       </table>
439     </td>
440   </tr>
441 </table>
442 <table cellspacing=5 cellpadding=0 border=0>
443   <tr>
444     <td>
445       &nbsp;
446     </td>
447     <td>
448
449 <p>
450 Returns true if a nick is valid.
451 <p>
452 Nicks for unregistered connections will return false.
453 <p>
454 Definition at line <a class="el" href="modules_8cpp-source.html#l00114">114</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
455 <p>
456 <div class="fragment"><pre>00115 {
457 00116         <span class="keywordflow">return</span> (isnick(nick.c_str()) != 0);
458 00117 }
459 </pre></div>    </td>
460   </tr>
461 </table>
462 <a name="a3" doxytag="Server::Log"></a><p>
463 <table width="100%" cellpadding="2" cellspacing="0" border="0">
464   <tr>
465     <td class="md">
466       <table cellpadding="0" cellspacing="0" border="0">
467         <tr>
468           <td class="md" nowrap valign="top"> void Server::Log </td>
469           <td class="md" valign="top">(&nbsp;</td>
470           <td class="md" nowrap valign="top">int&nbsp;</td>
471           <td class="mdname" nowrap>&nbsp; <em>level</em>, </td>
472         </tr>
473         <tr>
474           <td></td>
475           <td></td>
476           <td class="md" nowrap>string&nbsp;</td>
477           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
478         </tr>
479         <tr>
480           <td></td>
481           <td class="md">)&nbsp;</td>
482           <td class="md" colspan="2"><code> [virtual]</code></td>
483         </tr>
484
485       </table>
486     </td>
487   </tr>
488 </table>
489 <table cellspacing=5 cellpadding=0 border=0>
490   <tr>
491     <td>
492       &nbsp;
493     </td>
494     <td>
495
496 <p>
497 Writes a log string.
498 <p>
499 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.
500 <p>
501 Definition at line <a class="el" href="modules_8cpp-source.html#l00055">55</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
502 <p>
503 <div class="fragment"><pre>00056 {
504 00057         log(level,<span class="stringliteral">"%s"</span>,s.c_str());
505 00058 }
506 </pre></div>    </td>
507   </tr>
508 </table>
509 <a name="a4" doxytag="Server::Send"></a><p>
510 <table width="100%" cellpadding="2" cellspacing="0" border="0">
511   <tr>
512     <td class="md">
513       <table cellpadding="0" cellspacing="0" border="0">
514         <tr>
515           <td class="md" nowrap valign="top"> void Server::Send </td>
516           <td class="md" valign="top">(&nbsp;</td>
517           <td class="md" nowrap valign="top">int&nbsp;</td>
518           <td class="mdname" nowrap>&nbsp; <em>Socket</em>, </td>
519         </tr>
520         <tr>
521           <td></td>
522           <td></td>
523           <td class="md" nowrap>string&nbsp;</td>
524           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
525         </tr>
526         <tr>
527           <td></td>
528           <td class="md">)&nbsp;</td>
529           <td class="md" colspan="2"><code> [virtual]</code></td>
530         </tr>
531
532       </table>
533     </td>
534   </tr>
535 </table>
536 <table cellspacing=5 cellpadding=0 border=0>
537   <tr>
538     <td>
539       &nbsp;
540     </td>
541     <td>
542
543 <p>
544 Sends a line of text down a TCP/IP socket.
545 <p>
546 This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.
547 <p>
548 Definition at line <a class="el" href="modules_8cpp-source.html#l00060">60</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
549 <p>
550 <div class="fragment"><pre>00061 {
551 00062         Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
552 00063 }
553 </pre></div>    </td>
554   </tr>
555 </table>
556 <a name="a8" doxytag="Server::SendChannel"></a><p>
557 <table width="100%" cellpadding="2" cellspacing="0" border="0">
558   <tr>
559     <td class="md">
560       <table cellpadding="0" cellspacing="0" border="0">
561         <tr>
562           <td class="md" nowrap valign="top"> void Server::SendChannel </td>
563           <td class="md" valign="top">(&nbsp;</td>
564           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
565           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
566         </tr>
567         <tr>
568           <td></td>
569           <td></td>
570           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
571           <td class="mdname" nowrap>&nbsp; <em>Channel</em>, </td>
572         </tr>
573         <tr>
574           <td></td>
575           <td></td>
576           <td class="md" nowrap>string&nbsp;</td>
577           <td class="mdname" nowrap>&nbsp; <em>s</em>, </td>
578         </tr>
579         <tr>
580           <td></td>
581           <td></td>
582           <td class="md" nowrap>bool&nbsp;</td>
583           <td class="mdname" nowrap>&nbsp; <em>IncludeSender</em></td>
584         </tr>
585         <tr>
586           <td></td>
587           <td class="md">)&nbsp;</td>
588           <td class="md" colspan="2"><code> [virtual]</code></td>
589         </tr>
590
591       </table>
592     </td>
593   </tr>
594 </table>
595 <table cellspacing=5 cellpadding=0 border=0>
596   <tr>
597     <td>
598       &nbsp;
599     </td>
600     <td>
601
602 <p>
603 Sends text from a user to a channel (mulicast).
604 <p>
605 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).
606 <p>
607 Definition at line <a class="el" href="modules_8cpp-source.html#l00080">80</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
608 <p>
609 <div class="fragment"><pre>00081 {
610 00082         <span class="keywordflow">if</span> (IncludeSender)
611 00083         {
612 00084                 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
613 00085         }
614 00086         <span class="keywordflow">else</span>
615 00087         {
616 00088                 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
617 00089         }
618 00090 }
619 </pre></div>    </td>
620   </tr>
621 </table>
622 <a name="a10" doxytag="Server::SendCommon"></a><p>
623 <table width="100%" cellpadding="2" cellspacing="0" border="0">
624   <tr>
625     <td class="md">
626       <table cellpadding="0" cellspacing="0" border="0">
627         <tr>
628           <td class="md" nowrap valign="top"> void Server::SendCommon </td>
629           <td class="md" valign="top">(&nbsp;</td>
630           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
631           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
632         </tr>
633         <tr>
634           <td></td>
635           <td></td>
636           <td class="md" nowrap>string&nbsp;</td>
637           <td class="mdname" nowrap>&nbsp; <em>text</em>, </td>
638         </tr>
639         <tr>
640           <td></td>
641           <td></td>
642           <td class="md" nowrap>bool&nbsp;</td>
643           <td class="mdname" nowrap>&nbsp; <em>IncludeSender</em></td>
644         </tr>
645         <tr>
646           <td></td>
647           <td class="md">)&nbsp;</td>
648           <td class="md" colspan="2"><code> [virtual]</code></td>
649         </tr>
650
651       </table>
652     </td>
653   </tr>
654 </table>
655 <table cellspacing=5 cellpadding=0 border=0>
656   <tr>
657     <td>
658       &nbsp;
659     </td>
660     <td>
661
662 <p>
663 Sends text from a user to one or more channels (mulicast).
664 <p>
665 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.
666 <p>
667 Definition at line <a class="el" href="modules_8cpp-source.html#l00097">97</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
668 <p>
669 <div class="fragment"><pre>00098 {
670 00099         <span class="keywordflow">if</span> (IncludeSender)
671 00100         {
672 00101                 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str());
673 00102         }
674 00103         <span class="keywordflow">else</span>
675 00104         {
676 00105                 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str());
677 00106         }
678 00107 }
679 </pre></div>    </td>
680   </tr>
681 </table>
682 <a name="a6" doxytag="Server::SendFrom"></a><p>
683 <table width="100%" cellpadding="2" cellspacing="0" border="0">
684   <tr>
685     <td class="md">
686       <table cellpadding="0" cellspacing="0" border="0">
687         <tr>
688           <td class="md" nowrap valign="top"> void Server::SendFrom </td>
689           <td class="md" valign="top">(&nbsp;</td>
690           <td class="md" nowrap valign="top">int&nbsp;</td>
691           <td class="mdname" nowrap>&nbsp; <em>Socket</em>, </td>
692         </tr>
693         <tr>
694           <td></td>
695           <td></td>
696           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
697           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
698         </tr>
699         <tr>
700           <td></td>
701           <td></td>
702           <td class="md" nowrap>string&nbsp;</td>
703           <td class="mdname" nowrap>&nbsp; <em>s</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 Sends text from a user to a socket.
724 <p>
725 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)
726 <p>
727 Definition at line <a class="el" href="modules_8cpp-source.html#l00070">70</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
728 <p>
729 <div class="fragment"><pre>00071 {
730 00072         WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str());
731 00073 }
732 </pre></div>    </td>
733   </tr>
734 </table>
735 <a name="a2" doxytag="Server::SendOpers"></a><p>
736 <table width="100%" cellpadding="2" cellspacing="0" border="0">
737   <tr>
738     <td class="md">
739       <table cellpadding="0" cellspacing="0" border="0">
740         <tr>
741           <td class="md" nowrap valign="top"> void Server::SendOpers </td>
742           <td class="md" valign="top">(&nbsp;</td>
743           <td class="md" nowrap valign="top">string&nbsp;</td>
744           <td class="mdname1" valign="top" nowrap>&nbsp; <em>s</em>          </td>
745           <td class="md" valign="top">)&nbsp;</td>
746           <td class="md" nowrap><code> [virtual]</code></td>
747         </tr>
748
749       </table>
750     </td>
751   </tr>
752 </table>
753 <table cellspacing=5 cellpadding=0 border=0>
754   <tr>
755     <td>
756       &nbsp;
757     </td>
758     <td>
759
760 <p>
761 Sends text to all opers.
762 <p>
763 This method sends a server notice to all opers with the usermode +s.
764 <p>
765 Definition at line <a class="el" href="modules_8cpp-source.html#l00050">50</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
766 <p>
767 <div class="fragment"><pre>00051 {
768 00052         WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str());
769 00053 }
770 </pre></div>    </td>
771   </tr>
772 </table>
773 <a name="a5" doxytag="Server::SendServ"></a><p>
774 <table width="100%" cellpadding="2" cellspacing="0" border="0">
775   <tr>
776     <td class="md">
777       <table cellpadding="0" cellspacing="0" border="0">
778         <tr>
779           <td class="md" nowrap valign="top"> void Server::SendServ </td>
780           <td class="md" valign="top">(&nbsp;</td>
781           <td class="md" nowrap valign="top">int&nbsp;</td>
782           <td class="mdname" nowrap>&nbsp; <em>Socket</em>, </td>
783         </tr>
784         <tr>
785           <td></td>
786           <td></td>
787           <td class="md" nowrap>string&nbsp;</td>
788           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
789         </tr>
790         <tr>
791           <td></td>
792           <td class="md">)&nbsp;</td>
793           <td class="md" colspan="2"><code> [virtual]</code></td>
794         </tr>
795
796       </table>
797     </td>
798   </tr>
799 </table>
800 <table cellspacing=5 cellpadding=0 border=0>
801   <tr>
802     <td>
803       &nbsp;
804     </td>
805     <td>
806
807 <p>
808 Sends text from the server to a socket.
809 <p>
810 This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)
811 <p>
812 Definition at line <a class="el" href="modules_8cpp-source.html#l00065">65</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
813 <p>
814 <div class="fragment"><pre>00066 {
815 00067         WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
816 00068 }
817 </pre></div>    </td>
818   </tr>
819 </table>
820 <a name="a7" doxytag="Server::SendTo"></a><p>
821 <table width="100%" cellpadding="2" cellspacing="0" border="0">
822   <tr>
823     <td class="md">
824       <table cellpadding="0" cellspacing="0" border="0">
825         <tr>
826           <td class="md" nowrap valign="top"> void Server::SendTo </td>
827           <td class="md" valign="top">(&nbsp;</td>
828           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
829           <td class="mdname" nowrap>&nbsp; <em>Source</em>, </td>
830         </tr>
831         <tr>
832           <td></td>
833           <td></td>
834           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
835           <td class="mdname" nowrap>&nbsp; <em>Dest</em>, </td>
836         </tr>
837         <tr>
838           <td></td>
839           <td></td>
840           <td class="md" nowrap>string&nbsp;</td>
841           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
842         </tr>
843         <tr>
844           <td></td>
845           <td class="md">)&nbsp;</td>
846           <td class="md" colspan="2"><code> [virtual]</code></td>
847         </tr>
848
849       </table>
850     </td>
851   </tr>
852 </table>
853 <table cellspacing=5 cellpadding=0 border=0>
854   <tr>
855     <td>
856       &nbsp;
857     </td>
858     <td>
859
860 <p>
861 Sends text from a user to another user.
862 <p>
863 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)
864 <p>
865 Definition at line <a class="el" href="modules_8cpp-source.html#l00075">75</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
866 <p>
867 <div class="fragment"><pre>00076 {
868 00077         WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str());
869 00078 }
870 </pre></div>    </td>
871   </tr>
872 </table>
873 <a name="a11" doxytag="Server::SendWallops"></a><p>
874 <table width="100%" cellpadding="2" cellspacing="0" border="0">
875   <tr>
876     <td class="md">
877       <table cellpadding="0" cellspacing="0" border="0">
878         <tr>
879           <td class="md" nowrap valign="top"> void Server::SendWallops </td>
880           <td class="md" valign="top">(&nbsp;</td>
881           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
882           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
883         </tr>
884         <tr>
885           <td></td>
886           <td></td>
887           <td class="md" nowrap>string&nbsp;</td>
888           <td class="mdname" nowrap>&nbsp; <em>text</em></td>
889         </tr>
890         <tr>
891           <td></td>
892           <td class="md">)&nbsp;</td>
893           <td class="md" colspan="2"><code> [virtual]</code></td>
894         </tr>
895
896       </table>
897     </td>
898   </tr>
899 </table>
900 <table cellspacing=5 cellpadding=0 border=0>
901   <tr>
902     <td>
903       &nbsp;
904     </td>
905     <td>
906
907 <p>
908 Sends a WALLOPS message.
909 <p>
910 This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.
911 <p>
912 Definition at line <a class="el" href="modules_8cpp-source.html#l00109">109</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
913 <p>
914 <div class="fragment"><pre>00110 {
915 00111         WriteWallOps(User,<span class="stringliteral">"%s"</span>,text.c_str());
916 00112 }
917 </pre></div>    </td>
918   </tr>
919 </table>
920 <hr>The documentation for this class was generated from the following files:<ul>
921 <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>
922 <hr><address style="align: right;"><small>Generated on Sun Feb 9 12:48:19 2003 for InspIRCd by
923 <a href="http://www.doxygen.org/index.html">
924 <img src="doxygen.png" alt="doxygen" align="middle" border=0 
925 width=110 height=53></a>1.3-rc2 </small></address>
926 </body>
927 </html>