]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classServer.html
Modified documentation for base classes
[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">Debug</a> (string s)</td></tr>
29 <tr><td>&nbsp;</td><td><font size=-1><em>Sends a debug 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#l00128">128</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#l00055">55</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
99 <p>
100 <div class="fragment"><pre>00056 {
101 00057 }
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#l00059">59</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
135 <p>
136 <div class="fragment"><pre>00060 {
137 00061 }
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#l00142">142</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
182 <p>
183 <div class="fragment"><pre>00143 {
184 00144         string mode = cmode(User,Chan);
185 00145         <span class="keywordflow">return</span> mode;
186 00146 }
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#l00105">105</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
230 <p>
231 <div class="fragment"><pre>00106 {
232 00107         <span class="keywordflow">return</span> (common_channels(u1,u2) != 0);
233 00108 }
234 </pre></div>    </td>
235   </tr>
236 </table>
237 <a name="a3" doxytag="Server::Debug"></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"> void Server::Debug </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>s</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 Sends a debug string.
264 <p>
265 This method writes a line of text to the debug log. If debugging is disabled in the configuration, this command has no effect.
266 <p>
267 Definition at line <a class="el" href="modules_8cpp-source.html#l00068">68</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
268 <p>
269 <div class="fragment"><pre>00069 {
270 00070         debug(<span class="stringliteral">"%s"</span>,s.c_str());
271 00071 }
272 </pre></div>    </td>
273   </tr>
274 </table>
275 <a name="a14" doxytag="Server::FindChannel"></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="classchanrec.html">chanrec</a> * Server::FindChannel </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>channel</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 channel and return a pointer to it.
302 <p>
303 This function will return NULL if the channel does not exist.
304 <p>
305 Definition at line <a class="el" href="modules_8cpp-source.html#l00137">137</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
306 <p>
307 <div class="fragment"><pre>00138 {
308 00139         <span class="keywordflow">return</span> FindChan(channel.c_str());
309 00140 }
310 </pre></div>    </td>
311   </tr>
312 </table>
313 <a name="a13" doxytag="Server::FindNick"></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="classuserrec.html">userrec</a> * Server::FindNick </td>
320           <td class="md" valign="top">(&nbsp;</td>
321           <td class="md" nowrap valign="top">string&nbsp;</td>
322           <td class="mdname1" valign="top" nowrap>&nbsp; <em>nick</em>          </td>
323           <td class="md" valign="top">)&nbsp;</td>
324           <td class="md" nowrap><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 Attempts to look up a nick and return a pointer to it.
340 <p>
341 This function will return NULL if the nick does not exist.
342 <p>
343 Definition at line <a class="el" href="modules_8cpp-source.html#l00132">132</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
344 <p>
345 <div class="fragment"><pre>00133 {
346 00134         <span class="keywordflow">return</span> Find(nick);
347 00135 }
348 </pre></div>    </td>
349   </tr>
350 </table>
351 <a name="a18" doxytag="Server::GetAdmin"></a><p>
352 <table width="100%" cellpadding="2" cellspacing="0" border="0">
353   <tr>
354     <td class="md">
355       <table cellpadding="0" cellspacing="0" border="0">
356         <tr>
357           <td class="md" nowrap valign="top"> <a class="el" href="classAdmin.html">Admin</a> Server::GetAdmin </td>
358           <td class="md" valign="top">(&nbsp;</td>
359           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
360           <td class="md" valign="top">)&nbsp;</td>
361           <td class="md" nowrap><code> [virtual]</code></td>
362         </tr>
363
364       </table>
365     </td>
366   </tr>
367 </table>
368 <table cellspacing=5 cellpadding=0 border=0>
369   <tr>
370     <td>
371       &nbsp;
372     </td>
373     <td>
374
375 <p>
376 Returns the information of the server as returned by the /ADMIN command.
377 <p>
378 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.
379 <p>
380 Definition at line <a class="el" href="modules_8cpp-source.html#l00158">158</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
381 <p>
382 <div class="fragment"><pre>00159 {
383 00160         <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick());
384 00161 }
385 </pre></div>    </td>
386   </tr>
387 </table>
388 <a name="a17" doxytag="Server::GetNetworkName"></a><p>
389 <table width="100%" cellpadding="2" cellspacing="0" border="0">
390   <tr>
391     <td class="md">
392       <table cellpadding="0" cellspacing="0" border="0">
393         <tr>
394           <td class="md" nowrap valign="top"> string Server::GetNetworkName </td>
395           <td class="md" valign="top">(&nbsp;</td>
396           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
397           <td class="md" valign="top">)&nbsp;</td>
398           <td class="md" nowrap><code> [virtual]</code></td>
399         </tr>
400
401       </table>
402     </td>
403   </tr>
404 </table>
405 <table cellspacing=5 cellpadding=0 border=0>
406   <tr>
407     <td>
408       &nbsp;
409     </td>
410     <td>
411
412 <p>
413 Returns the network name, global to all linked servers.
414 <p>
415
416 <p>
417 Definition at line <a class="el" href="modules_8cpp-source.html#l00153">153</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
418 <p>
419 <div class="fragment"><pre>00154 {
420 00155         <span class="keywordflow">return</span> getnetworkname();
421 00156 }
422 </pre></div>    </td>
423   </tr>
424 </table>
425 <a name="a16" doxytag="Server::GetServerName"></a><p>
426 <table width="100%" cellpadding="2" cellspacing="0" border="0">
427   <tr>
428     <td class="md">
429       <table cellpadding="0" cellspacing="0" border="0">
430         <tr>
431           <td class="md" nowrap valign="top"> string Server::GetServerName </td>
432           <td class="md" valign="top">(&nbsp;</td>
433           <td class="mdname1" valign="top" nowrap>&nbsp;          </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 the server name of the server where the module is loaded.
451 <p>
452
453 <p>
454 Definition at line <a class="el" href="modules_8cpp-source.html#l00148">148</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
455 <p>
456 <div class="fragment"><pre>00149 {
457 00150         <span class="keywordflow">return</span> getservername();
458 00151 }
459 </pre></div>    </td>
460   </tr>
461 </table>
462 <a name="a12" doxytag="Server::IsNick"></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"> bool Server::IsNick </td>
469           <td class="md" valign="top">(&nbsp;</td>
470           <td class="md" nowrap valign="top">string&nbsp;</td>
471           <td class="mdname1" valign="top" nowrap>&nbsp; <em>nick</em>          </td>
472           <td class="md" valign="top">)&nbsp;</td>
473           <td class="md" nowrap><code> [virtual]</code></td>
474         </tr>
475
476       </table>
477     </td>
478   </tr>
479 </table>
480 <table cellspacing=5 cellpadding=0 border=0>
481   <tr>
482     <td>
483       &nbsp;
484     </td>
485     <td>
486
487 <p>
488 Returns true if a nick is valid.
489 <p>
490 Nicks for unregistered connections will return false.
491 <p>
492 Definition at line <a class="el" href="modules_8cpp-source.html#l00127">127</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
493 <p>
494 <div class="fragment"><pre>00128 {
495 00129         <span class="keywordflow">return</span> (isnick(nick.c_str()) != 0);
496 00130 }
497 </pre></div>    </td>
498   </tr>
499 </table>
500 <a name="a4" doxytag="Server::Send"></a><p>
501 <table width="100%" cellpadding="2" cellspacing="0" border="0">
502   <tr>
503     <td class="md">
504       <table cellpadding="0" cellspacing="0" border="0">
505         <tr>
506           <td class="md" nowrap valign="top"> void Server::Send </td>
507           <td class="md" valign="top">(&nbsp;</td>
508           <td class="md" nowrap valign="top">int&nbsp;</td>
509           <td class="mdname" nowrap>&nbsp; <em>Socket</em>, </td>
510         </tr>
511         <tr>
512           <td></td>
513           <td></td>
514           <td class="md" nowrap>string&nbsp;</td>
515           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
516         </tr>
517         <tr>
518           <td></td>
519           <td class="md">)&nbsp;</td>
520           <td class="md" colspan="2"><code> [virtual]</code></td>
521         </tr>
522
523       </table>
524     </td>
525   </tr>
526 </table>
527 <table cellspacing=5 cellpadding=0 border=0>
528   <tr>
529     <td>
530       &nbsp;
531     </td>
532     <td>
533
534 <p>
535 Sends a line of text down a TCP/IP socket.
536 <p>
537 This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.
538 <p>
539 Definition at line <a class="el" href="modules_8cpp-source.html#l00073">73</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
540 <p>
541 <div class="fragment"><pre>00074 {
542 00075         Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
543 00076 }
544 </pre></div>    </td>
545   </tr>
546 </table>
547 <a name="a8" doxytag="Server::SendChannel"></a><p>
548 <table width="100%" cellpadding="2" cellspacing="0" border="0">
549   <tr>
550     <td class="md">
551       <table cellpadding="0" cellspacing="0" border="0">
552         <tr>
553           <td class="md" nowrap valign="top"> void Server::SendChannel </td>
554           <td class="md" valign="top">(&nbsp;</td>
555           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
556           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
557         </tr>
558         <tr>
559           <td></td>
560           <td></td>
561           <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> *&nbsp;</td>
562           <td class="mdname" nowrap>&nbsp; <em>Channel</em>, </td>
563         </tr>
564         <tr>
565           <td></td>
566           <td></td>
567           <td class="md" nowrap>string&nbsp;</td>
568           <td class="mdname" nowrap>&nbsp; <em>s</em>, </td>
569         </tr>
570         <tr>
571           <td></td>
572           <td></td>
573           <td class="md" nowrap>bool&nbsp;</td>
574           <td class="mdname" nowrap>&nbsp; <em>IncludeSender</em></td>
575         </tr>
576         <tr>
577           <td></td>
578           <td class="md">)&nbsp;</td>
579           <td class="md" colspan="2"><code> [virtual]</code></td>
580         </tr>
581
582       </table>
583     </td>
584   </tr>
585 </table>
586 <table cellspacing=5 cellpadding=0 border=0>
587   <tr>
588     <td>
589       &nbsp;
590     </td>
591     <td>
592
593 <p>
594 Sends text from a user to a channel (mulicast).
595 <p>
596 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).
597 <p>
598 Definition at line <a class="el" href="modules_8cpp-source.html#l00093">93</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
599 <p>
600 <div class="fragment"><pre>00094 {
601 00095         <span class="keywordflow">if</span> (IncludeSender)
602 00096         {
603 00097                 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
604 00098         }
605 00099         <span class="keywordflow">else</span>
606 00100         {
607 00101                 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
608 00102         }
609 00103 }
610 </pre></div>    </td>
611   </tr>
612 </table>
613 <a name="a10" doxytag="Server::SendCommon"></a><p>
614 <table width="100%" cellpadding="2" cellspacing="0" border="0">
615   <tr>
616     <td class="md">
617       <table cellpadding="0" cellspacing="0" border="0">
618         <tr>
619           <td class="md" nowrap valign="top"> void Server::SendCommon </td>
620           <td class="md" valign="top">(&nbsp;</td>
621           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
622           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
623         </tr>
624         <tr>
625           <td></td>
626           <td></td>
627           <td class="md" nowrap>string&nbsp;</td>
628           <td class="mdname" nowrap>&nbsp; <em>text</em>, </td>
629         </tr>
630         <tr>
631           <td></td>
632           <td></td>
633           <td class="md" nowrap>bool&nbsp;</td>
634           <td class="mdname" nowrap>&nbsp; <em>IncludeSender</em></td>
635         </tr>
636         <tr>
637           <td></td>
638           <td class="md">)&nbsp;</td>
639           <td class="md" colspan="2"><code> [virtual]</code></td>
640         </tr>
641
642       </table>
643     </td>
644   </tr>
645 </table>
646 <table cellspacing=5 cellpadding=0 border=0>
647   <tr>
648     <td>
649       &nbsp;
650     </td>
651     <td>
652
653 <p>
654 Sends text from a user to one or more channels (mulicast).
655 <p>
656 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.
657 <p>
658 Definition at line <a class="el" href="modules_8cpp-source.html#l00110">110</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
659 <p>
660 <div class="fragment"><pre>00111 {
661 00112         <span class="keywordflow">if</span> (IncludeSender)
662 00113         {
663 00114                 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str());
664 00115         }
665 00116         <span class="keywordflow">else</span>
666 00117         {
667 00118                 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str());
668 00119         }
669 00120 }
670 </pre></div>    </td>
671   </tr>
672 </table>
673 <a name="a6" doxytag="Server::SendFrom"></a><p>
674 <table width="100%" cellpadding="2" cellspacing="0" border="0">
675   <tr>
676     <td class="md">
677       <table cellpadding="0" cellspacing="0" border="0">
678         <tr>
679           <td class="md" nowrap valign="top"> void Server::SendFrom </td>
680           <td class="md" valign="top">(&nbsp;</td>
681           <td class="md" nowrap valign="top">int&nbsp;</td>
682           <td class="mdname" nowrap>&nbsp; <em>Socket</em>, </td>
683         </tr>
684         <tr>
685           <td></td>
686           <td></td>
687           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
688           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
689         </tr>
690         <tr>
691           <td></td>
692           <td></td>
693           <td class="md" nowrap>string&nbsp;</td>
694           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
695         </tr>
696         <tr>
697           <td></td>
698           <td class="md">)&nbsp;</td>
699           <td class="md" colspan="2"><code> [virtual]</code></td>
700         </tr>
701
702       </table>
703     </td>
704   </tr>
705 </table>
706 <table cellspacing=5 cellpadding=0 border=0>
707   <tr>
708     <td>
709       &nbsp;
710     </td>
711     <td>
712
713 <p>
714 Sends text from a user to a socket.
715 <p>
716 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)
717 <p>
718 Definition at line <a class="el" href="modules_8cpp-source.html#l00083">83</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
719 <p>
720 <div class="fragment"><pre>00084 {
721 00085         WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str());
722 00086 }
723 </pre></div>    </td>
724   </tr>
725 </table>
726 <a name="a2" doxytag="Server::SendOpers"></a><p>
727 <table width="100%" cellpadding="2" cellspacing="0" border="0">
728   <tr>
729     <td class="md">
730       <table cellpadding="0" cellspacing="0" border="0">
731         <tr>
732           <td class="md" nowrap valign="top"> void Server::SendOpers </td>
733           <td class="md" valign="top">(&nbsp;</td>
734           <td class="md" nowrap valign="top">string&nbsp;</td>
735           <td class="mdname1" valign="top" nowrap>&nbsp; <em>s</em>          </td>
736           <td class="md" valign="top">)&nbsp;</td>
737           <td class="md" nowrap><code> [virtual]</code></td>
738         </tr>
739
740       </table>
741     </td>
742   </tr>
743 </table>
744 <table cellspacing=5 cellpadding=0 border=0>
745   <tr>
746     <td>
747       &nbsp;
748     </td>
749     <td>
750
751 <p>
752 Sends text to all opers.
753 <p>
754 This method sends a server notice to all opers with the usermode +s.
755 <p>
756 Definition at line <a class="el" href="modules_8cpp-source.html#l00063">63</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
757 <p>
758 <div class="fragment"><pre>00064 {
759 00065         WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str());
760 00066 }
761 </pre></div>    </td>
762   </tr>
763 </table>
764 <a name="a5" doxytag="Server::SendServ"></a><p>
765 <table width="100%" cellpadding="2" cellspacing="0" border="0">
766   <tr>
767     <td class="md">
768       <table cellpadding="0" cellspacing="0" border="0">
769         <tr>
770           <td class="md" nowrap valign="top"> void Server::SendServ </td>
771           <td class="md" valign="top">(&nbsp;</td>
772           <td class="md" nowrap valign="top">int&nbsp;</td>
773           <td class="mdname" nowrap>&nbsp; <em>Socket</em>, </td>
774         </tr>
775         <tr>
776           <td></td>
777           <td></td>
778           <td class="md" nowrap>string&nbsp;</td>
779           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
780         </tr>
781         <tr>
782           <td></td>
783           <td class="md">)&nbsp;</td>
784           <td class="md" colspan="2"><code> [virtual]</code></td>
785         </tr>
786
787       </table>
788     </td>
789   </tr>
790 </table>
791 <table cellspacing=5 cellpadding=0 border=0>
792   <tr>
793     <td>
794       &nbsp;
795     </td>
796     <td>
797
798 <p>
799 Sends text from the server to a socket.
800 <p>
801 This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)
802 <p>
803 Definition at line <a class="el" href="modules_8cpp-source.html#l00078">78</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
804 <p>
805 <div class="fragment"><pre>00079 {
806 00080         WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
807 00081 }
808 </pre></div>    </td>
809   </tr>
810 </table>
811 <a name="a7" doxytag="Server::SendTo"></a><p>
812 <table width="100%" cellpadding="2" cellspacing="0" border="0">
813   <tr>
814     <td class="md">
815       <table cellpadding="0" cellspacing="0" border="0">
816         <tr>
817           <td class="md" nowrap valign="top"> void Server::SendTo </td>
818           <td class="md" valign="top">(&nbsp;</td>
819           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
820           <td class="mdname" nowrap>&nbsp; <em>Source</em>, </td>
821         </tr>
822         <tr>
823           <td></td>
824           <td></td>
825           <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
826           <td class="mdname" nowrap>&nbsp; <em>Dest</em>, </td>
827         </tr>
828         <tr>
829           <td></td>
830           <td></td>
831           <td class="md" nowrap>string&nbsp;</td>
832           <td class="mdname" nowrap>&nbsp; <em>s</em></td>
833         </tr>
834         <tr>
835           <td></td>
836           <td class="md">)&nbsp;</td>
837           <td class="md" colspan="2"><code> [virtual]</code></td>
838         </tr>
839
840       </table>
841     </td>
842   </tr>
843 </table>
844 <table cellspacing=5 cellpadding=0 border=0>
845   <tr>
846     <td>
847       &nbsp;
848     </td>
849     <td>
850
851 <p>
852 Sends text from a user to another user.
853 <p>
854 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)
855 <p>
856 Definition at line <a class="el" href="modules_8cpp-source.html#l00088">88</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
857 <p>
858 <div class="fragment"><pre>00089 {
859 00090         WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str());
860 00091 }
861 </pre></div>    </td>
862   </tr>
863 </table>
864 <a name="a11" doxytag="Server::SendWallops"></a><p>
865 <table width="100%" cellpadding="2" cellspacing="0" border="0">
866   <tr>
867     <td class="md">
868       <table cellpadding="0" cellspacing="0" border="0">
869         <tr>
870           <td class="md" nowrap valign="top"> void Server::SendWallops </td>
871           <td class="md" valign="top">(&nbsp;</td>
872           <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
873           <td class="mdname" nowrap>&nbsp; <em>User</em>, </td>
874         </tr>
875         <tr>
876           <td></td>
877           <td></td>
878           <td class="md" nowrap>string&nbsp;</td>
879           <td class="mdname" nowrap>&nbsp; <em>text</em></td>
880         </tr>
881         <tr>
882           <td></td>
883           <td class="md">)&nbsp;</td>
884           <td class="md" colspan="2"><code> [virtual]</code></td>
885         </tr>
886
887       </table>
888     </td>
889   </tr>
890 </table>
891 <table cellspacing=5 cellpadding=0 border=0>
892   <tr>
893     <td>
894       &nbsp;
895     </td>
896     <td>
897
898 <p>
899 Sends a WALLOPS message.
900 <p>
901 This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.
902 <p>
903 Definition at line <a class="el" href="modules_8cpp-source.html#l00122">122</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
904 <p>
905 <div class="fragment"><pre>00123 {
906 00124         WriteWallOps(User,<span class="stringliteral">"%s"</span>,text.c_str());
907 00125 }
908 </pre></div>    </td>
909   </tr>
910 </table>
911 <hr>The documentation for this class was generated from the following files:<ul>
912 <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>
913 <hr><address style="align: right;"><small>Generated on Sun Jan 26 23:45:49 2003 for InspIRCd by
914 <a href="http://www.doxygen.org/index.html">
915 <img src="doxygen.png" alt="doxygen" align="middle" border=0 
916 width=110 height=53></a>1.3-rc2 </small></address>
917 </body>
918 </html>