]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/servers_8cpp.html
Fixed 'fake direction' messages being put out by user->registered = 7 being set too...
[user/henk/code/inspircd.git] / docs / module-doc / servers_8cpp.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>InspIRCd: servers.cpp File Reference</title>
4 <link href="inspircd.doxygen.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.3.3 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
8 <h1>servers.cpp File Reference</h1><code>#include "inspircd_config.h"</code><br>
9 <code>#include "<a class="el" href="servers_8h-source.html">servers.h</a>"</code><br>
10 <code>#include "inspircd.h"</code><br>
11 <code>#include &lt;unistd.h&gt;</code><br>
12 <code>#include &lt;fcntl.h&gt;</code><br>
13 <code>#include &lt;poll.h&gt;</code><br>
14 <code>#include &lt;sys/errno.h&gt;</code><br>
15 <code>#include &lt;sys/ioctl.h&gt;</code><br>
16 <code>#include &lt;sys/utsname.h&gt;</code><br>
17 <code>#include &lt;vector&gt;</code><br>
18 <code>#include &lt;string&gt;</code><br>
19 <code>#include &lt;deque&gt;</code><br>
20 <code>#include &lt;sstream&gt;</code><br>
21 <code>#include &lt;map&gt;</code><br>
22 <code>#include "inspstring.h"</code><br>
23 <code>#include "helperfuncs.h"</code><br>
24 <code>#include "<a class="el" href="connection_8h-source.html">connection.h</a>"</code><br>
25
26 <p>
27 Include dependency graph for servers.cpp:<p><center><img src="servers_8cpp__incl.gif" border="0" usemap="#servers.cpp_map" alt="Include dependency graph"></center>
28 <map name="servers.cpp_map">
29 <area href="servers_8h.html" shape="rect" coords="341,210,418,237" alt="">
30 <area href="connection_8h.html" shape="rect" coords="178,312,277,338" alt="">
31 </map>
32
33 <p>
34 <a href="servers_8cpp-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
35 <tr><td></td></tr>
36 <tr><td colspan=2><br><h2>Functions</h2></td></tr>
37 <tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="servers_8cpp.html#a5">IsRoutable</a> (std::string servername)</td></tr>
38
39 <tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="servers_8cpp.html#a6">already_have_sum</a> (std::string sum)</td></tr>
40
41 <tr><td colspan=2><br><h2>Variables</h2></td></tr>
42 <tr><td class="memItemLeft" nowrap align=right valign=top>time_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="servers_8cpp.html#a0">TIME</a></td></tr>
43
44 <tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="servers_8cpp.html#a1">MaxConn</a></td></tr>
45
46 <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classserverrec.html">serverrec</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="servers_8cpp.html#a2">me</a> [32]</td></tr>
47
48 <tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="servers_8cpp.html#a3">has_been_netsplit</a></td></tr>
49
50 <tr><td class="memItemLeft" nowrap align=right valign=top>std::deque&lt; std::string &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="servers_8cpp.html#a4">xsums</a></td></tr>
51
52 </table>
53 <hr><h2>Function Documentation</h2>
54 <a name="a6" doxytag="servers.cpp::already_have_sum"></a><p>
55 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
56   <tr>
57     <td class="mdRow">
58       <table cellpadding="0" cellspacing="0" border="0">
59         <tr>
60           <td class="md" nowrap valign="top"> bool already_have_sum </td>
61           <td class="md" valign="top">(&nbsp;</td>
62           <td class="md" nowrap valign="top">std::string&nbsp;</td>
63           <td class="mdname1" valign="top" nowrap> <em>sum</em>          </td>
64           <td class="md" valign="top">&nbsp;)&nbsp;</td>
65           <td class="md" nowrap></td>
66         </tr>
67
68       </table>
69     </td>
70   </tr>
71 </table>
72 <table cellspacing=5 cellpadding=0 border=0>
73   <tr>
74     <td>
75       &nbsp;
76     </td>
77     <td>
78
79 <p>
80
81 <p>
82 Definition at line <a class="el" href="servers_8cpp-source.html#l00425">425</a> of file <a class="el" href="servers_8cpp-source.html">servers.cpp</a>.
83 <p>
84 References <a class="el" href="servers_8cpp-source.html#l00044">xsums</a>.
85 <p>
86 Referenced by <a class="el" href="servers_8cpp-source.html#l00445">serverrec::RecvPacket()</a>.
87 <p>
88 <div class="fragment"><pre>00426 {
89 00427         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="servers_8cpp.html#a4">xsums</a>.size(); i++)
90 00428         {
91 00429                 <span class="keywordflow">if</span> (<a class="code" href="servers_8cpp.html#a4">xsums</a>[i] == sum)
92 00430                 {
93 00431                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
94 00432                 }
95 00433         }
96 00434         <span class="keywordflow">if</span> (<a class="code" href="servers_8cpp.html#a4">xsums</a>.size() &gt;= 128)
97 00435         {
98 00436                 <a class="code" href="servers_8cpp.html#a4">xsums</a>.pop_front();
99 00437         }
100 00438         <a class="code" href="servers_8cpp.html#a4">xsums</a>.push_back(sum);
101 00439         <span class="keywordflow">return</span> <span class="keyword">false</span>;
102 00440 }
103 </pre></div>    </td>
104   </tr>
105 </table>
106 <a name="a5" doxytag="servers.cpp::IsRoutable"></a><p>
107 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
108   <tr>
109     <td class="mdRow">
110       <table cellpadding="0" cellspacing="0" border="0">
111         <tr>
112           <td class="md" nowrap valign="top"> bool IsRoutable </td>
113           <td class="md" valign="top">(&nbsp;</td>
114           <td class="md" nowrap valign="top">std::string&nbsp;</td>
115           <td class="mdname1" valign="top" nowrap> <em>servername</em>          </td>
116           <td class="md" valign="top">&nbsp;)&nbsp;</td>
117           <td class="md" nowrap></td>
118         </tr>
119
120       </table>
121     </td>
122   </tr>
123 </table>
124 <table cellspacing=5 cellpadding=0 border=0>
125   <tr>
126     <td>
127       &nbsp;
128     </td>
129     <td>
130
131 <p>
132
133 <p>
134 Definition at line <a class="el" href="servers_8cpp-source.html#l00256">256</a> of file <a class="el" href="servers_8cpp-source.html">servers.cpp</a>.
135 <p>
136 References <a class="el" href="servers_8h-source.html#l00081">serverrec::connectors</a>, <a class="el" href="channels_8cpp-source.html#l00097">me</a>, and <a class="el" href="connection_8h-source.html#l00035">STATE_DISCONNECTED</a>.
137 <p>
138 Referenced by <a class="el" href="servers_8cpp-source.html#l00274">serverrec::FlushWriteBuffers()</a>, and <a class="el" href="servers_8cpp-source.html#l00445">serverrec::RecvPacket()</a>.
139 <p>
140 <div class="fragment"><pre>00257 {
141 00258         <span class="keywordtype">int</span> c = 0;
142 00259         <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x = 0; x &lt; 32; x++)
143 00260         <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#a34">me</a>[x])
144 00261         {
145 00262                 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="channels_8cpp.html#a34">me</a>[x]-&gt;<a class="code" href="classserverrec.html#o11">connectors</a>.size(); i++)
146 00263                 {
147 00264                         <span class="keywordflow">if</span> ((<a class="code" href="channels_8cpp.html#a34">me</a>[x]-&gt;<a class="code" href="classserverrec.html#o11">connectors</a>[i].GetServerName() == servername) &amp;&amp; (<a class="code" href="channels_8cpp.html#a34">me</a>[x]-&gt;<a class="code" href="classserverrec.html#o11">connectors</a>[i].GetState() != <a class="code" href="connection_8h.html#a0">STATE_DISCONNECTED</a>))
148 00265                         {
149 00266                                 c++;
150 00267                         }
151 00268                 }
152 00269         }
153 00270         <span class="keywordflow">return</span> (c != 0);
154 00271 }
155 </pre></div>    </td>
156   </tr>
157 </table>
158 <hr><h2>Variable Documentation</h2>
159 <a name="a3" doxytag="servers.cpp::has_been_netsplit"></a><p>
160 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
161   <tr>
162     <td class="mdRow">
163       <table cellpadding="0" cellspacing="0" border="0">
164         <tr>
165           <td class="md" nowrap valign="top"> bool <a class="el" href="servers_8cpp.html#a3">has_been_netsplit</a>
166       </table>
167     </td>
168   </tr>
169 </table>
170 <table cellspacing=5 cellpadding=0 border=0>
171   <tr>
172     <td>
173       &nbsp;
174     </td>
175     <td>
176
177 <p>
178
179 <p>
180 Definition at line <a class="el" href="servers_8cpp-source.html#l00042">42</a> of file <a class="el" href="servers_8cpp-source.html">servers.cpp</a>.
181 <p>
182 Referenced by <a class="el" href="servers_8cpp-source.html#l00274">serverrec::FlushWriteBuffers()</a>, and <a class="el" href="servers_8cpp-source.html#l00445">serverrec::RecvPacket()</a>.    </td>
183   </tr>
184 </table>
185 <a name="a1" doxytag="servers.cpp::MaxConn"></a><p>
186 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
187   <tr>
188     <td class="mdRow">
189       <table cellpadding="0" cellspacing="0" border="0">
190         <tr>
191           <td class="md" nowrap valign="top"> int <a class="el" href="servers_8cpp.html#a1">MaxConn</a>
192       </table>
193     </td>
194   </tr>
195 </table>
196 <table cellspacing=5 cellpadding=0 border=0>
197   <tr>
198     <td>
199       &nbsp;
200     </td>
201     <td>
202
203 <p>
204
205 <p>
206 Definition at line <a class="el" href="servers_8cpp-source.html#l00038">38</a> of file <a class="el" href="servers_8cpp-source.html">servers.cpp</a>.
207 <p>
208 Referenced by <a class="el" href="servers_8cpp-source.html#l00081">serverrec::CreateListener()</a>.    </td>
209   </tr>
210 </table>
211 <a name="a2" doxytag="servers.cpp::me"></a><p>
212 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
213   <tr>
214     <td class="mdRow">
215       <table cellpadding="0" cellspacing="0" border="0">
216         <tr>
217           <td class="md" nowrap valign="top"> <a class="el" href="classserverrec.html">serverrec</a>* <a class="el" href="servers_8cpp.html#a2">me</a>[32]
218       </table>
219     </td>
220   </tr>
221 </table>
222 <table cellspacing=5 cellpadding=0 border=0>
223   <tr>
224     <td>
225       &nbsp;
226     </td>
227     <td>
228
229 <p>
230
231 <p>
232 Definition at line <a class="el" href="servers_8cpp-source.html#l00040">40</a> of file <a class="el" href="servers_8cpp-source.html">servers.cpp</a>.    </td>
233   </tr>
234 </table>
235 <a name="a0" doxytag="servers.cpp::TIME"></a><p>
236 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
237   <tr>
238     <td class="mdRow">
239       <table cellpadding="0" cellspacing="0" border="0">
240         <tr>
241           <td class="md" nowrap valign="top"> time_t <a class="el" href="users_8cpp.html#a2">TIME</a>
242       </table>
243     </td>
244   </tr>
245 </table>
246 <table cellspacing=5 cellpadding=0 border=0>
247   <tr>
248     <td>
249       &nbsp;
250     </td>
251     <td>
252
253 <p>
254
255 <p>
256 Definition at line <a class="el" href="servers_8cpp-source.html#l00037">37</a> of file <a class="el" href="servers_8cpp-source.html">servers.cpp</a>.    </td>
257   </tr>
258 </table>
259 <a name="a4" doxytag="servers.cpp::xsums"></a><p>
260 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
261   <tr>
262     <td class="mdRow">
263       <table cellpadding="0" cellspacing="0" border="0">
264         <tr>
265           <td class="md" nowrap valign="top"> std::deque&lt;std::string&gt; <a class="el" href="servers_8cpp.html#a4">xsums</a>
266       </table>
267     </td>
268   </tr>
269 </table>
270 <table cellspacing=5 cellpadding=0 border=0>
271   <tr>
272     <td>
273       &nbsp;
274     </td>
275     <td>
276
277 <p>
278
279 <p>
280 Definition at line <a class="el" href="servers_8cpp-source.html#l00044">44</a> of file <a class="el" href="servers_8cpp-source.html">servers.cpp</a>.
281 <p>
282 Referenced by <a class="el" href="servers_8cpp-source.html#l00425">already_have_sum()</a>.    </td>
283   </tr>
284 </table>
285 <hr size="1"><address style="align: right;"><small>Generated on Mon May 30 05:16:12 2005 for InspIRCd by
286 <a href="http://www.doxygen.org/index.html">
287 <img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
288 </a>1.3.3 </small></address>
289 </body>
290 </html>