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">
6 <!-- Generated by Doxygen 1.3-rc3 -->
8 <a class="qindex" href="main.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </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>
12 <code>#include <<a class="el" href="modules_8h-source.html">modules.h</a>></code>
14 Inheritance diagram for Server:<p><center><img src="classServer__inherit__graph.gif" border="0" usemap="#Server__inherit__map" alt="Inheritance graph"></center>
15 <map name="Server__inherit__map">
16 <area href="classclassbase.html" shape="rect" coords="7,16,73,37" alt="">
18 <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>
19 <map name="Server__coll__map">
20 <area href="classclassbase.html" shape="rect" coords="7,106,73,128" alt="">
22 <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>
24 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
25 <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classServer.html#a0">Server</a> ()</td></tr>
26 <tr><td> </td><td><font size=-1><em>Default constructor.</em> <a href="#a0"></a><em></em></font><br><br></td></tr>
27 <tr><td nowrap align=right valign=top>virtual </td><td valign=bottom><a class="el" href="classServer.html#a1">~Server</a> ()</td></tr>
28 <tr><td> </td><td><font size=-1><em>Default destructor.</em> <a href="#a1"></a><em></em></font><br><br></td></tr>
29 <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classServer.html#a2">SendOpers</a> (string s)</td></tr>
30 <tr><td> </td><td><font size=-1><em>Sends text to all opers.</em> <a href="#a2"></a><em></em></font><br><br></td></tr>
31 <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classServer.html#a3">Log</a> (int level, string s)</td></tr>
32 <tr><td> </td><td><font size=-1><em>Writes a log string.</em> <a href="#a3"></a><em></em></font><br><br></td></tr>
33 <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classServer.html#a4">Send</a> (int Socket, string s)</td></tr>
34 <tr><td> </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>
35 <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classServer.html#a5">SendServ</a> (int Socket, string s)</td></tr>
36 <tr><td> </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>
37 <tr><td nowrap align=right valign=top>virtual void </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>
38 <tr><td> </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>
39 <tr><td nowrap align=right valign=top>virtual void </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>
40 <tr><td> </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>
41 <tr><td nowrap align=right valign=top>virtual void </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>
42 <tr><td> </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>
43 <tr><td nowrap align=right valign=top>virtual bool </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>
44 <tr><td> </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>
45 <tr><td nowrap align=right valign=top>virtual void </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>
46 <tr><td> </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>
47 <tr><td nowrap align=right valign=top>virtual void </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>
48 <tr><td> </td><td><font size=-1><em>Sends a WALLOPS message.</em> <a href="#a11"></a><em></em></font><br><br></td></tr>
49 <tr><td nowrap align=right valign=top>virtual bool </td><td valign=bottom><a class="el" href="classServer.html#a12">IsNick</a> (string nick)</td></tr>
50 <tr><td> </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>
51 <tr><td nowrap align=right valign=top>virtual <a class="el" href="classuserrec.html">userrec</a> * </td><td valign=bottom><a class="el" href="classServer.html#a13">FindNick</a> (string nick)</td></tr>
52 <tr><td> </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>
53 <tr><td nowrap align=right valign=top>virtual <a class="el" href="classchanrec.html">chanrec</a> * </td><td valign=bottom><a class="el" href="classServer.html#a14">FindChannel</a> (string channel)</td></tr>
54 <tr><td> </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>
55 <tr><td nowrap align=right valign=top>virtual string </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>
56 <tr><td> </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>
57 <tr><td nowrap align=right valign=top>virtual string </td><td valign=bottom><a class="el" href="classServer.html#a16">GetServerName</a> ()</td></tr>
58 <tr><td> </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>
59 <tr><td nowrap align=right valign=top>virtual string </td><td valign=bottom><a class="el" href="classServer.html#a17">GetNetworkName</a> ()</td></tr>
60 <tr><td> </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>
61 <tr><td nowrap align=right valign=top>virtual <a class="el" href="classAdmin.html">Admin</a> </td><td valign=bottom><a class="el" href="classServer.html#a18">GetAdmin</a> ()</td></tr>
62 <tr><td> </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>
64 <hr><a name="_details"></a><h2>Detailed Description</h2>
65 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.
67 All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks.
71 Definition at line <a class="el" href="modules_8h-source.html#l00114">114</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor & Destructor Documentation</h2>
72 <a name="a0" doxytag="Server::Server"></a><p>
73 <table width="100%" cellpadding="2" cellspacing="0" border="0">
76 <table cellpadding="0" cellspacing="0" border="0">
78 <td class="md" nowrap valign="top"> Server::Server </td>
79 <td class="md" valign="top">( </td>
80 <td class="mdname1" valign="top" nowrap> </td>
81 <td class="md" valign="top">) </td>
82 <td class="md" nowrap></td>
89 <table cellspacing=5 cellpadding=0 border=0>
99 Creates a Server object.
101 Definition at line <a class="el" href="modules_8cpp-source.html#l00043">43</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
103 <div class="fragment"><pre>00044 {
108 <a name="a1" doxytag="Server::~Server"></a><p>
109 <table width="100%" cellpadding="2" cellspacing="0" border="0">
112 <table cellpadding="0" cellspacing="0" border="0">
114 <td class="md" nowrap valign="top"> Server::~Server </td>
115 <td class="md" valign="top">( </td>
116 <td class="mdname1" valign="top" nowrap> </td>
117 <td class="md" valign="top">) </td>
118 <td class="md" nowrap><code> [virtual]</code></td>
125 <table cellspacing=5 cellpadding=0 border=0>
135 Destroys a Server object.
137 Definition at line <a class="el" href="modules_8cpp-source.html#l00047">47</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
139 <div class="fragment"><pre>00048 {
144 <hr><h2>Member Function Documentation</h2>
145 <a name="a15" doxytag="Server::ChanMode"></a><p>
146 <table width="100%" cellpadding="2" cellspacing="0" border="0">
149 <table cellpadding="0" cellspacing="0" border="0">
151 <td class="md" nowrap valign="top"> string Server::ChanMode </td>
152 <td class="md" valign="top">( </td>
153 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
154 <td class="mdname" nowrap> <em>User</em>, </td>
159 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
160 <td class="mdname" nowrap> <em>Chan</em></td>
164 <td class="md">) </td>
165 <td class="md" colspan="2"><code> [virtual]</code></td>
172 <table cellspacing=5 cellpadding=0 border=0>
180 Attempts to look up a user's privilages on a channel.
182 This function will return a string containing either @, , +, or an empty string, representing the user's privilages upon the channel you specify.
184 Definition at line <a class="el" href="modules_8cpp-source.html#l00130">130</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
186 <div class="fragment"><pre>00131 {
187 00132 string mode = cmode(User,Chan);
188 00133 <span class="keywordflow">return</span> mode;
193 <a name="a9" doxytag="Server::CommonChannels"></a><p>
194 <table width="100%" cellpadding="2" cellspacing="0" border="0">
197 <table cellpadding="0" cellspacing="0" border="0">
199 <td class="md" nowrap valign="top"> bool Server::CommonChannels </td>
200 <td class="md" valign="top">( </td>
201 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
202 <td class="mdname" nowrap> <em>u1</em>, </td>
207 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
208 <td class="mdname" nowrap> <em>u2</em></td>
212 <td class="md">) </td>
213 <td class="md" colspan="2"><code> [virtual]</code></td>
220 <table cellspacing=5 cellpadding=0 border=0>
228 Returns true if two users share a common channel.
230 This method is used internally by the NICK and QUIT commands, and the <a class="el" href="classServer.html#a10">Server::SendCommon</a> method.
232 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>.
234 <div class="fragment"><pre>00094 {
235 00095 <span class="keywordflow">return</span> (common_channels(u1,u2) != 0);
240 <a name="a14" doxytag="Server::FindChannel"></a><p>
241 <table width="100%" cellpadding="2" cellspacing="0" border="0">
244 <table cellpadding="0" cellspacing="0" border="0">
246 <td class="md" nowrap valign="top"> <a class="el" href="classchanrec.html">chanrec</a> * Server::FindChannel </td>
247 <td class="md" valign="top">( </td>
248 <td class="md" nowrap valign="top">string </td>
249 <td class="mdname1" valign="top" nowrap> <em>channel</em> </td>
250 <td class="md" valign="top">) </td>
251 <td class="md" nowrap><code> [virtual]</code></td>
258 <table cellspacing=5 cellpadding=0 border=0>
266 Attempts to look up a channel and return a pointer to it.
268 This function will return NULL if the channel does not exist.
270 Definition at line <a class="el" href="modules_8cpp-source.html#l00125">125</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
272 <div class="fragment"><pre>00126 {
273 00127 <span class="keywordflow">return</span> FindChan(channel.c_str());
278 <a name="a13" doxytag="Server::FindNick"></a><p>
279 <table width="100%" cellpadding="2" cellspacing="0" border="0">
282 <table cellpadding="0" cellspacing="0" border="0">
284 <td class="md" nowrap valign="top"> <a class="el" href="classuserrec.html">userrec</a> * Server::FindNick </td>
285 <td class="md" valign="top">( </td>
286 <td class="md" nowrap valign="top">string </td>
287 <td class="mdname1" valign="top" nowrap> <em>nick</em> </td>
288 <td class="md" valign="top">) </td>
289 <td class="md" nowrap><code> [virtual]</code></td>
296 <table cellspacing=5 cellpadding=0 border=0>
304 Attempts to look up a nick and return a pointer to it.
306 This function will return NULL if the nick does not exist.
308 Definition at line <a class="el" href="modules_8cpp-source.html#l00120">120</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
310 <div class="fragment"><pre>00121 {
311 00122 <span class="keywordflow">return</span> Find(nick);
316 <a name="a18" doxytag="Server::GetAdmin"></a><p>
317 <table width="100%" cellpadding="2" cellspacing="0" border="0">
320 <table cellpadding="0" cellspacing="0" border="0">
322 <td class="md" nowrap valign="top"> <a class="el" href="classAdmin.html">Admin</a> Server::GetAdmin </td>
323 <td class="md" valign="top">( </td>
324 <td class="mdname1" valign="top" nowrap> </td>
325 <td class="md" valign="top">) </td>
326 <td class="md" nowrap><code> [virtual]</code></td>
333 <table cellspacing=5 cellpadding=0 border=0>
341 Returns the information of the server as returned by the /ADMIN command.
343 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.
345 Definition at line <a class="el" href="modules_8cpp-source.html#l00146">146</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
347 <div class="fragment"><pre>00147 {
348 00148 <span class="keywordflow">return</span> <a class="code" href="classAdmin.html">Admin</a>(getadminname(),getadminemail(),getadminnick());
353 <a name="a17" doxytag="Server::GetNetworkName"></a><p>
354 <table width="100%" cellpadding="2" cellspacing="0" border="0">
357 <table cellpadding="0" cellspacing="0" border="0">
359 <td class="md" nowrap valign="top"> string Server::GetNetworkName </td>
360 <td class="md" valign="top">( </td>
361 <td class="mdname1" valign="top" nowrap> </td>
362 <td class="md" valign="top">) </td>
363 <td class="md" nowrap><code> [virtual]</code></td>
370 <table cellspacing=5 cellpadding=0 border=0>
378 Returns the network name, global to all linked servers.
382 Definition at line <a class="el" href="modules_8cpp-source.html#l00141">141</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
384 <div class="fragment"><pre>00142 {
385 00143 <span class="keywordflow">return</span> getnetworkname();
390 <a name="a16" doxytag="Server::GetServerName"></a><p>
391 <table width="100%" cellpadding="2" cellspacing="0" border="0">
394 <table cellpadding="0" cellspacing="0" border="0">
396 <td class="md" nowrap valign="top"> string Server::GetServerName </td>
397 <td class="md" valign="top">( </td>
398 <td class="mdname1" valign="top" nowrap> </td>
399 <td class="md" valign="top">) </td>
400 <td class="md" nowrap><code> [virtual]</code></td>
407 <table cellspacing=5 cellpadding=0 border=0>
415 Returns the server name of the server where the module is loaded.
419 Definition at line <a class="el" href="modules_8cpp-source.html#l00136">136</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
421 <div class="fragment"><pre>00137 {
422 00138 <span class="keywordflow">return</span> getservername();
427 <a name="a12" doxytag="Server::IsNick"></a><p>
428 <table width="100%" cellpadding="2" cellspacing="0" border="0">
431 <table cellpadding="0" cellspacing="0" border="0">
433 <td class="md" nowrap valign="top"> bool Server::IsNick </td>
434 <td class="md" valign="top">( </td>
435 <td class="md" nowrap valign="top">string </td>
436 <td class="mdname1" valign="top" nowrap> <em>nick</em> </td>
437 <td class="md" valign="top">) </td>
438 <td class="md" nowrap><code> [virtual]</code></td>
445 <table cellspacing=5 cellpadding=0 border=0>
453 Returns true if a nick is valid.
455 Nicks for unregistered connections will return false.
457 Definition at line <a class="el" href="modules_8cpp-source.html#l00115">115</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
459 <div class="fragment"><pre>00116 {
460 00117 <span class="keywordflow">return</span> (isnick(nick.c_str()) != 0);
465 <a name="a3" doxytag="Server::Log"></a><p>
466 <table width="100%" cellpadding="2" cellspacing="0" border="0">
469 <table cellpadding="0" cellspacing="0" border="0">
471 <td class="md" nowrap valign="top"> void Server::Log </td>
472 <td class="md" valign="top">( </td>
473 <td class="md" nowrap valign="top">int </td>
474 <td class="mdname" nowrap> <em>level</em>, </td>
479 <td class="md" nowrap>string </td>
480 <td class="mdname" nowrap> <em>s</em></td>
484 <td class="md">) </td>
485 <td class="md" colspan="2"><code> [virtual]</code></td>
492 <table cellspacing=5 cellpadding=0 border=0>
502 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.
504 Definition at line <a class="el" href="modules_8cpp-source.html#l00056">56</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
506 <div class="fragment"><pre>00057 {
507 00058 log(level,<span class="stringliteral">"%s"</span>,s.c_str());
512 <a name="a4" doxytag="Server::Send"></a><p>
513 <table width="100%" cellpadding="2" cellspacing="0" border="0">
516 <table cellpadding="0" cellspacing="0" border="0">
518 <td class="md" nowrap valign="top"> void Server::Send </td>
519 <td class="md" valign="top">( </td>
520 <td class="md" nowrap valign="top">int </td>
521 <td class="mdname" nowrap> <em>Socket</em>, </td>
526 <td class="md" nowrap>string </td>
527 <td class="mdname" nowrap> <em>s</em></td>
531 <td class="md">) </td>
532 <td class="md" colspan="2"><code> [virtual]</code></td>
539 <table cellspacing=5 cellpadding=0 border=0>
547 Sends a line of text down a TCP/IP socket.
549 This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.
551 Definition at line <a class="el" href="modules_8cpp-source.html#l00061">61</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
553 <div class="fragment"><pre>00062 {
554 00063 Write(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
559 <a name="a8" doxytag="Server::SendChannel"></a><p>
560 <table width="100%" cellpadding="2" cellspacing="0" border="0">
563 <table cellpadding="0" cellspacing="0" border="0">
565 <td class="md" nowrap valign="top"> void Server::SendChannel </td>
566 <td class="md" valign="top">( </td>
567 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
568 <td class="mdname" nowrap> <em>User</em>, </td>
573 <td class="md" nowrap><a class="el" href="classchanrec.html">chanrec</a> * </td>
574 <td class="mdname" nowrap> <em>Channel</em>, </td>
579 <td class="md" nowrap>string </td>
580 <td class="mdname" nowrap> <em>s</em>, </td>
585 <td class="md" nowrap>bool </td>
586 <td class="mdname" nowrap> <em>IncludeSender</em></td>
590 <td class="md">) </td>
591 <td class="md" colspan="2"><code> [virtual]</code></td>
598 <table cellspacing=5 cellpadding=0 border=0>
606 Sends text from a user to a channel (mulicast).
608 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).
610 Definition at line <a class="el" href="modules_8cpp-source.html#l00081">81</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
612 <div class="fragment"><pre>00082 {
613 00083 <span class="keywordflow">if</span> (IncludeSender)
615 00085 WriteChannel(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
617 00087 <span class="keywordflow">else</span>
619 00089 ChanExceptSender(Channel,User,<span class="stringliteral">"%s"</span>,s.c_str());
625 <a name="a10" doxytag="Server::SendCommon"></a><p>
626 <table width="100%" cellpadding="2" cellspacing="0" border="0">
629 <table cellpadding="0" cellspacing="0" border="0">
631 <td class="md" nowrap valign="top"> void Server::SendCommon </td>
632 <td class="md" valign="top">( </td>
633 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
634 <td class="mdname" nowrap> <em>User</em>, </td>
639 <td class="md" nowrap>string </td>
640 <td class="mdname" nowrap> <em>text</em>, </td>
645 <td class="md" nowrap>bool </td>
646 <td class="mdname" nowrap> <em>IncludeSender</em></td>
650 <td class="md">) </td>
651 <td class="md" colspan="2"><code> [virtual]</code></td>
658 <table cellspacing=5 cellpadding=0 border=0>
666 Sends text from a user to one or more channels (mulicast).
668 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.
670 Definition at line <a class="el" href="modules_8cpp-source.html#l00098">98</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
672 <div class="fragment"><pre>00099 {
673 00100 <span class="keywordflow">if</span> (IncludeSender)
675 00102 WriteCommon(User,<span class="stringliteral">"%s"</span>,text.c_str());
677 00104 <span class="keywordflow">else</span>
679 00106 WriteCommonExcept(User,<span class="stringliteral">"%s"</span>,text.c_str());
685 <a name="a6" doxytag="Server::SendFrom"></a><p>
686 <table width="100%" cellpadding="2" cellspacing="0" border="0">
689 <table cellpadding="0" cellspacing="0" border="0">
691 <td class="md" nowrap valign="top"> void Server::SendFrom </td>
692 <td class="md" valign="top">( </td>
693 <td class="md" nowrap valign="top">int </td>
694 <td class="mdname" nowrap> <em>Socket</em>, </td>
699 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
700 <td class="mdname" nowrap> <em>User</em>, </td>
705 <td class="md" nowrap>string </td>
706 <td class="mdname" nowrap> <em>s</em></td>
710 <td class="md">) </td>
711 <td class="md" colspan="2"><code> [virtual]</code></td>
718 <table cellspacing=5 cellpadding=0 border=0>
726 Sends text from a user to a socket.
728 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)
730 Definition at line <a class="el" href="modules_8cpp-source.html#l00071">71</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
732 <div class="fragment"><pre>00072 {
733 00073 WriteFrom(Socket,User,<span class="stringliteral">"%s"</span>,s.c_str());
738 <a name="a2" doxytag="Server::SendOpers"></a><p>
739 <table width="100%" cellpadding="2" cellspacing="0" border="0">
742 <table cellpadding="0" cellspacing="0" border="0">
744 <td class="md" nowrap valign="top"> void Server::SendOpers </td>
745 <td class="md" valign="top">( </td>
746 <td class="md" nowrap valign="top">string </td>
747 <td class="mdname1" valign="top" nowrap> <em>s</em> </td>
748 <td class="md" valign="top">) </td>
749 <td class="md" nowrap><code> [virtual]</code></td>
756 <table cellspacing=5 cellpadding=0 border=0>
764 Sends text to all opers.
766 This method sends a server notice to all opers with the usermode +s.
768 Definition at line <a class="el" href="modules_8cpp-source.html#l00051">51</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
770 <div class="fragment"><pre>00052 {
771 00053 WriteOpers(<span class="stringliteral">"%s"</span>,s.c_str());
776 <a name="a5" doxytag="Server::SendServ"></a><p>
777 <table width="100%" cellpadding="2" cellspacing="0" border="0">
780 <table cellpadding="0" cellspacing="0" border="0">
782 <td class="md" nowrap valign="top"> void Server::SendServ </td>
783 <td class="md" valign="top">( </td>
784 <td class="md" nowrap valign="top">int </td>
785 <td class="mdname" nowrap> <em>Socket</em>, </td>
790 <td class="md" nowrap>string </td>
791 <td class="mdname" nowrap> <em>s</em></td>
795 <td class="md">) </td>
796 <td class="md" colspan="2"><code> [virtual]</code></td>
803 <table cellspacing=5 cellpadding=0 border=0>
811 Sends text from the server to a socket.
813 This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)
815 Definition at line <a class="el" href="modules_8cpp-source.html#l00066">66</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
817 <div class="fragment"><pre>00067 {
818 00068 WriteServ(Socket,<span class="stringliteral">"%s"</span>,s.c_str());
823 <a name="a7" doxytag="Server::SendTo"></a><p>
824 <table width="100%" cellpadding="2" cellspacing="0" border="0">
827 <table cellpadding="0" cellspacing="0" border="0">
829 <td class="md" nowrap valign="top"> void Server::SendTo </td>
830 <td class="md" valign="top">( </td>
831 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
832 <td class="mdname" nowrap> <em>Source</em>, </td>
837 <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
838 <td class="mdname" nowrap> <em>Dest</em>, </td>
843 <td class="md" nowrap>string </td>
844 <td class="mdname" nowrap> <em>s</em></td>
848 <td class="md">) </td>
849 <td class="md" colspan="2"><code> [virtual]</code></td>
856 <table cellspacing=5 cellpadding=0 border=0>
864 Sends text from a user to another user.
866 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)
868 Definition at line <a class="el" href="modules_8cpp-source.html#l00076">76</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
870 <div class="fragment"><pre>00077 {
871 00078 WriteTo(Source,Dest,<span class="stringliteral">"%s"</span>,s.c_str());
876 <a name="a11" doxytag="Server::SendWallops"></a><p>
877 <table width="100%" cellpadding="2" cellspacing="0" border="0">
880 <table cellpadding="0" cellspacing="0" border="0">
882 <td class="md" nowrap valign="top"> void Server::SendWallops </td>
883 <td class="md" valign="top">( </td>
884 <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> * </td>
885 <td class="mdname" nowrap> <em>User</em>, </td>
890 <td class="md" nowrap>string </td>
891 <td class="mdname" nowrap> <em>text</em></td>
895 <td class="md">) </td>
896 <td class="md" colspan="2"><code> [virtual]</code></td>
903 <table cellspacing=5 cellpadding=0 border=0>
911 Sends a WALLOPS message.
913 This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.
915 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>.
917 <div class="fragment"><pre>00111 {
918 00112 WriteWallOps(User,<span class="stringliteral">"%s"</span>,text.c_str());
923 <hr>The documentation for this class was generated from the following files:<ul>
924 <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>
925 <hr><address style="align: right;"><small>Generated on Sun Mar 30 13:29:18 2003 for InspIRCd by
926 <a href="http://www.doxygen.org/index.html">
927 <img src="doxygen.png" alt="doxygen" align="middle" border=0
928 width=110 height=53></a>1.3-rc3 </small></address>