diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-30 05:23:22 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-30 05:23:22 +0000 |
commit | 956328e80741c88cdae6d98b07be4171c98f4e26 (patch) | |
tree | ad61830f2cc82fa0cc2e20294ed3416f3abf12ae /docs/module-doc/classConfigReader.html | |
parent | 02c18fcb826e63ce7c654d44e9f0afe1eafa7a64 (diff) |
Added docs for base: BoolSet
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1565 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'docs/module-doc/classConfigReader.html')
-rw-r--r-- | docs/module-doc/classConfigReader.html | 279 |
1 files changed, 140 insertions, 139 deletions
diff --git a/docs/module-doc/classConfigReader.html b/docs/module-doc/classConfigReader.html index afb91f03a..8c0b0a5f1 100644 --- a/docs/module-doc/classConfigReader.html +++ b/docs/module-doc/classConfigReader.html @@ -103,17 +103,18 @@ Default constructor. <p> This constructor initialises the ConfigReader class to read the inspircd.conf file as specified when running ./configure. <p> -Definition at line <a class="el" href="modules_8cpp-source.html#l00819">819</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. -<p> -References <a class="el" href="modules_8h-source.html#l01158">cache</a>, <a class="el" href="modules_8h-source.html#l01141">CONF_FILE_NOT_FOUND</a>, <a class="el" href="modules_8h-source.html#l01163">error</a>, <a class="el" href="modules_8h-source.html#l01159">errorlog</a>, and <a class="el" href="modules_8h-source.html#l01162">readerror</a>. -<p> -<div class="fragment"><pre>00820 { -00821 this-><a class="code" href="classConfigReader.html#p0">cache</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out); -00822 this-><a class="code" href="classConfigReader.html#p1">errorlog</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out); -00823 this-><a class="code" href="classConfigReader.html#p2">readerror</a> = LoadConf(CONFIG_FILE,this->cache,this->errorlog); -00824 <span class="keywordflow">if</span> (!this-><a class="code" href="classConfigReader.html#p2">readerror</a>) -00825 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a30">CONF_FILE_NOT_FOUND</a>; -00826 } +Definition at line <a class="el" href="modules_8cpp-source.html#l00821">821</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. +<p> +References <a class="el" href="modules_8h-source.html#l01158">cache</a>, <a class="el" href="modules_8h-source.html#l01141">CONF_FILE_NOT_FOUND</a>, <a class="el" href="modules_8h-source.html#l01163">error</a>, <a class="el" href="modules_8h-source.html#l01159">errorlog</a>, <a class="el" href="modules_8cpp-source.html#l00075">include_stack</a>, and <a class="el" href="modules_8h-source.html#l01162">readerror</a>. +<p> +<div class="fragment"><pre>00822 { +00823 <a class="code" href="modules_8cpp.html#a3">include_stack</a>.clear(); +00824 this-><a class="code" href="classConfigReader.html#p0">cache</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out); +00825 this-><a class="code" href="classConfigReader.html#p1">errorlog</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out); +00826 this-><a class="code" href="classConfigReader.html#p2">readerror</a> = LoadConf(CONFIG_FILE,this->cache,this->errorlog); +00827 <span class="keywordflow">if</span> (!this-><a class="code" href="classConfigReader.html#p2">readerror</a>) +00828 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a30">CONF_FILE_NOT_FOUND</a>; +00829 } </pre></div> </td> </tr> </table> @@ -147,17 +148,17 @@ Overloaded constructor. <p> This constructor initialises the ConfigReader class to read a user-specified config file <p> -Definition at line <a class="el" href="modules_8cpp-source.html#l00838">838</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. +Definition at line <a class="el" href="modules_8cpp-source.html#l00841">841</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> References <a class="el" href="modules_8h-source.html#l01158">cache</a>, <a class="el" href="modules_8h-source.html#l01141">CONF_FILE_NOT_FOUND</a>, <a class="el" href="modules_8h-source.html#l01163">error</a>, <a class="el" href="modules_8h-source.html#l01159">errorlog</a>, and <a class="el" href="modules_8h-source.html#l01162">readerror</a>. <p> -<div class="fragment"><pre>00839 { -00840 this-><a class="code" href="classConfigReader.html#p0">cache</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out); -00841 this-><a class="code" href="classConfigReader.html#p1">errorlog</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out); -00842 this-><a class="code" href="classConfigReader.html#p2">readerror</a> = LoadConf(filename.c_str(),this-><a class="code" href="classConfigReader.html#p0">cache</a>,this-><a class="code" href="classConfigReader.html#p1">errorlog</a>); -00843 <span class="keywordflow">if</span> (!this-><a class="code" href="classConfigReader.html#p2">readerror</a>) -00844 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a30">CONF_FILE_NOT_FOUND</a>; -00845 }; +<div class="fragment"><pre>00842 { +00843 this-><a class="code" href="classConfigReader.html#p0">cache</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out); +00844 this-><a class="code" href="classConfigReader.html#p1">errorlog</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out); +00845 this-><a class="code" href="classConfigReader.html#p2">readerror</a> = LoadConf(filename.c_str(),this-><a class="code" href="classConfigReader.html#p0">cache</a>,this-><a class="code" href="classConfigReader.html#p1">errorlog</a>); +00846 <span class="keywordflow">if</span> (!this-><a class="code" href="classConfigReader.html#p2">readerror</a>) +00847 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a30">CONF_FILE_NOT_FOUND</a>; +00848 }; </pre></div> </td> </tr> </table> @@ -190,16 +191,16 @@ Default destructor. <p> This method destroys the ConfigReader class. <p> -Definition at line <a class="el" href="modules_8cpp-source.html#l00829">829</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. +Definition at line <a class="el" href="modules_8cpp-source.html#l00832">832</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> References <a class="el" href="modules_8h-source.html#l01158">cache</a>, and <a class="el" href="modules_8h-source.html#l01159">errorlog</a>. <p> -<div class="fragment"><pre>00830 { -00831 <span class="keywordflow">if</span> (this-><a class="code" href="classConfigReader.html#p0">cache</a>) -00832 <span class="keyword">delete</span> this-><a class="code" href="classConfigReader.html#p0">cache</a>; -00833 <span class="keywordflow">if</span> (this-><a class="code" href="classConfigReader.html#p1">errorlog</a>) -00834 <span class="keyword">delete</span> this-><a class="code" href="classConfigReader.html#p1">errorlog</a>; -00835 } +<div class="fragment"><pre>00833 { +00834 <span class="keywordflow">if</span> (this-><a class="code" href="classConfigReader.html#p0">cache</a>) +00835 <span class="keyword">delete</span> this-><a class="code" href="classConfigReader.html#p0">cache</a>; +00836 <span class="keywordflow">if</span> (this-><a class="code" href="classConfigReader.html#p1">errorlog</a>) +00837 <span class="keyword">delete</span> this-><a class="code" href="classConfigReader.html#p1">errorlog</a>; +00838 } </pre></div> </td> </tr> </table> @@ -243,40 +244,40 @@ 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#l00916">916</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. +Definition at line <a class="el" href="modules_8cpp-source.html#l00919">919</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> References <a class="el" href="modules_8h-source.html#l01159">errorlog</a>, <a class="el" href="connection_8h-source.html#l00301">connection::fd</a>, and <a class="el" href="users_8h-source.html#l00121">userrec::nick</a>. <p> -<div class="fragment"><pre>00917 { -00918 <span class="keywordflow">if</span> (bail) -00919 { -00920 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()); -00921 exit(0); -00922 } -00923 <span class="keywordflow">else</span> -00924 { -00925 <span class="keywordtype">char</span> dataline[1024]; -00926 <span class="keywordflow">if</span> (user) -00927 { -00928 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>); -00929 <span class="keywordflow">while</span> (!<a class="code" href="classConfigReader.html#p1">errorlog</a>->eof()) -00930 { -00931 <a class="code" href="classConfigReader.html#p1">errorlog</a>->getline(dataline,1024); -00932 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); -00933 } -00934 } -00935 <span class="keywordflow">else</span> -00936 { -00937 WriteOpers(<span class="stringliteral">"There were errors in the configuration file:"</span>,user-><a class="code" href="classuserrec.html#o0">nick</a>); -00938 <span class="keywordflow">while</span> (!<a class="code" href="classConfigReader.html#p1">errorlog</a>->eof()) -00939 { -00940 <a class="code" href="classConfigReader.html#p1">errorlog</a>->getline(dataline,1024); -00941 WriteOpers(dataline); -00942 } -00943 } -00944 <span class="keywordflow">return</span>; -00945 } -00946 } +<div class="fragment"><pre>00920 { +00921 <span class="keywordflow">if</span> (bail) +00922 { +00923 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()); +00924 exit(0); +00925 } +00926 <span class="keywordflow">else</span> +00927 { +00928 <span class="keywordtype">char</span> dataline[1024]; +00929 <span class="keywordflow">if</span> (user) +00930 { +00931 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>); +00932 <span class="keywordflow">while</span> (!<a class="code" href="classConfigReader.html#p1">errorlog</a>->eof()) +00933 { +00934 <a class="code" href="classConfigReader.html#p1">errorlog</a>->getline(dataline,1024); +00935 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); +00936 } +00937 } +00938 <span class="keywordflow">else</span> +00939 { +00940 WriteOpers(<span class="stringliteral">"There were errors in the configuration file:"</span>,user-><a class="code" href="classuserrec.html#o0">nick</a>); +00941 <span class="keywordflow">while</span> (!<a class="code" href="classConfigReader.html#p1">errorlog</a>->eof()) +00942 { +00943 <a class="code" href="classConfigReader.html#p1">errorlog</a>->getline(dataline,1024); +00944 WriteOpers(dataline); +00945 } +00946 } +00947 <span class="keywordflow">return</span>; +00948 } +00949 } </pre></div> </td> </tr> </table> @@ -310,13 +311,13 @@ Counts the number of times a given tag appears in the config file. <p> This method counts the number of times a tag appears in a config file, for use where there are several tags of the same kind, e.g. with opers and connect types. It can be used with the index value of <a class="el" href="classConfigReader.html#a3">ConfigReader::ReadValue</a> to loop through all copies of a multiple instance tag. <p> -Definition at line <a class="el" href="modules_8cpp-source.html#l00949">949</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. +Definition at line <a class="el" href="modules_8cpp-source.html#l00952">952</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> References <a class="el" href="modules_8h-source.html#l01158">cache</a>. <p> -<div class="fragment"><pre>00950 { -00951 <span class="keywordflow">return</span> EnumConf(cache,tag.c_str()); -00952 } +<div class="fragment"><pre>00953 { +00954 <span class="keywordflow">return</span> EnumConf(cache,tag.c_str()); +00955 } </pre></div> </td> </tr> </table> @@ -359,13 +360,13 @@ Returns the number of items within a tag. <p> For example if the tag was <test tag="blah" data="foo"> then this function would return 2. Spaces and newlines both qualify as valid seperators between values. <p> -Definition at line <a class="el" href="modules_8cpp-source.html#l00954">954</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. +Definition at line <a class="el" href="modules_8cpp-source.html#l00957">957</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> References <a class="el" href="modules_8h-source.html#l01158">cache</a>. <p> -<div class="fragment"><pre>00955 { -00956 <span class="keywordflow">return</span> EnumValues(cache, tag.c_str(), index); -00957 } +<div class="fragment"><pre>00958 { +00959 <span class="keywordflow">return</span> EnumValues(cache, tag.c_str(), index); +00960 } </pre></div> </td> </tr> </table> @@ -398,15 +399,15 @@ Returns the last error to occur. <p> Valid errors can be found by looking in <a class="el" href="modules_8h.html">modules.h</a>. Any nonzero value indicates an error condition. A call to <a class="el" href="classConfigReader.html#a6">GetError()</a> resets the error flag back to 0. <p> -Definition at line <a class="el" href="modules_8cpp-source.html#l00909">909</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. +Definition at line <a class="el" href="modules_8cpp-source.html#l00912">912</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> References <a class="el" href="modules_8h-source.html#l01163">error</a>. <p> -<div class="fragment"><pre>00910 { -00911 <span class="keywordtype">long</span> olderr = this-><a class="code" href="classConfigReader.html#p3">error</a>; -00912 this->error = 0; -00913 <span class="keywordflow">return</span> olderr; -00914 } +<div class="fragment"><pre>00913 { +00914 <span class="keywordtype">long</span> olderr = this-><a class="code" href="classConfigReader.html#p3">error</a>; +00915 this->error = 0; +00916 <span class="keywordflow">return</span> olderr; +00917 } </pre></div> </td> </tr> </table> @@ -455,25 +456,25 @@ Retrieves a boolean value from the config file. <p> This method retrieves a boolean value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve. The values "1", "yes" and "true" in the config file count as true to ReadFlag, and any other value counts as false. <p> -Definition at line <a class="el" href="modules_8cpp-source.html#l00863">863</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. +Definition at line <a class="el" href="modules_8cpp-source.html#l00866">866</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> References <a class="el" href="modules_8h-source.html#l01158">cache</a>, <a class="el" href="modules_8h-source.html#l01140">CONF_VALUE_NOT_FOUND</a>, and <a class="el" href="modules_8h-source.html#l01163">error</a>. <p> -<div class="fragment"><pre>00864 { -00865 <span class="keywordtype">char</span> val[MAXBUF]; -00866 <span class="keywordtype">char</span> t[MAXBUF]; -00867 <span class="keywordtype">char</span> n[MAXBUF]; -00868 strlcpy(t,tag.c_str(),MAXBUF); -00869 strlcpy(n,name.c_str(),MAXBUF); -00870 <span class="keywordtype">int</span> res = ReadConf(cache,t,n,index,val); -00871 <span class="keywordflow">if</span> (!res) -00872 { -00873 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a29">CONF_VALUE_NOT_FOUND</a>; -00874 <span class="keywordflow">return</span> <span class="keyword">false</span>; -00875 } -00876 std::string s = val; -00877 <span class="keywordflow">return</span> ((s == <span class="stringliteral">"yes"</span>) || (s == <span class="stringliteral">"YES"</span>) || (s == <span class="stringliteral">"true"</span>) || (s == <span class="stringliteral">"TRUE"</span>) || (s == <span class="stringliteral">"1"</span>)); -00878 } +<div class="fragment"><pre>00867 { +00868 <span class="keywordtype">char</span> val[MAXBUF]; +00869 <span class="keywordtype">char</span> t[MAXBUF]; +00870 <span class="keywordtype">char</span> n[MAXBUF]; +00871 strlcpy(t,tag.c_str(),MAXBUF); +00872 strlcpy(n,name.c_str(),MAXBUF); +00873 <span class="keywordtype">int</span> res = ReadConf(cache,t,n,index,val); +00874 <span class="keywordflow">if</span> (!res) +00875 { +00876 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a29">CONF_VALUE_NOT_FOUND</a>; +00877 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00878 } +00879 std::string s = val; +00880 <span class="keywordflow">return</span> ((s == <span class="stringliteral">"yes"</span>) || (s == <span class="stringliteral">"YES"</span>) || (s == <span class="stringliteral">"true"</span>) || (s == <span class="stringliteral">"TRUE"</span>) || (s == <span class="stringliteral">"1"</span>)); +00881 } </pre></div> </td> </tr> </table> @@ -528,37 +529,37 @@ Retrieves an integer value from the config file. <p> This method retrieves an integer value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve. Any invalid integer values in the tag will cause the objects error value to be set, and any call to <a class="el" href="classConfigReader.html#a6">GetError()</a> will return CONF_INVALID_NUMBER to be returned. needs_unsigned is set if the number must be unsigned. If a signed number is placed into a tag which is specified unsigned, 0 will be returned and <a class="el" href="classConfigReader.html#a6">GetError()</a> will return CONF_NOT_UNSIGNED <p> -Definition at line <a class="el" href="modules_8cpp-source.html#l00880">880</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. +Definition at line <a class="el" href="modules_8cpp-source.html#l00883">883</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> References <a class="el" href="modules_8h-source.html#l01158">cache</a>, <a class="el" href="modules_8h-source.html#l01138">CONF_NOT_A_NUMBER</a>, <a class="el" href="modules_8h-source.html#l01139">CONF_NOT_UNSIGNED</a>, <a class="el" href="modules_8h-source.html#l01140">CONF_VALUE_NOT_FOUND</a>, and <a class="el" href="modules_8h-source.html#l01163">error</a>. <p> -<div class="fragment"><pre>00881 { -00882 <span class="keywordtype">char</span> val[MAXBUF]; -00883 <span class="keywordtype">char</span> t[MAXBUF]; -00884 <span class="keywordtype">char</span> n[MAXBUF]; -00885 strlcpy(t,tag.c_str(),MAXBUF); -00886 strlcpy(n,name.c_str(),MAXBUF); -00887 <span class="keywordtype">int</span> res = ReadConf(cache,t,n,index,val); -00888 <span class="keywordflow">if</span> (!res) -00889 { -00890 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a29">CONF_VALUE_NOT_FOUND</a>; -00891 <span class="keywordflow">return</span> 0; -00892 } -00893 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < strlen(val); i++) -00894 { -00895 <span class="keywordflow">if</span> (!isdigit(val[i])) -00896 { -00897 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a27">CONF_NOT_A_NUMBER</a>; -00898 <span class="keywordflow">return</span> 0; -00899 } -00900 } -00901 <span class="keywordflow">if</span> ((needs_unsigned) && (atoi(val)<0)) -00902 { -00903 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a28">CONF_NOT_UNSIGNED</a>; -00904 <span class="keywordflow">return</span> 0; -00905 } -00906 <span class="keywordflow">return</span> atoi(val); -00907 } +<div class="fragment"><pre>00884 { +00885 <span class="keywordtype">char</span> val[MAXBUF]; +00886 <span class="keywordtype">char</span> t[MAXBUF]; +00887 <span class="keywordtype">char</span> n[MAXBUF]; +00888 strlcpy(t,tag.c_str(),MAXBUF); +00889 strlcpy(n,name.c_str(),MAXBUF); +00890 <span class="keywordtype">int</span> res = ReadConf(cache,t,n,index,val); +00891 <span class="keywordflow">if</span> (!res) +00892 { +00893 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a29">CONF_VALUE_NOT_FOUND</a>; +00894 <span class="keywordflow">return</span> 0; +00895 } +00896 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < strlen(val); i++) +00897 { +00898 <span class="keywordflow">if</span> (!isdigit(val[i])) +00899 { +00900 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a27">CONF_NOT_A_NUMBER</a>; +00901 <span class="keywordflow">return</span> 0; +00902 } +00903 } +00904 <span class="keywordflow">if</span> ((needs_unsigned) && (atoi(val)<0)) +00905 { +00906 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a28">CONF_NOT_UNSIGNED</a>; +00907 <span class="keywordflow">return</span> 0; +00908 } +00909 <span class="keywordflow">return</span> atoi(val); +00910 } </pre></div> </td> </tr> </table> @@ -607,24 +608,24 @@ Retrieves a value from the config file. <p> This method retrieves a value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve. <p> -Definition at line <a class="el" href="modules_8cpp-source.html#l00847">847</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. +Definition at line <a class="el" href="modules_8cpp-source.html#l00850">850</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> References <a class="el" href="modules_8h-source.html#l01158">cache</a>, <a class="el" href="modules_8h-source.html#l01140">CONF_VALUE_NOT_FOUND</a>, and <a class="el" href="modules_8h-source.html#l01163">error</a>. <p> -<div class="fragment"><pre>00848 { -00849 <span class="keywordtype">char</span> val[MAXBUF]; -00850 <span class="keywordtype">char</span> t[MAXBUF]; -00851 <span class="keywordtype">char</span> n[MAXBUF]; -00852 strlcpy(t,tag.c_str(),MAXBUF); -00853 strlcpy(n,name.c_str(),MAXBUF); -00854 <span class="keywordtype">int</span> res = ReadConf(cache,t,n,index,val); -00855 <span class="keywordflow">if</span> (!res) -00856 { -00857 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a29">CONF_VALUE_NOT_FOUND</a>; -00858 <span class="keywordflow">return</span> <span class="stringliteral">""</span>; -00859 } -00860 <span class="keywordflow">return</span> val; -00861 } +<div class="fragment"><pre>00851 { +00852 <span class="keywordtype">char</span> val[MAXBUF]; +00853 <span class="keywordtype">char</span> t[MAXBUF]; +00854 <span class="keywordtype">char</span> n[MAXBUF]; +00855 strlcpy(t,tag.c_str(),MAXBUF); +00856 strlcpy(n,name.c_str(),MAXBUF); +00857 <span class="keywordtype">int</span> res = ReadConf(cache,t,n,index,val); +00858 <span class="keywordflow">if</span> (!res) +00859 { +00860 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a29">CONF_VALUE_NOT_FOUND</a>; +00861 <span class="keywordflow">return</span> <span class="stringliteral">""</span>; +00862 } +00863 <span class="keywordflow">return</span> val; +00864 } </pre></div> </td> </tr> </table> @@ -657,13 +658,13 @@ Returns true if a config file is valid. <p> This method is partially implemented and will only return false if the config file does not exist or could not be opened. <p> -Definition at line <a class="el" href="modules_8cpp-source.html#l00959">959</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. +Definition at line <a class="el" href="modules_8cpp-source.html#l00962">962</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> References <a class="el" href="modules_8h-source.html#l01162">readerror</a>. <p> -<div class="fragment"><pre>00960 { -00961 <span class="keywordflow">return</span> this-><a class="code" href="classConfigReader.html#p2">readerror</a>; -00962 } +<div class="fragment"><pre>00963 { +00964 <span class="keywordflow">return</span> this-><a class="code" href="classConfigReader.html#p2">readerror</a>; +00965 } </pre></div> </td> </tr> </table> @@ -693,7 +694,7 @@ It will contain a pointer to the configuration file data with unneeded data (suc <p> Definition at line <a class="el" href="modules_8h-source.html#l01158">1158</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>. <p> -Referenced by <a class="el" href="modules_8cpp-source.html#l00819">ConfigReader()</a>, <a class="el" href="modules_8cpp-source.html#l00949">Enumerate()</a>, <a class="el" href="modules_8cpp-source.html#l00954">EnumerateValues()</a>, <a class="el" href="modules_8cpp-source.html#l00863">ReadFlag()</a>, <a class="el" href="modules_8cpp-source.html#l00880">ReadInteger()</a>, <a class="el" href="modules_8cpp-source.html#l00847">ReadValue()</a>, and <a class="el" href="modules_8cpp-source.html#l00829">~ConfigReader()</a>. </td> +Referenced by <a class="el" href="modules_8cpp-source.html#l00821">ConfigReader()</a>, <a class="el" href="modules_8cpp-source.html#l00952">Enumerate()</a>, <a class="el" href="modules_8cpp-source.html#l00957">EnumerateValues()</a>, <a class="el" href="modules_8cpp-source.html#l00866">ReadFlag()</a>, <a class="el" href="modules_8cpp-source.html#l00883">ReadInteger()</a>, <a class="el" href="modules_8cpp-source.html#l00850">ReadValue()</a>, and <a class="el" href="modules_8cpp-source.html#l00832">~ConfigReader()</a>. </td> </tr> </table> <a name="p3" doxytag="ConfigReader::error"></a><p> @@ -719,7 +720,7 @@ Referenced by <a class="el" href="modules_8cpp-source.html#l00819">ConfigReader( <p> Definition at line <a class="el" href="modules_8h-source.html#l01163">1163</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>. <p> -Referenced by <a class="el" href="modules_8cpp-source.html#l00819">ConfigReader()</a>, <a class="el" href="modules_8cpp-source.html#l00909">GetError()</a>, <a class="el" href="modules_8cpp-source.html#l00863">ReadFlag()</a>, <a class="el" href="modules_8cpp-source.html#l00880">ReadInteger()</a>, and <a class="el" href="modules_8cpp-source.html#l00847">ReadValue()</a>. </td> +Referenced by <a class="el" href="modules_8cpp-source.html#l00821">ConfigReader()</a>, <a class="el" href="modules_8cpp-source.html#l00912">GetError()</a>, <a class="el" href="modules_8cpp-source.html#l00866">ReadFlag()</a>, <a class="el" href="modules_8cpp-source.html#l00883">ReadInteger()</a>, and <a class="el" href="modules_8cpp-source.html#l00850">ReadValue()</a>. </td> </tr> </table> <a name="p1" doxytag="ConfigReader::errorlog"></a><p> @@ -745,7 +746,7 @@ Referenced by <a class="el" href="modules_8cpp-source.html#l00819">ConfigReader( <p> Definition at line <a class="el" href="modules_8h-source.html#l01159">1159</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>. <p> -Referenced by <a class="el" href="modules_8cpp-source.html#l00819">ConfigReader()</a>, <a class="el" href="modules_8cpp-source.html#l00916">DumpErrors()</a>, and <a class="el" href="modules_8cpp-source.html#l00829">~ConfigReader()</a>. </td> +Referenced by <a class="el" href="modules_8cpp-source.html#l00821">ConfigReader()</a>, <a class="el" href="modules_8cpp-source.html#l00919">DumpErrors()</a>, and <a class="el" href="modules_8cpp-source.html#l00832">~ConfigReader()</a>. </td> </tr> </table> <a name="p2" doxytag="ConfigReader::readerror"></a><p> @@ -773,12 +774,12 @@ Used to store errors. <p> Definition at line <a class="el" href="modules_8h-source.html#l01162">1162</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>. <p> -Referenced by <a class="el" href="modules_8cpp-source.html#l00819">ConfigReader()</a>, and <a class="el" href="modules_8cpp-source.html#l00959">Verify()</a>. </td> +Referenced by <a class="el" href="modules_8cpp-source.html#l00821">ConfigReader()</a>, and <a class="el" href="modules_8cpp-source.html#l00962">Verify()</a>. </td> </tr> </table> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="modules_8h-source.html">modules.h</a><li><a class="el" href="modules_8cpp-source.html">modules.cpp</a></ul> -<hr size="1"><address style="align: right;"><small>Generated on Wed May 25 22:02:53 2005 for InspIRCd by +<hr size="1"><address style="align: right;"><small>Generated on Mon May 30 05:16:42 2005 for InspIRCd by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.3 </small></address> |