summaryrefslogtreecommitdiff
path: root/docs/module-doc/users_8h.html
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-19 18:04:22 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-19 18:04:22 +0000
commit71bedf497cde8b0b38afbb366828b3df9c2803d6 (patch)
treec6aad5fdbfeca5143f0eeea296be0aa03e0ec1fc /docs/module-doc/users_8h.html
parent9a6d5c5152dac57c967e6a936b36f640258fa43d (diff)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2578 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'docs/module-doc/users_8h.html')
-rw-r--r--docs/module-doc/users_8h.html976
1 files changed, 954 insertions, 22 deletions
diff --git a/docs/module-doc/users_8h.html b/docs/module-doc/users_8h.html
index 62402d7cb..4dac0e456 100644
--- a/docs/module-doc/users_8h.html
+++ b/docs/module-doc/users_8h.html
@@ -12,29 +12,31 @@
<code>#include &quot;inspstring.h&quot;</code><br>
<code>#include &quot;<a class="el" href="connection_8h-source.html">connection.h</a>&quot;</code><br>
<code>#include &lt;string&gt;</code><br>
+<code>#include &quot;<a class="el" href="hashcomp_8h-source.html">hashcomp.h</a>&quot;</code><br>
<p>
Include dependency graph for users.h:<p><center><img src="users_8h__incl.gif" border="0" usemap="#users.h_map" alt=""></center>
<map name="users.h_map">
<area href="channels_8h-source.html" shape="rect" coords="128,108,213,135" alt="">
-<area href="connection_8h-source.html" shape="rect" coords="121,58,220,84" alt="">
+<area href="connection_8h-source.html" shape="rect" coords="121,159,220,185" alt="">
+<area href="hashcomp_8h-source.html" shape="rect" coords="124,57,217,84" alt="">
</map>
<p>
This graph shows which files directly or indirectly include this file:<p><center><img src="users_8h__dep__incl.gif" border="0" usemap="#users.hdep_map" alt=""></center>
<map name="users.hdep_map">
-<area href="channels_8cpp-source.html" shape="rect" coords="413,412,512,439" alt="">
-<area href="modules_8cpp-source.html" shape="rect" coords="413,311,512,337" alt="">
-<area href="users_8cpp-source.html" shape="rect" coords="280,159,360,185" alt="">
-<area href="commands_8h-source.html" shape="rect" coords="125,108,224,135" alt="">
-<area href="globals_8h-source.html" shape="rect" coords="137,361,212,388" alt="">
-<area href="typedefs_8h-source.html" shape="rect" coords="277,361,363,388" alt="">
-<area href="inspircd_8h-source.html" shape="rect" coords="135,209,215,236" alt="">
-<area href="cull__list_8h-source.html" shape="rect" coords="136,412,213,439" alt="">
-<area href="message_8h-source.html" shape="rect" coords="277,564,363,591" alt="">
-<area href="mode_8h-source.html" shape="rect" coords="287,260,353,287" alt="">
-<area href="userprocess_8h-source.html" shape="rect" coords="123,564,227,591" alt="">
-<area href="xline_8h-source.html" shape="rect" coords="289,463,351,489" alt="">
+<area href="channels_8cpp-source.html" shape="rect" coords="531,235,629,261" alt="">
+<area href="modules_8cpp-source.html" shape="rect" coords="531,387,629,413" alt="">
+<area href="users_8cpp-source.html" shape="rect" coords="540,564,620,591" alt="">
+<area href="commands_8h-source.html" shape="rect" coords="379,615,477,641" alt="">
+<area href="cull__list_8h-source.html" shape="rect" coords="121,311,199,337" alt="">
+<area href="globals_8h-source.html" shape="rect" coords="249,159,324,185" alt="">
+<area href="typedefs_8h-source.html" shape="rect" coords="385,260,471,287" alt="">
+<area href="inspircd_8h-source.html" shape="rect" coords="247,412,327,439" alt="">
+<area href="userprocess_8h-source.html" shape="rect" coords="376,463,480,489" alt="">
+<area href="mode_8h-source.html" shape="rect" coords="127,361,193,388" alt="">
+<area href="message_8h-source.html" shape="rect" coords="385,311,471,337" alt="">
+<area href="xline_8h-source.html" shape="rect" coords="397,513,459,540" alt="">
</map>
<p>
@@ -73,6 +75,30 @@ This graph shows which files directly or indirectly include this file:<p><center
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::vector&lt; <a class="el" href="classConnectClass.html">ConnectClass</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="users_8h.html#ClassVector">ClassVector</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Holds a complete list of all allow and deny tags from the configuration file (connection classes). <a href="#ClassVector"></a><br></td></tr>
+<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T&gt; </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceirc.html#string">string</a>&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="users_8h.html#ConvToStr_28const_20T_20_26in_29">ConvToStr</a> (const T &amp;in)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="users_8h.html#AddOper_28userrec_20_2Auser_29">AddOper</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="users_8h.html#DeleteOper_28userrec_20_2Auser_29">DeleteOper</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="users_8h.html#kill_5Flink_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29">kill_link</a> (<a class="el" href="classuserrec.html">userrec</a> *user, const char *r)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="users_8h.html#kill_5Flink_5Fsilent_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29">kill_link_silent</a> (<a class="el" href="classuserrec.html">userrec</a> *user, const char *r)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="users_8h.html#AddWhoWas_28userrec_20_2Au_29">AddWhoWas</a> (<a class="el" href="classuserrec.html">userrec</a> *u)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="users_8h.html#AddClient_28int_20socket_2C_20char_20_2Ahost_2C_20int_20port_2C_20bool_20iscached_2C_20char_20_2Aip_29">AddClient</a> (int socket, char *host, int port, bool iscached, char *ip)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="users_8h.html#FullConnectUser_28userrec_20_2Auser_29">FullConnectUser</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="users_8h.html#ConnectUser_28userrec_20_2Auser_29">ConnectUser</a> (<a class="el" href="classuserrec.html">userrec</a> *user)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="users_8h.html#ReHashNick_28char_20_2AOld_2C_20char_20_2ANew_29">ReHashNick</a> (char *Old, char *New)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="users_8h.html#force_5Fnickchange_28userrec_20_2Auser_2C_20const_20char_20_2Anewnick_29">force_nickchange</a> (<a class="el" href="classuserrec.html">userrec</a> *user, const char *newnick)</td></tr>
+
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="CC_5FALLOW"></a><!-- doxytag: member="users.h::CC_ALLOW" ref="CC_5FALLOW" args="" --><p>
@@ -97,7 +123,9 @@ This graph shows which files directly or indirectly include this file:<p><center
<p>
<p>
-Definition at line <a class="el" href="users_8h-source.html#l00034">34</a> of file <a class="el" href="users_8h-source.html">users.h</a>. </td>
+Definition at line <a class="el" href="users_8h-source.html#l00036">36</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
+<p>
+Referenced by <a class="el" href="users_8cpp-source.html#l00524">AddClient()</a>. </td>
</tr>
</table>
<a class="anchor" name="CC_5FDENY"></a><!-- doxytag: member="users.h::CC_DENY" ref="CC_5FDENY" args="" --><p>
@@ -122,7 +150,7 @@ Definition at line <a class="el" href="users_8h-source.html#l00034">34</a> of fi
<p>
<p>
-Definition at line <a class="el" href="users_8h-source.html#l00035">35</a> of file <a class="el" href="users_8h-source.html">users.h</a>. </td>
+Definition at line <a class="el" href="users_8h-source.html#l00037">37</a> of file <a class="el" href="users_8h-source.html">users.h</a>. </td>
</tr>
</table>
<a class="anchor" name="STATUS_5FHOP"></a><!-- doxytag: member="users.h::STATUS_HOP" ref="STATUS_5FHOP" args="" --><p>
@@ -147,7 +175,7 @@ Definition at line <a class="el" href="users_8h-source.html#l00035">35</a> of fi
<p>
<p>
-Definition at line <a class="el" href="users_8h-source.html#l00030">30</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
+Definition at line <a class="el" href="users_8h-source.html#l00032">32</a> of file <a class="el" href="users_8h-source.html">users.h</a>.
<p>
Referenced by <a class="el" href="channels_8cpp-source.html#l00459">kick_channel()</a>. </td>
</tr>
@@ -174,7 +202,7 @@ Referenced by <a class="el" href="channels_8cpp-source.html#l00459">kick_channel
<p>
<p>
-Definition at line <a class="el" href="users_8h-source.html#l00032">32</a> of file <a class="el" href="users_8h-source.html">users.h</a>. </td>
+Definition at line <a class="el" href="users_8h-source.html#l00034">34</a> of file <a class="el" href="users_8h-source.html">users.h</a>. </td>
</tr>
</table>
<a class="anchor" name="STATUS_5FOP"></a><!-- doxytag: member="users.h::STATUS_OP" ref="STATUS_5FOP" args="" --><p>
@@ -199,7 +227,7 @@ Definition at line <a class="el" href="users_8h-source.html#l00032">32</a> of fi
<p>
<p>
-Definition at line <a class="el" href="users_8h-source.html#l00029">29</a> of file <a class="el" href="users_8h-source.html">users.h</a>. </td>
+Definition at line <a class="el" href="users_8h-source.html#l00031">31</a> of file <a class="el" href="users_8h-source.html">users.h</a>. </td>
</tr>
</table>
<a class="anchor" name="STATUS_5FVOICE"></a><!-- doxytag: member="users.h::STATUS_VOICE" ref="STATUS_5FVOICE" args="" --><p>
@@ -224,7 +252,7 @@ Definition at line <a class="el" href="users_8h-source.html#l00029">29</a> of fi
<p>
<p>
-Definition at line <a class="el" href="users_8h-source.html#l00031">31</a> of file <a class="el" href="users_8h-source.html">users.h</a>. </td>
+Definition at line <a class="el" href="users_8h-source.html#l00033">33</a> of file <a class="el" href="users_8h-source.html">users.h</a>. </td>
</tr>
</table>
<hr><h2>Typedef Documentation</h2>
@@ -252,7 +280,7 @@ Holds a complete list of all allow and deny tags from the configuration file (co
<p>
<p>
-Definition at line <a class="el" href="users_8h-source.html#l00103">103</a> of file <a class="el" href="users_8h-source.html">users.h</a>. </td>
+Definition at line <a class="el" href="users_8h-source.html#l00107">107</a> of file <a class="el" href="users_8h-source.html">users.h</a>. </td>
</tr>
</table>
<a class="anchor" name="InvitedList"></a><!-- doxytag: member="users.h::InvitedList" ref="InvitedList" args="" --><p>
@@ -279,10 +307,914 @@ Holds a complete list of all channels to which a user has been invited and has n
<p>
<p>
-Definition at line <a class="el" href="users_8h-source.html#l00097">97</a> of file <a class="el" href="users_8h-source.html">users.h</a>. </td>
+Definition at line <a class="el" href="users_8h-source.html#l00101">101</a> of file <a class="el" href="users_8h-source.html">users.h</a>. </td>
+ </tr>
+</table>
+<hr><h2>Function Documentation</h2>
+<a class="anchor" name="AddClient_28int_20socket_2C_20char_20_2Ahost_2C_20int_20port_2C_20bool_20iscached_2C_20char_20_2Aip_29"></a><!-- doxytag: member="users.h::AddClient" ref="AddClient_28int_20socket_2C_20char_20_2Ahost_2C_20int_20port_2C_20bool_20iscached_2C_20char_20_2Aip_29" args="(int socket, char *host, int port, bool iscached, char *ip)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top">void AddClient </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">int&nbsp;</td>
+ <td class="mdname" nowrap> <em>socket</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td class="md"></td>
+ <td class="md" nowrap>char *&nbsp;</td>
+ <td class="mdname" nowrap> <em>host</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td class="md"></td>
+ <td class="md" nowrap>int&nbsp;</td>
+ <td class="mdname" nowrap> <em>port</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td class="md"></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>iscached</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td class="md"></td>
+ <td class="md" nowrap>char *&nbsp;</td>
+ <td class="mdname" nowrap> <em>ip</em></td>
+ </tr>
+ <tr>
+ <td class="md"></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="users_8cpp-source.html#l00524">524</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
+<p>
+References <a class="el" href="socketengine_8cpp-source.html#l00065">SocketEngine::AddFd()</a>, <a class="el" href="users_8h-source.html#l00036">CC_ALLOW</a>, <a class="el" href="channels_8h-source.html#l00254">ucrec::channel</a>, <a class="el" href="inspircd__io_8h-source.html#l00243">ServerConfig::Classes</a>, <a class="el" href="modules_8cpp.html#clientlist">clientlist</a>, <a class="el" href="users_8cpp-source.html#l00056">ConvToStr()</a>, <a class="el" href="inspircd__io_8h-source.html#l00029">DEBUG</a>, <a class="el" href="inspircd__io_8h-source.html#l00177">ServerConfig::dns_timeout</a>, <a class="el" href="inspircd_8h.html#FindServerNamePtr_28std_3A_3Astring_20servername_29">FindServerNamePtr()</a>, <a class="el" href="users_8cpp-source.html#l00349">kill_link()</a>, <a class="el" href="users_8cpp-source.html#l00052">local_users</a>, <a class="el" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log()</a>, <a class="el" href="xline_8h.html#matches_5Fexception_28const_20char_20_2Ahost_29">matches_exception()</a>, <a class="el" href="xline_8h.html#matches_5Fzline_28const_20char_20_2Aipaddr_29">matches_zline()</a>, <a class="el" href="inspircd_8h-source.html#l00111">InspIRCd::SE</a>, <a class="el" href="inspircd__io_8h-source.html#l00069">ServerConfig::ServerName</a>, <a class="el" href="inspircd__io_8h-source.html#l00194">ServerConfig::SoftLimit</a>, <a class="el" href="channels_8cpp.html#TIME">TIME</a>, <a class="el" href="channels_8h-source.html#l00249">ucrec::uc_modes</a>, and <a class="el" href="socketengine_8h-source.html#l00043">X_ESTAB_CLIENT</a>.<div class="fragment"><pre class="fragment"><a name="l00525"></a>00525 {
+<a name="l00526"></a>00526 <a class="code" href="namespaceirc.html#string">string</a> tempnick;
+<a name="l00527"></a>00527 <span class="keywordtype">char</span> tn2[MAXBUF];
+<a name="l00528"></a>00528 user_hash::iterator iter;
+<a name="l00529"></a>00529
+<a name="l00530"></a>00530 tempnick = <a class="code" href="users_8cpp.html#ConvToStr_28const_20T_20_26in_29">ConvToStr</a>(socket) + <span class="stringliteral">"-unknown"</span>;
+<a name="l00531"></a>00531 sprintf(tn2,<span class="stringliteral">"%lu-unknown"</span>,(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>)socket);
+<a name="l00532"></a>00532
+<a name="l00533"></a>00533 iter = <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>.find(tempnick);
+<a name="l00534"></a>00534
+<a name="l00535"></a>00535 <span class="comment">// fix by brain.</span>
+<a name="l00536"></a>00536 <span class="comment">// as these nicknames are 'RFC impossible', we can be sure nobody is going to be</span>
+<a name="l00537"></a>00537 <span class="comment">// using one as a registered connection. As theyre per fd, we can also safely assume</span>
+<a name="l00538"></a>00538 <span class="comment">// that we wont have collisions. Therefore, if the nick exists in the list, its only</span>
+<a name="l00539"></a>00539 <span class="comment">// used by a dead socket, erase the iterator so that the new client may reclaim it.</span>
+<a name="l00540"></a>00540 <span class="comment">// this was probably the cause of 'server ignores me when i hammer it with reconnects'</span>
+<a name="l00541"></a>00541 <span class="comment">// issue in earlier alphas/betas</span>
+<a name="l00542"></a>00542 <span class="keywordflow">if</span> (iter != <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>.end())
+<a name="l00543"></a>00543 {
+<a name="l00544"></a>00544 <a class="code" href="classuserrec.html">userrec</a>* goner = iter-&gt;second;
+<a name="l00545"></a>00545 <span class="keyword">delete</span> goner;
+<a name="l00546"></a>00546 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>.erase(iter);
+<a name="l00547"></a>00547 }
+<a name="l00548"></a>00548
+<a name="l00549"></a>00549 <span class="comment">/*</span>
+<a name="l00550"></a>00550 <span class="comment"> * It is OK to access the value here this way since we know</span>
+<a name="l00551"></a>00551 <span class="comment"> * it exists, we just created it above.</span>
+<a name="l00552"></a>00552 <span class="comment"> *</span>
+<a name="l00553"></a>00553 <span class="comment"> * At NO other time should you access a value in a map or a</span>
+<a name="l00554"></a>00554 <span class="comment"> * hash_map this way.</span>
+<a name="l00555"></a>00555 <span class="comment"> */</span>
+<a name="l00556"></a>00556 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[tempnick] = <span class="keyword">new</span> <a class="code" href="classuserrec.html">userrec</a>();
+<a name="l00557"></a>00557
+<a name="l00558"></a>00558 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"AddClient: %lu %s %d %s"</span>,(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>)socket,host,port,ip);
+<a name="l00559"></a>00559
+<a name="l00560"></a>00560 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[tempnick]-&gt;fd = socket;
+<a name="l00561"></a>00561 strlcpy(clientlist[tempnick]-&gt;nick, tn2,NICKMAX);
+<a name="l00562"></a>00562 strlcpy(clientlist[tempnick]-&gt;host, host,160);
+<a name="l00563"></a>00563 strlcpy(clientlist[tempnick]-&gt;dhost, host,160);
+<a name="l00564"></a>00564 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[tempnick]-&gt;server = (<span class="keywordtype">char</span>*)<a class="code" href="inspircd_8h.html#FindServerNamePtr_28std_3A_3Astring_20servername_29">FindServerNamePtr</a>(<a class="code" href="channels_8cpp.html#Config">Config</a>-&gt;<a class="code" href="classServerConfig.html#ServerName_5BMAXBUF_5D">ServerName</a>);
+<a name="l00565"></a>00565 strlcpy(clientlist[tempnick]-&gt;ident, <span class="stringliteral">"unknown"</span>,IDENTMAX);
+<a name="l00566"></a>00566 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[tempnick]-&gt;registered = 0;
+<a name="l00567"></a>00567 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[tempnick]-&gt;signon = <a class="code" href="channels_8cpp.html#TIME">TIME</a> + <a class="code" href="channels_8cpp.html#Config">Config</a>-&gt;<a class="code" href="classServerConfig.html#dns_5Ftimeout">dns_timeout</a>;
+<a name="l00568"></a>00568 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[tempnick]-&gt;lastping = 1;
+<a name="l00569"></a>00569 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[tempnick]-&gt;port = port;
+<a name="l00570"></a>00570 strlcpy(clientlist[tempnick]-&gt;ip,ip,16);
+<a name="l00571"></a>00571
+<a name="l00572"></a>00572 <span class="comment">// set the registration timeout for this user</span>
+<a name="l00573"></a>00573 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> class_regtimeout = 90;
+<a name="l00574"></a>00574 <span class="keywordtype">int</span> class_flood = 0;
+<a name="l00575"></a>00575 <span class="keywordtype">long</span> class_threshold = 5;
+<a name="l00576"></a>00576 <span class="keywordtype">long</span> class_sqmax = 262144; <span class="comment">// 256kb</span>
+<a name="l00577"></a>00577 <span class="keywordtype">long</span> class_rqmax = 4096; <span class="comment">// 4k</span>
+<a name="l00578"></a>00578
+<a name="l00579"></a>00579 <span class="keywordflow">for</span> (ClassVector::iterator i = <a class="code" href="channels_8cpp.html#Config">Config</a>-&gt;<a class="code" href="classServerConfig.html#Classes">Classes</a>.begin(); i != <a class="code" href="channels_8cpp.html#Config">Config</a>-&gt;<a class="code" href="classServerConfig.html#Classes">Classes</a>.end(); i++)
+<a name="l00580"></a>00580 {
+<a name="l00581"></a>00581 <span class="keywordflow">if</span> (match(clientlist[tempnick]-&gt;host,i-&gt;host) &amp;&amp; (i-&gt;type == <a class="code" href="users_8h.html#CC_5FALLOW">CC_ALLOW</a>))
+<a name="l00582"></a>00582 {
+<a name="l00583"></a>00583 class_regtimeout = (<span class="keywordtype">unsigned</span> long)i-&gt;registration_timeout;
+<a name="l00584"></a>00584 class_flood = i-&gt;flood;
+<a name="l00585"></a>00585 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[tempnick]-&gt;pingmax = i-&gt;pingtime;
+<a name="l00586"></a>00586 class_threshold = i-&gt;threshold;
+<a name="l00587"></a>00587 class_sqmax = i-&gt;sendqmax;
+<a name="l00588"></a>00588 class_rqmax = i-&gt;recvqmax;
+<a name="l00589"></a>00589 <span class="keywordflow">break</span>;
+<a name="l00590"></a>00590 }
+<a name="l00591"></a>00591 }
+<a name="l00592"></a>00592
+<a name="l00593"></a>00593 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[tempnick]-&gt;nping = <a class="code" href="channels_8cpp.html#TIME">TIME</a>+<a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[tempnick]-&gt;pingmax + <a class="code" href="channels_8cpp.html#Config">Config</a>-&gt;<a class="code" href="classServerConfig.html#dns_5Ftimeout">dns_timeout</a>;
+<a name="l00594"></a>00594 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[tempnick]-&gt;timeout = <a class="code" href="channels_8cpp.html#TIME">TIME</a>+class_regtimeout;
+<a name="l00595"></a>00595 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[tempnick]-&gt;flood = class_flood;
+<a name="l00596"></a>00596 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[tempnick]-&gt;threshold = class_threshold;
+<a name="l00597"></a>00597 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[tempnick]-&gt;sendqmax = class_sqmax;
+<a name="l00598"></a>00598 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[tempnick]-&gt;recvqmax = class_rqmax;
+<a name="l00599"></a>00599
+<a name="l00600"></a>00600 <a class="code" href="classucrec.html">ucrec</a> a;
+<a name="l00601"></a>00601 a.<a class="code" href="classucrec.html#channel">channel</a> = NULL;
+<a name="l00602"></a>00602 a.<a class="code" href="classucrec.html#uc_5Fmodes">uc_modes</a> = 0;
+<a name="l00603"></a>00603 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; MAXCHANS; i++)
+<a name="l00604"></a>00604 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[tempnick]-&gt;chans.push_back(a);
+<a name="l00605"></a>00605
+<a name="l00606"></a>00606 <span class="keywordflow">if</span> (<a class="code" href="modules_8cpp.html#clientlist">clientlist</a>.size() &gt; <a class="code" href="channels_8cpp.html#Config">Config</a>-&gt;<a class="code" href="classServerConfig.html#SoftLimit">SoftLimit</a>)
+<a name="l00607"></a>00607 {
+<a name="l00608"></a>00608 <a class="code" href="users_8cpp.html#kill_5Flink_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29">kill_link</a>(clientlist[tempnick],<span class="stringliteral">"No more connections allowed"</span>);
+<a name="l00609"></a>00609 <span class="keywordflow">return</span>;
+<a name="l00610"></a>00610 }
+<a name="l00611"></a>00611
+<a name="l00612"></a>00612 <span class="keywordflow">if</span> (<a class="code" href="modules_8cpp.html#clientlist">clientlist</a>.size() &gt;= MAXCLIENTS)
+<a name="l00613"></a>00613 {
+<a name="l00614"></a>00614 <a class="code" href="users_8cpp.html#kill_5Flink_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29">kill_link</a>(clientlist[tempnick],<span class="stringliteral">"No more connections allowed"</span>);
+<a name="l00615"></a>00615 <span class="keywordflow">return</span>;
+<a name="l00616"></a>00616 }
+<a name="l00617"></a>00617
+<a name="l00618"></a>00618 <span class="comment">// this is done as a safety check to keep the file descriptors within range of fd_ref_table.</span>
+<a name="l00619"></a>00619 <span class="comment">// its a pretty big but for the moment valid assumption:</span>
+<a name="l00620"></a>00620 <span class="comment">// file descriptors are handed out starting at 0, and are recycled as theyre freed.</span>
+<a name="l00621"></a>00621 <span class="comment">// therefore if there is ever an fd over 65535, 65536 clients must be connected to the</span>
+<a name="l00622"></a>00622 <span class="comment">// irc server at once (or the irc server otherwise initiating this many connections, files etc)</span>
+<a name="l00623"></a>00623 <span class="comment">// which for the time being is a physical impossibility (even the largest networks dont have more</span>
+<a name="l00624"></a>00624 <span class="comment">// than about 10,000 users on ONE server!)</span>
+<a name="l00625"></a>00625 <span class="keywordflow">if</span> ((<span class="keywordtype">unsigned</span>)socket &gt; 65534)
+<a name="l00626"></a>00626 {
+<a name="l00627"></a>00627 <a class="code" href="users_8cpp.html#kill_5Flink_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29">kill_link</a>(clientlist[tempnick],<span class="stringliteral">"Server is full"</span>);
+<a name="l00628"></a>00628 <span class="keywordflow">return</span>;
+<a name="l00629"></a>00629 }
+<a name="l00630"></a>00630 <span class="keywordtype">char</span>* e = <a class="code" href="xline_8h.html#matches_5Fexception_28const_20char_20_2Ahost_29">matches_exception</a>(ip);
+<a name="l00631"></a>00631 <span class="keywordflow">if</span> (!e)
+<a name="l00632"></a>00632 {
+<a name="l00633"></a>00633 <span class="keywordtype">char</span>* r = <a class="code" href="xline_8h.html#matches_5Fzline_28const_20char_20_2Aipaddr_29">matches_zline</a>(ip);
+<a name="l00634"></a>00634 <span class="keywordflow">if</span> (r)
+<a name="l00635"></a>00635 {
+<a name="l00636"></a>00636 <span class="keywordtype">char</span> reason[MAXBUF];
+<a name="l00637"></a>00637 snprintf(reason,MAXBUF,<span class="stringliteral">"Z-Lined: %s"</span>,r);
+<a name="l00638"></a>00638 <a class="code" href="users_8cpp.html#kill_5Flink_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29">kill_link</a>(clientlist[tempnick],reason);
+<a name="l00639"></a>00639 <span class="keywordflow">return</span>;
+<a name="l00640"></a>00640 }
+<a name="l00641"></a>00641 }
+<a name="l00642"></a>00642 <a class="code" href="modules_8cpp.html#fd_5Fref_5Ftable_5B_36_35_35_33_36_5D">fd_ref_table</a>[socket] = <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[tempnick];
+<a name="l00643"></a>00643 <a class="code" href="users_8cpp.html#local_5Fusers">local_users</a>.push_back(clientlist[tempnick]);
+<a name="l00644"></a>00644 <a class="code" href="modules_8cpp.html#ServerInstance">ServerInstance</a>-&gt;<a class="code" href="classInspIRCd.html#SE">SE</a>-&gt;<a class="code" href="classSocketEngine.html#AddFd_28int_20fd_2C_20bool_20readable_2C_20char_20type_29">AddFd</a>(socket,<span class="keyword">true</span>,<a class="code" href="socketengine_8h.html#X_5FESTAB_5FCLIENT">X_ESTAB_CLIENT</a>);
+<a name="l00645"></a>00645 }
+</pre></div>
+<p>
+ </td>
+ </tr>
+</table>
+<a class="anchor" name="AddOper_28userrec_20_2Auser_29"></a><!-- doxytag: member="users.h::AddOper" ref="AddOper_28userrec_20_2Auser_29" args="(userrec *user)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top">void AddOper </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>user</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="users_8cpp-source.html#l00330">330</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
+<p>
+References <a class="el" href="users_8cpp-source.html#l00054">all_opers</a>, <a class="el" href="inspircd__io_8h-source.html#l00029">DEBUG</a>, and <a class="el" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log()</a>.<div class="fragment"><pre class="fragment"><a name="l00331"></a>00331 {
+<a name="l00332"></a>00332 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"Oper added to optimization list"</span>);
+<a name="l00333"></a>00333 <a class="code" href="users_8cpp.html#all_5Fopers">all_opers</a>.push_back(user);
+<a name="l00334"></a>00334 }
+</pre></div>
+<p>
+ </td>
+ </tr>
+</table>
+<a class="anchor" name="AddWhoWas_28userrec_20_2Au_29"></a><!-- doxytag: member="users.h::AddWhoWas" ref="AddWhoWas_28userrec_20_2Au_29" args="(userrec *u)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top">void AddWhoWas </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>u</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="users_8cpp-source.html#l00471">471</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
+<p>
+References <a class="el" href="inspircd__io_8h-source.html#l00029">DEBUG</a>, <a class="el" href="users_8h-source.html#l00138">userrec::dhost</a>, <a class="el" href="users_8h-source.html#l00341">WhoWasUser::dhost</a>, <a class="el" href="users_8h-source.html#l00142">userrec::fullname</a>, <a class="el" href="users_8h-source.html#l00343">WhoWasUser::fullname</a>, <a class="el" href="connection_8h-source.html#l00046">connection::host</a>, <a class="el" href="users_8h-source.html#l00342">WhoWasUser::host</a>, <a class="el" href="users_8h-source.html#l00133">userrec::ident</a>, <a class="el" href="users_8h-source.html#l00340">WhoWasUser::ident</a>, <a class="el" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log()</a>, <a class="el" href="users_8h-source.html#l00339">WhoWasUser::nick</a>, <a class="el" href="users_8h-source.html#l00128">userrec::nick</a>, <a class="el" href="users_8h-source.html#l00157">userrec::server</a>, <a class="el" href="users_8h-source.html#l00344">WhoWasUser::server</a>, <a class="el" href="connection_8h-source.html#l00088">connection::signon</a>, <a class="el" href="users_8h-source.html#l00345">WhoWasUser::signon</a>, <a class="el" href="channels_8cpp.html#TIME">TIME</a>, <a class="el" href="users_8cpp.html#whowas">whowas</a>, <a class="el" href="channels_8cpp.html#WHOWAS_5FMAX">WHOWAS_MAX</a>, and <a class="el" href="channels_8cpp.html#WHOWAS_5FSTALE">WHOWAS_STALE</a>.
+<p>
+Referenced by <a class="el" href="users_8cpp-source.html#l00349">kill_link()</a>.<div class="fragment"><pre class="fragment"><a name="l00472"></a>00472 {
+<a name="l00473"></a>00473 whowas_hash::iterator iter = <a class="code" href="users_8cpp.html#whowas">whowas</a>.find(u-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>);
+<a name="l00474"></a>00474 <a class="code" href="classWhoWasUser.html">WhoWasUser</a> *a = <span class="keyword">new</span> <a class="code" href="classWhoWasUser.html">WhoWasUser</a>();
+<a name="l00475"></a>00475 strlcpy(a-&gt;<a class="code" href="classWhoWasUser.html#nick_5BNICKMAX_5D">nick</a>,u-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>,NICKMAX);
+<a name="l00476"></a>00476 strlcpy(a-&gt;<a class="code" href="classWhoWasUser.html#ident_5BIDENTMAX_2B_31_5D">ident</a>,u-&gt;<a class="code" href="classuserrec.html#ident_5BIDENTMAX_2B_32_5D">ident</a>,IDENTMAX);
+<a name="l00477"></a>00477 strlcpy(a-&gt;<a class="code" href="classWhoWasUser.html#dhost_5B_31_36_30_5D">dhost</a>,u-&gt;<a class="code" href="classuserrec.html#dhost_5B_31_36_30_5D">dhost</a>,160);
+<a name="l00478"></a>00478 strlcpy(a-&gt;<a class="code" href="classWhoWasUser.html#host_5B_31_36_30_5D">host</a>,u-&gt;<a class="code" href="classconnection.html#host_5B_31_36_30_5D">host</a>,160);
+<a name="l00479"></a>00479 strlcpy(a-&gt;<a class="code" href="classWhoWasUser.html#fullname_5BMAXGECOS_2B_31_5D">fullname</a>,u-&gt;<a class="code" href="classuserrec.html#fullname_5BMAXGECOS_2B_31_5D">fullname</a>,MAXGECOS);
+<a name="l00480"></a>00480 strlcpy(a-&gt;<a class="code" href="classWhoWasUser.html#server_5B_32_35_36_5D">server</a>,u-&gt;<a class="code" href="classuserrec.html#server">server</a>,256);
+<a name="l00481"></a>00481 a-&gt;<a class="code" href="classWhoWasUser.html#signon">signon</a> = u-&gt;<a class="code" href="classconnection.html#signon">signon</a>;
+<a name="l00482"></a>00482
+<a name="l00483"></a>00483 <span class="comment">/* MAX_WHOWAS: max number of /WHOWAS items</span>
+<a name="l00484"></a>00484 <span class="comment"> * WHOWAS_STALE: number of hours before a WHOWAS item is marked as stale and</span>
+<a name="l00485"></a>00485 <span class="comment"> * can be replaced by a newer one</span>
+<a name="l00486"></a>00486 <span class="comment"> */</span>
+<a name="l00487"></a>00487
+<a name="l00488"></a>00488 <span class="keywordflow">if</span> (iter == <a class="code" href="users_8cpp.html#whowas">whowas</a>.end())
+<a name="l00489"></a>00489 {
+<a name="l00490"></a>00490 <span class="keywordflow">if</span> (<a class="code" href="users_8cpp.html#whowas">whowas</a>.size() &gt;= (unsigned)<a class="code" href="channels_8cpp.html#WHOWAS_5FMAX">WHOWAS_MAX</a>)
+<a name="l00491"></a>00491 {
+<a name="l00492"></a>00492 <span class="keywordflow">for</span> (whowas_hash::iterator i = <a class="code" href="users_8cpp.html#whowas">whowas</a>.begin(); i != <a class="code" href="users_8cpp.html#whowas">whowas</a>.end(); i++)
+<a name="l00493"></a>00493 {
+<a name="l00494"></a>00494 <span class="comment">// 3600 seconds in an hour ;)</span>
+<a name="l00495"></a>00495 <span class="keywordflow">if</span> ((i-&gt;second-&gt;signon)&lt;(TIME-(WHOWAS_STALE*3600)))
+<a name="l00496"></a>00496 {
+<a name="l00497"></a>00497 <span class="comment">// delete the old one</span>
+<a name="l00498"></a>00498 <span class="keywordflow">if</span> (i-&gt;second) <span class="keyword">delete</span> i-&gt;second;
+<a name="l00499"></a>00499 <span class="comment">// replace with new one</span>
+<a name="l00500"></a>00500 i-&gt;second = a;
+<a name="l00501"></a>00501 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"added WHOWAS entry, purged an old record"</span>);
+<a name="l00502"></a>00502 <span class="keywordflow">return</span>;
+<a name="l00503"></a>00503 }
+<a name="l00504"></a>00504 }
+<a name="l00505"></a>00505 <span class="comment">// no space left and user doesnt exist. Don't leave ram in use!</span>
+<a name="l00506"></a>00506 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"Not able to update whowas (list at WHOWAS_MAX entries and trying to add new?), freeing excess ram"</span>);
+<a name="l00507"></a>00507 <span class="keyword">delete</span> a;
+<a name="l00508"></a>00508 }
+<a name="l00509"></a>00509 <span class="keywordflow">else</span>
+<a name="l00510"></a>00510 {
+<a name="l00511"></a>00511 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"added fresh WHOWAS entry"</span>);
+<a name="l00512"></a>00512 <a class="code" href="users_8cpp.html#whowas">whowas</a>[a-&gt;<a class="code" href="classWhoWasUser.html#nick_5BNICKMAX_5D">nick</a>] = a;
+<a name="l00513"></a>00513 }
+<a name="l00514"></a>00514 }
+<a name="l00515"></a>00515 <span class="keywordflow">else</span>
+<a name="l00516"></a>00516 {
+<a name="l00517"></a>00517 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"updated WHOWAS entry"</span>);
+<a name="l00518"></a>00518 <span class="keywordflow">if</span> (iter-&gt;second) <span class="keyword">delete</span> iter-&gt;second;
+<a name="l00519"></a>00519 iter-&gt;second = a;
+<a name="l00520"></a>00520 }
+<a name="l00521"></a>00521 }
+</pre></div>
+<p>
+ </td>
+ </tr>
+</table>
+<a class="anchor" name="ConnectUser_28userrec_20_2Auser_29"></a><!-- doxytag: member="users.h::ConnectUser" ref="ConnectUser_28userrec_20_2Auser_29" args="(userrec *user)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top">void ConnectUser </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>user</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="users_8cpp-source.html#l00731">731</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
+<p>
+References <a class="el" href="users_8h-source.html#l00185">userrec::dns_done</a>, <a class="el" href="users_8cpp-source.html#l00647">FullConnectUser()</a>, and <a class="el" href="connection_8h-source.html#l00080">connection::registered</a>.<div class="fragment"><pre class="fragment"><a name="l00732"></a>00732 {
+<a name="l00733"></a>00733 <span class="comment">// dns is already done, things are fast. no need to wait for dns to complete just pass them straight on</span>
+<a name="l00734"></a>00734 <span class="keywordflow">if</span> ((user-&gt;<a class="code" href="classuserrec.html#dns_5Fdone">dns_done</a>) &amp;&amp; (user-&gt;<a class="code" href="classconnection.html#registered">registered</a> &gt;= 3) &amp;&amp; (AllModulesReportReady(user)))
+<a name="l00735"></a>00735 {
+<a name="l00736"></a>00736 <a class="code" href="users_8cpp.html#FullConnectUser_28userrec_20_2Auser_29">FullConnectUser</a>(user);
+<a name="l00737"></a>00737 }
+<a name="l00738"></a>00738 }
+</pre></div>
+<p>
+ </td>
+ </tr>
+</table>
+<a class="anchor" name="ConvToStr_28const_20T_20_26in_29"></a><!-- doxytag: member="users.h::ConvToStr" ref="ConvToStr_28const_20T_20_26in_29" args="(const T &amp;in)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="mdPrefix" colspan="4">
+template&lt;typename T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"><a class="el" href="namespaceirc.html#string">string</a> ConvToStr </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const T &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>in</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="users_8cpp-source.html#l00056">56</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
+<p>
+Referenced by <a class="el" href="users_8cpp-source.html#l00524">AddClient()</a>.<div class="fragment"><pre class="fragment"><a name="l00057"></a>00057 {
+<a name="l00058"></a>00058 stringstream tmp;
+<a name="l00059"></a>00059 <span class="keywordflow">if</span> (!(tmp &lt;&lt; in)) <span class="keywordflow">return</span> <a class="code" href="namespaceirc.html#string">string</a>();
+<a name="l00060"></a>00060 <span class="keywordflow">return</span> tmp.str();
+<a name="l00061"></a>00061 }
+</pre></div>
+<p>
+ </td>
+ </tr>
+</table>
+<a class="anchor" name="DeleteOper_28userrec_20_2Auser_29"></a><!-- doxytag: member="users.h::DeleteOper" ref="DeleteOper_28userrec_20_2Auser_29" args="(userrec *user)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top">void DeleteOper </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>user</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="users_8cpp-source.html#l00336">336</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
+<p>
+References <a class="el" href="users_8cpp-source.html#l00054">all_opers</a>, <a class="el" href="inspircd__io_8h-source.html#l00029">DEBUG</a>, and <a class="el" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log()</a>.<div class="fragment"><pre class="fragment"><a name="l00337"></a>00337 {
+<a name="l00338"></a>00338 <span class="keywordflow">for</span> (std::vector&lt;userrec*&gt;::iterator a = <a class="code" href="users_8cpp.html#all_5Fopers">all_opers</a>.begin(); a &lt; <a class="code" href="users_8cpp.html#all_5Fopers">all_opers</a>.end(); a++)
+<a name="l00339"></a>00339 {
+<a name="l00340"></a>00340 <span class="keywordflow">if</span> (*a == user)
+<a name="l00341"></a>00341 {
+<a name="l00342"></a>00342 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"Oper removed from optimization list"</span>);
+<a name="l00343"></a>00343 <a class="code" href="users_8cpp.html#all_5Fopers">all_opers</a>.erase(a);
+<a name="l00344"></a>00344 <span class="keywordflow">return</span>;
+<a name="l00345"></a>00345 }
+<a name="l00346"></a>00346 }
+<a name="l00347"></a>00347 }
+</pre></div>
+<p>
+ </td>
+ </tr>
+</table>
+<a class="anchor" name="force_5Fnickchange_28userrec_20_2Auser_2C_20const_20char_20_2Anewnick_29"></a><!-- doxytag: member="users.h::force_nickchange" ref="force_5Fnickchange_28userrec_20_2Auser_2C_20const_20char_20_2Anewnick_29" args="(userrec *user, const char *newnick)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top">void force_nickchange </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>user</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td class="md"></td>
+ <td class="md" nowrap>const char *&nbsp;</td>
+ <td class="mdname" nowrap> <em>newnick</em></td>
+ </tr>
+ <tr>
+ <td class="md"></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="users_8cpp-source.html#l00769">769</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
+<p>
+References <a class="el" href="modules_8h-source.html#l00090">FOREACH_RESULT</a>, <a class="el" href="users_8cpp-source.html#l00349">kill_link()</a>, <a class="el" href="xline_8h.html#matches_5Fqline_28const_20char_20_2Anick_29">matches_qline()</a>, <a class="el" href="inspircd_8h-source.html#l00110">InspIRCd::Parser</a>, <a class="el" href="connection_8h-source.html#l00080">connection::registered</a>, <a class="el" href="inspircd_8h-source.html#l00112">InspIRCd::stats</a>, and <a class="el" href="inspircd_8h-source.html#l00080">serverstats::statsCollisions</a>.
+<p>
+Referenced by <a class="el" href="modules_8cpp-source.html#l00385">Server::ChangeUserNick()</a>.<div class="fragment"><pre class="fragment"><a name="l00770"></a>00770 {
+<a name="l00771"></a>00771 <span class="keywordtype">char</span> nick[MAXBUF];
+<a name="l00772"></a>00772 <span class="keywordtype">int</span> MOD_RESULT = 0;
+<a name="l00773"></a>00773
+<a name="l00774"></a>00774 strcpy(nick,<span class="stringliteral">""</span>);
+<a name="l00775"></a>00775
+<a name="l00776"></a>00776 <a class="code" href="modules_8h.html#FOREACH_5FRESULT_28x_29">FOREACH_RESULT</a>(OnUserPreNick(user,newnick));
+<a name="l00777"></a>00777 <span class="keywordflow">if</span> (MOD_RESULT) {
+<a name="l00778"></a>00778 <a class="code" href="modules_8cpp.html#ServerInstance">ServerInstance</a>-&gt;<a class="code" href="classInspIRCd.html#stats">stats</a>-&gt;<a class="code" href="classserverstats.html#statsCollisions">statsCollisions</a>++;
+<a name="l00779"></a>00779 <a class="code" href="users_8cpp.html#kill_5Flink_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29">kill_link</a>(user,<span class="stringliteral">"Nickname collision"</span>);
+<a name="l00780"></a>00780 <span class="keywordflow">return</span>;
+<a name="l00781"></a>00781 }
+<a name="l00782"></a>00782 <span class="keywordflow">if</span> (<a class="code" href="xline_8h.html#matches_5Fqline_28const_20char_20_2Anick_29">matches_qline</a>(newnick))
+<a name="l00783"></a>00783 {
+<a name="l00784"></a>00784 <a class="code" href="modules_8cpp.html#ServerInstance">ServerInstance</a>-&gt;<a class="code" href="classInspIRCd.html#stats">stats</a>-&gt;<a class="code" href="classserverstats.html#statsCollisions">statsCollisions</a>++;
+<a name="l00785"></a>00785 <a class="code" href="users_8cpp.html#kill_5Flink_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29">kill_link</a>(user,<span class="stringliteral">"Nickname collision"</span>);
+<a name="l00786"></a>00786 <span class="keywordflow">return</span>;
+<a name="l00787"></a>00787 }
+<a name="l00788"></a>00788
+<a name="l00789"></a>00789 <span class="keywordflow">if</span> (user)
+<a name="l00790"></a>00790 {
+<a name="l00791"></a>00791 <span class="keywordflow">if</span> (newnick)
+<a name="l00792"></a>00792 {
+<a name="l00793"></a>00793 strncpy(nick,newnick,MAXBUF);
+<a name="l00794"></a>00794 }
+<a name="l00795"></a>00795 <span class="keywordflow">if</span> (user-&gt;<a class="code" href="classconnection.html#registered">registered</a> == 7)
+<a name="l00796"></a>00796 {
+<a name="l00797"></a>00797 <span class="keywordtype">char</span>* pars[1];
+<a name="l00798"></a>00798 pars[0] = nick;
+<a name="l00799"></a>00799 <a class="code" href="namespaceirc.html#string">std::string</a> cmd = <span class="stringliteral">"NICK"</span>;
+<a name="l00800"></a>00800 <a class="code" href="modules_8cpp.html#ServerInstance">ServerInstance</a>-&gt;<a class="code" href="classInspIRCd.html#Parser">Parser</a>-&gt;CallHandler(cmd,pars,1,user);
+<a name="l00801"></a>00801 }
+<a name="l00802"></a>00802 }
+<a name="l00803"></a>00803 }
+</pre></div>
+<p>
+ </td>
+ </tr>
+</table>
+<a class="anchor" name="FullConnectUser_28userrec_20_2Auser_29"></a><!-- doxytag: member="users.h::FullConnectUser" ref="FullConnectUser_28userrec_20_2Auser_29" args="(userrec *user)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top">void FullConnectUser </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>user</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="users_8cpp-source.html#l00647">647</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
+<p>
+References <a class="el" href="inspircd__io_8h-source.html#l00029">DEBUG</a>, <a class="el" href="connection_8h-source.html#l00042">connection::fd</a>, <a class="el" href="modules_8h-source.html#l00082">FOREACH_MOD</a>, <a class="el" href="connection_8h-source.html#l00070">connection::haspassed</a>, <a class="el" href="connection_8h-source.html#l00046">connection::host</a>, <a class="el" href="users_8h-source.html#l00133">userrec::ident</a>, <a class="el" href="connection_8h-source.html#l00092">connection::idle_lastmsg</a>, <a class="el" href="connection_8h-source.html#l00050">connection::ip</a>, <a class="el" href="users_8cpp-source.html#l00349">kill_link()</a>, <a class="el" href="users_8cpp-source.html#l00412">kill_link_silent()</a>, <a class="el" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log()</a>, <a class="el" href="xline_8h.html#matches_5Fexception_28const_20char_20_2Ahost_29">matches_exception()</a>, <a class="el" href="xline_8h.html#matches_5Fgline_28const_20char_20_2Ahost_29">matches_gline()</a>, <a class="el" href="xline_8h.html#matches_5Fkline_28const_20char_20_2Ahost_29">matches_kline()</a>, <a class="el" href="inspircd__io_8h-source.html#l00075">ServerConfig::Network</a>, <a class="el" href="users_8h-source.html#l00128">userrec::nick</a>, <a class="el" href="connection_8h-source.html#l00076">connection::port</a>, <a class="el" href="connection_8h-source.html#l00080">connection::registered</a>, <a class="el" href="inspircd__io_8h-source.html#l00069">ServerConfig::ServerName</a>, <a class="el" href="inspircd_8h-source.html#l00112">InspIRCd::stats</a>, <a class="el" href="inspircd_8h-source.html#l00084">serverstats::statsConnects</a>, <a class="el" href="channels_8cpp.html#TIME">TIME</a>, <a class="el" href="globals_8h.html#WriteOpers_28char_20_2Atext_2C_2E_2E_2E_29">WriteOpers()</a>, and <a class="el" href="globals_8h.html#WriteServ_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteServ()</a>.
+<p>
+Referenced by <a class="el" href="users_8cpp-source.html#l00731">ConnectUser()</a>.<div class="fragment"><pre class="fragment"><a name="l00648"></a>00648 {
+<a name="l00649"></a>00649 <a class="code" href="modules_8cpp.html#ServerInstance">ServerInstance</a>-&gt;<a class="code" href="classInspIRCd.html#stats">stats</a>-&gt;<a class="code" href="classserverstats.html#statsConnects">statsConnects</a>++;
+<a name="l00650"></a>00650 user-&gt;<a class="code" href="classconnection.html#idle_5Flastmsg">idle_lastmsg</a> = <a class="code" href="channels_8cpp.html#TIME">TIME</a>;
+<a name="l00651"></a>00651 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"ConnectUser: %s"</span>,user-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>);
+<a name="l00652"></a>00652
+<a name="l00653"></a>00653 <span class="keywordflow">if</span> ((strcmp(Passwd(user),<span class="stringliteral">""</span>)) &amp;&amp; (!user-&gt;<a class="code" href="classconnection.html#haspassed">haspassed</a>))
+<a name="l00654"></a>00654 {
+<a name="l00655"></a>00655 <a class="code" href="users_8cpp.html#kill_5Flink_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29">kill_link</a>(user,<span class="stringliteral">"Invalid password"</span>);
+<a name="l00656"></a>00656 <span class="keywordflow">return</span>;
+<a name="l00657"></a>00657 }
+<a name="l00658"></a>00658 <span class="keywordflow">if</span> (IsDenied(user))
+<a name="l00659"></a>00659 {
+<a name="l00660"></a>00660 <a class="code" href="users_8cpp.html#kill_5Flink_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29">kill_link</a>(user,<span class="stringliteral">"Unauthorised connection"</span>);
+<a name="l00661"></a>00661 <span class="keywordflow">return</span>;
+<a name="l00662"></a>00662 }
+<a name="l00663"></a>00663
+<a name="l00664"></a>00664 <span class="keywordtype">char</span> match_against[MAXBUF];
+<a name="l00665"></a>00665 snprintf(match_against,MAXBUF,<span class="stringliteral">"%s@%s"</span>,user-&gt;<a class="code" href="classuserrec.html#ident_5BIDENTMAX_2B_32_5D">ident</a>,user-&gt;<a class="code" href="classconnection.html#host_5B_31_36_30_5D">host</a>);
+<a name="l00666"></a>00666 <span class="keywordtype">char</span>* e = <a class="code" href="xline_8h.html#matches_5Fexception_28const_20char_20_2Ahost_29">matches_exception</a>(match_against);
+<a name="l00667"></a>00667 <span class="keywordflow">if</span> (!e)
+<a name="l00668"></a>00668 {
+<a name="l00669"></a>00669 <span class="keywordtype">char</span>* r = <a class="code" href="xline_8h.html#matches_5Fgline_28const_20char_20_2Ahost_29">matches_gline</a>(match_against);
+<a name="l00670"></a>00670 <span class="keywordflow">if</span> (r)
+<a name="l00671"></a>00671 {
+<a name="l00672"></a>00672 <span class="keywordtype">char</span> reason[MAXBUF];
+<a name="l00673"></a>00673 snprintf(reason,MAXBUF,<span class="stringliteral">"G-Lined: %s"</span>,r);
+<a name="l00674"></a>00674 <a class="code" href="users_8cpp.html#kill_5Flink_5Fsilent_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29">kill_link_silent</a>(user,reason);
+<a name="l00675"></a>00675 <span class="keywordflow">return</span>;
+<a name="l00676"></a>00676 }
+<a name="l00677"></a>00677 r = <a class="code" href="xline_8h.html#matches_5Fkline_28const_20char_20_2Ahost_29">matches_kline</a>(user-&gt;<a class="code" href="classconnection.html#host_5B_31_36_30_5D">host</a>);
+<a name="l00678"></a>00678 <span class="keywordflow">if</span> (r)
+<a name="l00679"></a>00679 {
+<a name="l00680"></a>00680 <span class="keywordtype">char</span> reason[MAXBUF];
+<a name="l00681"></a>00681 snprintf(reason,MAXBUF,<span class="stringliteral">"K-Lined: %s"</span>,r);
+<a name="l00682"></a>00682 <a class="code" href="users_8cpp.html#kill_5Flink_5Fsilent_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29">kill_link_silent</a>(user,reason);
+<a name="l00683"></a>00683 <span class="keywordflow">return</span>;
+<a name="l00684"></a>00684 }
+<a name="l00685"></a>00685 }
+<a name="l00686"></a>00686
+<a name="l00687"></a>00687
+<a name="l00688"></a>00688 <a class="code" href="globals_8h.html#WriteServ_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteServ</a>(user-&gt;<a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">"NOTICE Auth :Welcome to \002%s\002!"</span>,<a class="code" href="channels_8cpp.html#Config">Config</a>-&gt;<a class="code" href="classServerConfig.html#Network_5BMAXBUF_5D">Network</a>);
+<a name="l00689"></a>00689 <a class="code" href="globals_8h.html#WriteServ_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteServ</a>(user-&gt;<a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">"001 %s :Welcome to the %s IRC Network %s!%s@%s"</span>,user-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>,<a class="code" href="channels_8cpp.html#Config">Config</a>-&gt;<a class="code" href="classServerConfig.html#Network_5BMAXBUF_5D">Network</a>,user-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>,user-&gt;<a class="code" href="classuserrec.html#ident_5BIDENTMAX_2B_32_5D">ident</a>,user-&gt;<a class="code" href="classconnection.html#host_5B_31_36_30_5D">host</a>);
+<a name="l00690"></a>00690 <a class="code" href="globals_8h.html#WriteServ_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteServ</a>(user-&gt;<a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">"002 %s :Your host is %s, running version %s"</span>,user-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>,<a class="code" href="channels_8cpp.html#Config">Config</a>-&gt;<a class="code" href="classServerConfig.html#ServerName_5BMAXBUF_5D">ServerName</a>,VERSION);
+<a name="l00691"></a>00691 <a class="code" href="globals_8h.html#WriteServ_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteServ</a>(user-&gt;<a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">"003 %s :This server was created %s %s"</span>,user-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>,__TIME__,__DATE__);
+<a name="l00692"></a>00692 <a class="code" href="globals_8h.html#WriteServ_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteServ</a>(user-&gt;<a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">"004 %s %s %s iowghraAsORVSxNCWqBzvdHtGI lvhopsmntikrRcaqOALQbSeKVfHGCuzN"</span>,user-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>,<a class="code" href="channels_8cpp.html#Config">Config</a>-&gt;<a class="code" href="classServerConfig.html#ServerName_5BMAXBUF_5D">ServerName</a>,VERSION);
+<a name="l00693"></a>00693 <span class="comment">// the neatest way to construct the initial 005 numeric, considering the number of configure constants to go in it...</span>
+<a name="l00694"></a>00694 std::stringstream v;
+<a name="l00695"></a>00695 v &lt;&lt; <span class="stringliteral">"WALLCHOPS MODES=13 CHANTYPES=# PREFIX=(ohv)@%+ MAP SAFELIST MAXCHANNELS="</span> &lt;&lt; MAXCHANS;
+<a name="l00696"></a>00696 v &lt;&lt; <span class="stringliteral">" MAXBANS=60 NICKLEN="</span> &lt;&lt; NICKMAX;
+<a name="l00697"></a>00697 v &lt;&lt; <span class="stringliteral">" TOPICLEN="</span> &lt;&lt; MAXTOPIC &lt;&lt; <span class="stringliteral">" KICKLEN="</span> &lt;&lt; MAXKICK &lt;&lt; <span class="stringliteral">" MAXTARGETS=20 AWAYLEN="</span> &lt;&lt; MAXAWAY &lt;&lt; <span class="stringliteral">" CHANMODES=ohvb,k,l,psmnti NETWORK="</span>;
+<a name="l00698"></a>00698 v &lt;&lt; <a class="code" href="channels_8cpp.html#Config">Config</a>-&gt;<a class="code" href="classServerConfig.html#Network_5BMAXBUF_5D">Network</a>;
+<a name="l00699"></a>00699 <a class="code" href="namespaceirc.html#string">std::string</a> data005 = v.str();
+<a name="l00700"></a>00700 <a class="code" href="modules_8h.html#FOREACH_5FMOD">FOREACH_MOD</a> On005Numeric(data005);
+<a name="l00701"></a>00701 <span class="comment">// anfl @ #ratbox, efnet reminded me that according to the RFC this cant contain more than 13 tokens per line...</span>
+<a name="l00702"></a>00702 <span class="comment">// so i'd better split it :)</span>
+<a name="l00703"></a>00703 std::stringstream out(data005);
+<a name="l00704"></a>00704 <a class="code" href="namespaceirc.html#string">std::string</a> token = <span class="stringliteral">""</span>;
+<a name="l00705"></a>00705 <a class="code" href="namespaceirc.html#string">std::string</a> line5 = <span class="stringliteral">""</span>;
+<a name="l00706"></a>00706 <span class="keywordtype">int</span> token_counter = 0;
+<a name="l00707"></a>00707 <span class="keywordflow">while</span> (!out.eof())
+<a name="l00708"></a>00708 {
+<a name="l00709"></a>00709 out &gt;&gt; token;
+<a name="l00710"></a>00710 line5 = line5 + token + <span class="stringliteral">" "</span>;
+<a name="l00711"></a>00711 token_counter++;
+<a name="l00712"></a>00712 <span class="keywordflow">if</span> ((token_counter &gt;= 13) || (out.eof() == <span class="keyword">true</span>))
+<a name="l00713"></a>00713 {
+<a name="l00714"></a>00714 <a class="code" href="globals_8h.html#WriteServ_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteServ</a>(user-&gt;<a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">"005 %s %s:are supported by this server"</span>,user-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>,line5.c_str());
+<a name="l00715"></a>00715 line5 = <span class="stringliteral">""</span>;
+<a name="l00716"></a>00716 token_counter = 0;
+<a name="l00717"></a>00717 }
+<a name="l00718"></a>00718 }
+<a name="l00719"></a>00719 ShowMOTD(user);
+<a name="l00720"></a>00720
+<a name="l00721"></a>00721 <span class="comment">// fix 3 by brain, move registered = 7 below these so that spurious modes and host changes dont go out</span>
+<a name="l00722"></a>00722 <span class="comment">// onto the network and produce 'fake direction'</span>
+<a name="l00723"></a>00723 <a class="code" href="modules_8h.html#FOREACH_5FMOD">FOREACH_MOD</a> OnUserConnect(user);
+<a name="l00724"></a>00724 <a class="code" href="modules_8h.html#FOREACH_5FMOD">FOREACH_MOD</a> OnGlobalConnect(user);
+<a name="l00725"></a>00725 user-&gt;<a class="code" href="classconnection.html#registered">registered</a> = 7;
+<a name="l00726"></a>00726 <a class="code" href="globals_8h.html#WriteOpers_28char_20_2Atext_2C_2E_2E_2E_29">WriteOpers</a>(<span class="stringliteral">"*** Client connecting on port %lu: %s!%s@%s [%s]"</span>,(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>)user-&gt;<a class="code" href="classconnection.html#port">port</a>,user-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>,user-&gt;<a class="code" href="classuserrec.html#ident_5BIDENTMAX_2B_32_5D">ident</a>,user-&gt;<a class="code" href="classconnection.html#host_5B_31_36_30_5D">host</a>,user-&gt;<a class="code" href="classconnection.html#ip_5B_31_36_5D">ip</a>);
+<a name="l00727"></a>00727 }
+</pre></div>
+<p>
+ </td>
+ </tr>
+</table>
+<a class="anchor" name="kill_5Flink_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29"></a><!-- doxytag: member="users.h::kill_link" ref="kill_5Flink_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29" args="(userrec *user, const char *r)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top">void kill_link </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>user</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td class="md"></td>
+ <td class="md" nowrap>const char *&nbsp;</td>
+ <td class="mdname" nowrap> <em>r</em></td>
+ </tr>
+ <tr>
+ <td class="md"></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="users_8cpp-source.html#l00349">349</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
+<p>
+References <a class="el" href="users_8cpp-source.html#l00471">AddWhoWas()</a>, <a class="el" href="modules_8cpp.html#clientlist">clientlist</a>, <a class="el" href="users_8cpp-source.html#l00093">userrec::CloseSocket()</a>, <a class="el" href="inspircd__io_8h-source.html#l00029">DEBUG</a>, <a class="el" href="socketengine_8cpp-source.html#l00103">SocketEngine::DelFd()</a>, <a class="el" href="connection_8h-source.html#l00042">connection::fd</a>, <a class="el" href="users_8cpp-source.html#l00295">userrec::FlushWriteBuf()</a>, <a class="el" href="modules_8h-source.html#l00082">FOREACH_MOD</a>, <a class="el" href="classServerConfig.html#GetIOHook_28int_20port_29">ServerConfig::GetIOHook()</a>, <a class="el" href="connection_8h-source.html#l00046">connection::host</a>, <a class="el" href="users_8h-source.html#l00133">userrec::ident</a>, <a class="el" href="users_8cpp-source.html#l00052">local_users</a>, <a class="el" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log()</a>, <a class="el" href="users_8h-source.html#l00128">userrec::nick</a>, <a class="el" href="modules_8cpp-source.html#l00270">Module::OnRawSocketClose()</a>, <a class="el" href="connection_8h-source.html#l00076">connection::port</a>, <a class="el" href="connection_8h-source.html#l00080">connection::registered</a>, <a class="el" href="inspircd_8h-source.html#l00111">InspIRCd::SE</a>, <a class="el" href="globals_8h.html#Write_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">Write()</a>, <a class="el" href="globals_8h.html#WriteCommonExcept_28userrec_20_2Au_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteCommonExcept()</a>, and <a class="el" href="globals_8h.html#WriteOpers_28char_20_2Atext_2C_2E_2E_2E_29">WriteOpers()</a>.
+<p>
+Referenced by <a class="el" href="users_8cpp-source.html#l00524">AddClient()</a>, <a class="el" href="users_8cpp-source.html#l00769">force_nickchange()</a>, <a class="el" href="users_8cpp-source.html#l00647">FullConnectUser()</a>, <a class="el" href="modules_8cpp-source.html#l00609">Server::PseudoToUser()</a>, and <a class="el" href="modules_8cpp-source.html#l00390">Server::QuitUser()</a>.<div class="fragment"><pre class="fragment"><a name="l00350"></a>00350 {
+<a name="l00351"></a>00351 user_hash::iterator iter = <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>.find(user-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>);
+<a name="l00352"></a>00352
+<a name="l00353"></a>00353 <span class="keywordtype">char</span> reason[MAXBUF];
+<a name="l00354"></a>00354
+<a name="l00355"></a>00355 strncpy(reason,r,MAXBUF);
+<a name="l00356"></a>00356
+<a name="l00357"></a>00357 <span class="keywordflow">if</span> (strlen(reason)&gt;MAXQUIT)
+<a name="l00358"></a>00358 {
+<a name="l00359"></a>00359 reason[MAXQUIT-1] = <span class="charliteral">'\0'</span>;
+<a name="l00360"></a>00360 }
+<a name="l00361"></a>00361
+<a name="l00362"></a>00362 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"kill_link: %s '%s'"</span>,user-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>,reason);
+<a name="l00363"></a>00363 <a class="code" href="globals_8h.html#Write_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">Write</a>(user-&gt;<a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">"ERROR :Closing link (%s@%s) [%s]"</span>,user-&gt;<a class="code" href="classuserrec.html#ident_5BIDENTMAX_2B_32_5D">ident</a>,user-&gt;<a class="code" href="classconnection.html#host_5B_31_36_30_5D">host</a>,reason);
+<a name="l00364"></a>00364 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"closing fd %lu"</span>,(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>)user-&gt;<a class="code" href="classconnection.html#fd">fd</a>);
+<a name="l00365"></a>00365
+<a name="l00366"></a>00366 <span class="keywordflow">if</span> (user-&gt;<a class="code" href="classconnection.html#registered">registered</a> == 7) {
+<a name="l00367"></a>00367 <a class="code" href="modules_8h.html#FOREACH_5FMOD">FOREACH_MOD</a> OnUserQuit(user,reason);
+<a name="l00368"></a>00368 <a class="code" href="globals_8h.html#WriteCommonExcept_28userrec_20_2Au_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteCommonExcept</a>(user,<span class="stringliteral">"QUIT :%s"</span>,reason);
+<a name="l00369"></a>00369 }
+<a name="l00370"></a>00370
+<a name="l00371"></a>00371 user-&gt;<a class="code" href="classuserrec.html#FlushWriteBuf_28_29">FlushWriteBuf</a>();
+<a name="l00372"></a>00372
+<a name="l00373"></a>00373 <a class="code" href="modules_8h.html#FOREACH_5FMOD">FOREACH_MOD</a> OnUserDisconnect(user);
+<a name="l00374"></a>00374
+<a name="l00375"></a>00375 <span class="keywordflow">if</span> (user-&gt;<a class="code" href="classconnection.html#fd">fd</a> &gt; -1)
+<a name="l00376"></a>00376 {
+<a name="l00377"></a>00377 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#Config">Config</a>-&gt;<a class="code" href="classServerConfig.html#GetIOHook_28int_20port_29">GetIOHook</a>(user-&gt;<a class="code" href="classconnection.html#port">port</a>))
+<a name="l00378"></a>00378 {
+<a name="l00379"></a>00379 <a class="code" href="channels_8cpp.html#Config">Config</a>-&gt;<a class="code" href="classServerConfig.html#GetIOHook_28int_20port_29">GetIOHook</a>(user-&gt;<a class="code" href="classconnection.html#port">port</a>)-&gt;<a class="code" href="classModule.html#OnRawSocketClose_28int_20fd_29">OnRawSocketClose</a>(user-&gt;<a class="code" href="classconnection.html#fd">fd</a>);
+<a name="l00380"></a>00380 }
+<a name="l00381"></a>00381 <a class="code" href="modules_8cpp.html#ServerInstance">ServerInstance</a>-&gt;<a class="code" href="classInspIRCd.html#SE">SE</a>-&gt;<a class="code" href="classSocketEngine.html#DelFd_28int_20fd_29">DelFd</a>(user-&gt;<a class="code" href="classconnection.html#fd">fd</a>);
+<a name="l00382"></a>00382 user-&gt;<a class="code" href="classuserrec.html#CloseSocket_28_29">CloseSocket</a>();
+<a name="l00383"></a>00383 }
+<a name="l00384"></a>00384
+<a name="l00385"></a>00385 <span class="comment">// this must come before the WriteOpers so that it doesnt try to fill their buffer with anything</span>
+<a name="l00386"></a>00386 <span class="comment">// if they were an oper with +s.</span>
+<a name="l00387"></a>00387 <span class="keywordflow">if</span> (user-&gt;<a class="code" href="classconnection.html#registered">registered</a> == 7) {
+<a name="l00388"></a>00388 purge_empty_chans(user);
+<a name="l00389"></a>00389 <span class="comment">// fix by brain: only show local quits because we only show local connects (it just makes SENSE)</span>
+<a name="l00390"></a>00390 <span class="keywordflow">if</span> (user-&gt;<a class="code" href="classconnection.html#fd">fd</a> &gt; -1)
+<a name="l00391"></a>00391 <a class="code" href="globals_8h.html#WriteOpers_28char_20_2Atext_2C_2E_2E_2E_29">WriteOpers</a>(<span class="stringliteral">"*** Client exiting: %s!%s@%s [%s]"</span>,user-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>,user-&gt;<a class="code" href="classuserrec.html#ident_5BIDENTMAX_2B_32_5D">ident</a>,user-&gt;<a class="code" href="classconnection.html#host_5B_31_36_30_5D">host</a>,reason);
+<a name="l00392"></a>00392 <a class="code" href="users_8cpp.html#AddWhoWas_28userrec_20_2Au_29">AddWhoWas</a>(user);
+<a name="l00393"></a>00393 }
+<a name="l00394"></a>00394
+<a name="l00395"></a>00395 <span class="keywordflow">if</span> (iter != <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>.end())
+<a name="l00396"></a>00396 {
+<a name="l00397"></a>00397 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"deleting user hash value %lu"</span>,(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>)user);
+<a name="l00398"></a>00398 <span class="keywordflow">if</span> (user-&gt;<a class="code" href="classconnection.html#fd">fd</a> &gt; -1)
+<a name="l00399"></a>00399 {
+<a name="l00400"></a>00400 <a class="code" href="modules_8cpp.html#fd_5Fref_5Ftable_5B_36_35_35_33_36_5D">fd_ref_table</a>[user-&gt;<a class="code" href="classconnection.html#fd">fd</a>] = NULL;
+<a name="l00401"></a>00401 <span class="keywordflow">if</span> (find(<a class="code" href="users_8cpp.html#local_5Fusers">local_users</a>.begin(),<a class="code" href="users_8cpp.html#local_5Fusers">local_users</a>.end(),user) != <a class="code" href="users_8cpp.html#local_5Fusers">local_users</a>.end())
+<a name="l00402"></a>00402 {
+<a name="l00403"></a>00403 <a class="code" href="users_8cpp.html#local_5Fusers">local_users</a>.erase(find(<a class="code" href="users_8cpp.html#local_5Fusers">local_users</a>.begin(),<a class="code" href="users_8cpp.html#local_5Fusers">local_users</a>.end(),user));
+<a name="l00404"></a>00404 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"Delete local user"</span>);
+<a name="l00405"></a>00405 }
+<a name="l00406"></a>00406 }
+<a name="l00407"></a>00407 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>.erase(iter);
+<a name="l00408"></a>00408 }
+<a name="l00409"></a>00409 <span class="keyword">delete</span> user;
+<a name="l00410"></a>00410 }
+</pre></div>
+<p>
+ </td>
+ </tr>
+</table>
+<a class="anchor" name="kill_5Flink_5Fsilent_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29"></a><!-- doxytag: member="users.h::kill_link_silent" ref="kill_5Flink_5Fsilent_28userrec_20_2Auser_2C_20const_20char_20_2Ar_29" args="(userrec *user, const char *r)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top">void kill_link_silent </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a> *&nbsp;</td>
+ <td class="mdname" nowrap> <em>user</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td class="md"></td>
+ <td class="md" nowrap>const char *&nbsp;</td>
+ <td class="mdname" nowrap> <em>r</em></td>
+ </tr>
+ <tr>
+ <td class="md"></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="users_8cpp-source.html#l00412">412</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
+<p>
+References <a class="el" href="modules_8cpp.html#clientlist">clientlist</a>, <a class="el" href="users_8cpp-source.html#l00093">userrec::CloseSocket()</a>, <a class="el" href="inspircd__io_8h-source.html#l00029">DEBUG</a>, <a class="el" href="socketengine_8cpp-source.html#l00103">SocketEngine::DelFd()</a>, <a class="el" href="connection_8h-source.html#l00042">connection::fd</a>, <a class="el" href="users_8cpp-source.html#l00295">userrec::FlushWriteBuf()</a>, <a class="el" href="modules_8h-source.html#l00082">FOREACH_MOD</a>, <a class="el" href="classServerConfig.html#GetIOHook_28int_20port_29">ServerConfig::GetIOHook()</a>, <a class="el" href="connection_8h-source.html#l00046">connection::host</a>, <a class="el" href="users_8h-source.html#l00133">userrec::ident</a>, <a class="el" href="users_8cpp-source.html#l00052">local_users</a>, <a class="el" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log()</a>, <a class="el" href="users_8h-source.html#l00128">userrec::nick</a>, <a class="el" href="modules_8cpp-source.html#l00270">Module::OnRawSocketClose()</a>, <a class="el" href="connection_8h-source.html#l00076">connection::port</a>, <a class="el" href="connection_8h-source.html#l00080">connection::registered</a>, <a class="el" href="inspircd_8h-source.html#l00111">InspIRCd::SE</a>, <a class="el" href="globals_8h.html#Write_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">Write()</a>, and <a class="el" href="globals_8h.html#WriteCommonExcept_28userrec_20_2Au_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteCommonExcept()</a>.
+<p>
+Referenced by <a class="el" href="users_8cpp-source.html#l00647">FullConnectUser()</a>.<div class="fragment"><pre class="fragment"><a name="l00413"></a>00413 {
+<a name="l00414"></a>00414 user_hash::iterator iter = <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>.find(user-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>);
+<a name="l00415"></a>00415
+<a name="l00416"></a>00416 <span class="keywordtype">char</span> reason[MAXBUF];
+<a name="l00417"></a>00417
+<a name="l00418"></a>00418 strncpy(reason,r,MAXBUF);
+<a name="l00419"></a>00419
+<a name="l00420"></a>00420 <span class="keywordflow">if</span> (strlen(reason)&gt;MAXQUIT)
+<a name="l00421"></a>00421 {
+<a name="l00422"></a>00422 reason[MAXQUIT-1] = <span class="charliteral">'\0'</span>;
+<a name="l00423"></a>00423 }
+<a name="l00424"></a>00424
+<a name="l00425"></a>00425 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"kill_link: %s '%s'"</span>,user-&gt;<a class="code" href="classuserrec.html#nick_5BNICKMAX_5D">nick</a>,reason);
+<a name="l00426"></a>00426 <a class="code" href="globals_8h.html#Write_28int_20sock_2C_20char_20_2Atext_2C_2E_2E_2E_29">Write</a>(user-&gt;<a class="code" href="classconnection.html#fd">fd</a>,<span class="stringliteral">"ERROR :Closing link (%s@%s) [%s]"</span>,user-&gt;<a class="code" href="classuserrec.html#ident_5BIDENTMAX_2B_32_5D">ident</a>,user-&gt;<a class="code" href="classconnection.html#host_5B_31_36_30_5D">host</a>,reason);
+<a name="l00427"></a>00427 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"closing fd %lu"</span>,(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>)user-&gt;<a class="code" href="classconnection.html#fd">fd</a>);
+<a name="l00428"></a>00428
+<a name="l00429"></a>00429 user-&gt;<a class="code" href="classuserrec.html#FlushWriteBuf_28_29">FlushWriteBuf</a>();
+<a name="l00430"></a>00430
+<a name="l00431"></a>00431 <span class="keywordflow">if</span> (user-&gt;<a class="code" href="classconnection.html#registered">registered</a> == 7) {
+<a name="l00432"></a>00432 <a class="code" href="modules_8h.html#FOREACH_5FMOD">FOREACH_MOD</a> OnUserQuit(user,reason);
+<a name="l00433"></a>00433 <a class="code" href="globals_8h.html#WriteCommonExcept_28userrec_20_2Au_2C_20char_20_2Atext_2C_2E_2E_2E_29">WriteCommonExcept</a>(user,<span class="stringliteral">"QUIT :%s"</span>,reason);
+<a name="l00434"></a>00434 }
+<a name="l00435"></a>00435
+<a name="l00436"></a>00436 <a class="code" href="modules_8h.html#FOREACH_5FMOD">FOREACH_MOD</a> OnUserDisconnect(user);
+<a name="l00437"></a>00437
+<a name="l00438"></a>00438 <span class="keywordflow">if</span> (user-&gt;<a class="code" href="classconnection.html#fd">fd</a> &gt; -1)
+<a name="l00439"></a>00439 {
+<a name="l00440"></a>00440 <span class="keywordflow">if</span> (<a class="code" href="channels_8cpp.html#Config">Config</a>-&gt;<a class="code" href="classServerConfig.html#GetIOHook_28int_20port_29">GetIOHook</a>(user-&gt;<a class="code" href="classconnection.html#port">port</a>))
+<a name="l00441"></a>00441 {
+<a name="l00442"></a>00442 <a class="code" href="channels_8cpp.html#Config">Config</a>-&gt;<a class="code" href="classServerConfig.html#GetIOHook_28int_20port_29">GetIOHook</a>(user-&gt;<a class="code" href="classconnection.html#port">port</a>)-&gt;<a class="code" href="classModule.html#OnRawSocketClose_28int_20fd_29">OnRawSocketClose</a>(user-&gt;<a class="code" href="classconnection.html#fd">fd</a>);
+<a name="l00443"></a>00443 }
+<a name="l00444"></a>00444 <a class="code" href="modules_8cpp.html#ServerInstance">ServerInstance</a>-&gt;<a class="code" href="classInspIRCd.html#SE">SE</a>-&gt;<a class="code" href="classSocketEngine.html#DelFd_28int_20fd_29">DelFd</a>(user-&gt;<a class="code" href="classconnection.html#fd">fd</a>);
+<a name="l00445"></a>00445 user-&gt;<a class="code" href="classuserrec.html#CloseSocket_28_29">CloseSocket</a>();
+<a name="l00446"></a>00446 }
+<a name="l00447"></a>00447
+<a name="l00448"></a>00448 <span class="keywordflow">if</span> (user-&gt;<a class="code" href="classconnection.html#registered">registered</a> == 7) {
+<a name="l00449"></a>00449 purge_empty_chans(user);
+<a name="l00450"></a>00450 }
+<a name="l00451"></a>00451
+<a name="l00452"></a>00452 <span class="keywordflow">if</span> (iter != <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>.end())
+<a name="l00453"></a>00453 {
+<a name="l00454"></a>00454 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"deleting user hash value %lu"</span>,(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>)user);
+<a name="l00455"></a>00455 <span class="keywordflow">if</span> (user-&gt;<a class="code" href="classconnection.html#fd">fd</a> &gt; -1)
+<a name="l00456"></a>00456 {
+<a name="l00457"></a>00457 <a class="code" href="modules_8cpp.html#fd_5Fref_5Ftable_5B_36_35_35_33_36_5D">fd_ref_table</a>[user-&gt;<a class="code" href="classconnection.html#fd">fd</a>] = NULL;
+<a name="l00458"></a>00458 <span class="keywordflow">if</span> (find(<a class="code" href="users_8cpp.html#local_5Fusers">local_users</a>.begin(),<a class="code" href="users_8cpp.html#local_5Fusers">local_users</a>.end(),user) != <a class="code" href="users_8cpp.html#local_5Fusers">local_users</a>.end())
+<a name="l00459"></a>00459 {
+<a name="l00460"></a>00460 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"Delete local user"</span>);
+<a name="l00461"></a>00461 <a class="code" href="users_8cpp.html#local_5Fusers">local_users</a>.erase(find(<a class="code" href="users_8cpp.html#local_5Fusers">local_users</a>.begin(),<a class="code" href="users_8cpp.html#local_5Fusers">local_users</a>.end(),user));
+<a name="l00462"></a>00462 }
+<a name="l00463"></a>00463 }
+<a name="l00464"></a>00464 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>.erase(iter);
+<a name="l00465"></a>00465 }
+<a name="l00466"></a>00466 <span class="keyword">delete</span> user;
+<a name="l00467"></a>00467 }
+</pre></div>
+<p>
+ </td>
+ </tr>
+</table>
+<a class="anchor" name="ReHashNick_28char_20_2AOld_2C_20char_20_2ANew_29"></a><!-- doxytag: member="users.h::ReHashNick" ref="ReHashNick_28char_20_2AOld_2C_20char_20_2ANew_29" args="(char *Old, char *New)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"><a class="el" href="classuserrec.html">userrec</a>* ReHashNick </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">char *&nbsp;</td>
+ <td class="mdname" nowrap> <em>Old</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td class="md"></td>
+ <td class="md" nowrap>char *&nbsp;</td>
+ <td class="mdname" nowrap> <em>New</em></td>
+ </tr>
+ <tr>
+ <td class="md"></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="users_8cpp-source.html#l00743">743</a> of file <a class="el" href="users_8cpp-source.html">users.cpp</a>.
+<p>
+References <a class="el" href="modules_8cpp.html#clientlist">clientlist</a>, <a class="el" href="inspircd__io_8h-source.html#l00029">DEBUG</a>, and <a class="el" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log()</a>.<div class="fragment"><pre class="fragment"><a name="l00744"></a>00744 {
+<a name="l00745"></a>00745 <span class="comment">//user_hash::iterator newnick;</span>
+<a name="l00746"></a>00746 user_hash::iterator oldnick = <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>.find(Old);
+<a name="l00747"></a>00747
+<a name="l00748"></a>00748 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"ReHashNick: %s %s"</span>,Old,New);
+<a name="l00749"></a>00749
+<a name="l00750"></a>00750 <span class="keywordflow">if</span> (!strcasecmp(Old,New))
+<a name="l00751"></a>00751 {
+<a name="l00752"></a>00752 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"old nick is new nick, skipping"</span>);
+<a name="l00753"></a>00753 <span class="keywordflow">return</span> oldnick-&gt;second;
+<a name="l00754"></a>00754 }
+<a name="l00755"></a>00755
+<a name="l00756"></a>00756 <span class="keywordflow">if</span> (oldnick == <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>.end()) <span class="keywordflow">return</span> NULL; <span class="comment">/* doesnt exist */</span>
+<a name="l00757"></a>00757
+<a name="l00758"></a>00758 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"ReHashNick: Found hashed nick %s"</span>,Old);
+<a name="l00759"></a>00759
+<a name="l00760"></a>00760 <a class="code" href="classuserrec.html">userrec</a>* olduser = oldnick-&gt;second;
+<a name="l00761"></a>00761 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[New] = olduser;
+<a name="l00762"></a>00762 <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>.erase(oldnick);
+<a name="l00763"></a>00763
+<a name="l00764"></a>00764 <a class="code" href="globals_8h.html#log_28int_20level_2C_20char_20_2Atext_2C_2E_2E_2E_29">log</a>(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"ReHashNick: Nick rehashed as %s"</span>,New);
+<a name="l00765"></a>00765
+<a name="l00766"></a>00766 <span class="keywordflow">return</span> <a class="code" href="modules_8cpp.html#clientlist">clientlist</a>[New];
+<a name="l00767"></a>00767 }
+</pre></div>
+<p>
+ </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 15 11:14:17 2005 for InspIRCd by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Mon Dec 19 18:02:14 2005 for InspIRCd by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4-20050815 </small></address>
</body>