+<a name="a9" doxytag="ConfigReader::DumpErrors"></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void ConfigReader::DumpErrors </td>
+ <td class="md" valign="top">( </td>
+ <td class="md" nowrap valign="top">bool </td>
+ <td class="mdname" nowrap> <em>bail</em>, </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="classuserrec.html">userrec</a> * </td>
+ <td class="mdname" nowrap> <em>user</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">) </td>
+ <td class="md" colspan="2"></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+
+ </td>
+ <td>
+
+<p>
+Dumps the list of errors in a config file to an output location.
+<p>
+If bail is true, then the program will abort. If bail is false and user points to a valid user record, the error report will be spooled to the given user by means of NOTICE. if bool is false AND user is false, the error report will be spooled to all opers by means of a NOTICE to all opers.
+<p>
+Definition at line <a class="el" href="modules_8cpp-source.html#l00772">772</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>.
+<p>
+References <a class="el" href="modules_8h-source.html#l00799">errorlog</a>, <a class="el" href="connection_8h-source.html#l00178">connection::fd</a>, and <a class="el" href="users_8h-source.html#l00106">userrec::nick</a>.
+<p>
+<div class="fragment"><pre>00773 {
+00774 <span class="keywordflow">if</span> (bail)
+00775 {
+00776 printf(<span class="stringliteral">"There were errors in your configuration:\n%s"</span>,<a class="code" href="classConfigReader.html#p1">errorlog</a>->str().c_str());
+00777 exit(0);
+00778 }
+00779 <span class="keywordflow">else</span>
+00780 {
+00781 <span class="keywordtype">char</span> dataline[1024];
+00782 <span class="keywordflow">if</span> (user)
+00783 {
+00784 WriteServ(user-><a class="code" href="classconnection.html#o0">fd</a>,<span class="stringliteral">"NOTICE %s :There were errors in the configuration file:"</span>,user-><a class="code" href="classuserrec.html#o0">nick</a>);
+00785 <span class="keywordflow">while</span> (!<a class="code" href="classConfigReader.html#p1">errorlog</a>->eof())
+00786 {
+00787 <a class="code" href="classConfigReader.html#p1">errorlog</a>->getline(dataline,1024);
+00788 WriteServ(user-><a class="code" href="classconnection.html#o0">fd</a>,<span class="stringliteral">"NOTICE %s :%s"</span>,user-><a class="code" href="classuserrec.html#o0">nick</a>,dataline);
+00789 }
+00790 }
+00791 <span class="keywordflow">else</span>
+00792 {
+00793 WriteOpers(<span class="stringliteral">"There were errors in the configuration file:"</span>,user-><a class="code" href="classuserrec.html#o0">nick</a>);
+00794 <span class="keywordflow">while</span> (!<a class="code" href="classConfigReader.html#p1">errorlog</a>->eof())
+00795 {
+00796 <a class="code" href="classConfigReader.html#p1">errorlog</a>->getline(dataline,1024);
+00797 WriteOpers(dataline);
+00798 }
+00799 }
+00800 <span class="keywordflow">return</span>;
+00801 }
+00802 }
+</pre></div> </td>
+ </tr>
+</table>