diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-15 17:05:15 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-15 17:05:15 +0000 |
commit | 4d5a17380bc71cabe544b41c7c8a26a292384f3d (patch) | |
tree | 9a882bc421d4c250817a17980265b76e06e4cf8c /docs/module-doc/classConfigReader.html | |
parent | a48ee868ed80b689b773fdd9bbd8f1e761dc3b8a (diff) |
Added docs for hashcomp
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1396 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'docs/module-doc/classConfigReader.html')
-rw-r--r-- | docs/module-doc/classConfigReader.html | 322 |
1 files changed, 161 insertions, 161 deletions
diff --git a/docs/module-doc/classConfigReader.html b/docs/module-doc/classConfigReader.html index cb2e2e0f5..166aab65b 100644 --- a/docs/module-doc/classConfigReader.html +++ b/docs/module-doc/classConfigReader.html @@ -4,7 +4,7 @@ <link href="inspircd.doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.3.3 --> -<div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Compound List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Compound Members</a> | <a class="qindex" href="globals.html">File Members</a></div> +<div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Compound List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Compound Members</a> | <a class="qindex" href="globals.html">File Members</a></div> <h1>ConfigReader Class Reference</h1>Allows reading of values from configuration files This class allows a module to read from either the main configuration file (inspircd.conf) or from a module-specified configuration file. <a href="#_details">More...</a> <p> @@ -73,7 +73,7 @@ It may either be instantiated with one parameter or none. Constructing the class <p> <p> -Definition at line <a class="el" href="modules_8h-source.html#l01147">1147</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor & Destructor Documentation</h2> +Definition at line <a class="el" href="modules_8h-source.html#l01150">1150</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>.<hr><h2>Constructor & Destructor Documentation</h2> <a name="a0" doxytag="ConfigReader::ConfigReader"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> @@ -103,17 +103,17 @@ 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#l00870">870</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#l00799">799</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> -References <a class="el" href="modules_8h-source.html#l01155">cache</a>, <a class="el" href="modules_8h-source.html#l01138">CONF_FILE_NOT_FOUND</a>, <a class="el" href="modules_8h-source.html#l01160">error</a>, <a class="el" href="modules_8h-source.html#l01156">errorlog</a>, and <a class="el" href="modules_8h-source.html#l01159">readerror</a>. +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>00871 { -00872 this-><a class="code" href="classConfigReader.html#p0">cache</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out); -00873 this-><a class="code" href="classConfigReader.html#p1">errorlog</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out); -00874 this-><a class="code" href="classConfigReader.html#p2">readerror</a> = LoadConf(CONFIG_FILE,this->cache,this->errorlog); -00875 <span class="keywordflow">if</span> (!this-><a class="code" href="classConfigReader.html#p2">readerror</a>) -00876 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a30">CONF_FILE_NOT_FOUND</a>; -00877 } +<div class="fragment"><pre>00800 { +00801 this-><a class="code" href="classConfigReader.html#p0">cache</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out); +00802 this-><a class="code" href="classConfigReader.html#p1">errorlog</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out); +00803 this-><a class="code" href="classConfigReader.html#p2">readerror</a> = LoadConf(CONFIG_FILE,this->cache,this->errorlog); +00804 <span class="keywordflow">if</span> (!this-><a class="code" href="classConfigReader.html#p2">readerror</a>) +00805 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a30">CONF_FILE_NOT_FOUND</a>; +00806 } </pre></div> </td> </tr> </table> @@ -147,17 +147,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#l00889">889</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#l00818">818</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> -References <a class="el" href="modules_8h-source.html#l01155">cache</a>, <a class="el" href="modules_8h-source.html#l01138">CONF_FILE_NOT_FOUND</a>, <a class="el" href="modules_8h-source.html#l01160">error</a>, <a class="el" href="modules_8h-source.html#l01156">errorlog</a>, and <a class="el" href="modules_8h-source.html#l01159">readerror</a>. +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>00890 { -00891 this-><a class="code" href="classConfigReader.html#p0">cache</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out); -00892 this-><a class="code" href="classConfigReader.html#p1">errorlog</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out); -00893 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>); -00894 <span class="keywordflow">if</span> (!this-><a class="code" href="classConfigReader.html#p2">readerror</a>) -00895 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a30">CONF_FILE_NOT_FOUND</a>; -00896 }; +<div class="fragment"><pre>00819 { +00820 this-><a class="code" href="classConfigReader.html#p0">cache</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out); +00821 this-><a class="code" href="classConfigReader.html#p1">errorlog</a> = <span class="keyword">new</span> std::stringstream(std::stringstream::in | std::stringstream::out); +00822 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>); +00823 <span class="keywordflow">if</span> (!this-><a class="code" href="classConfigReader.html#p2">readerror</a>) +00824 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a30">CONF_FILE_NOT_FOUND</a>; +00825 }; </pre></div> </td> </tr> </table> @@ -190,16 +190,16 @@ Default destructor. <p> This method destroys the ConfigReader class. <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#l00809">809</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> -References <a class="el" href="modules_8h-source.html#l01155">cache</a>, and <a class="el" href="modules_8h-source.html#l01156">errorlog</a>. +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>00881 { -00882 <span class="keywordflow">if</span> (this-><a class="code" href="classConfigReader.html#p0">cache</a>) -00883 <span class="keyword">delete</span> this-><a class="code" href="classConfigReader.html#p0">cache</a>; -00884 <span class="keywordflow">if</span> (this-><a class="code" href="classConfigReader.html#p1">errorlog</a>) -00885 <span class="keyword">delete</span> this-><a class="code" href="classConfigReader.html#p1">errorlog</a>; -00886 } +<div class="fragment"><pre>00810 { +00811 <span class="keywordflow">if</span> (this-><a class="code" href="classConfigReader.html#p0">cache</a>) +00812 <span class="keyword">delete</span> this-><a class="code" href="classConfigReader.html#p0">cache</a>; +00813 <span class="keywordflow">if</span> (this-><a class="code" href="classConfigReader.html#p1">errorlog</a>) +00814 <span class="keyword">delete</span> this-><a class="code" href="classConfigReader.html#p1">errorlog</a>; +00815 } </pre></div> </td> </tr> </table> @@ -243,40 +243,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#l00967">967</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. -<p> -References <a class="el" href="modules_8h-source.html#l01156">errorlog</a>, <a class="el" href="connection_8h-source.html#l00215">connection::fd</a>, and <a class="el" href="users_8h-source.html#l00121">userrec::nick</a>. -<p> -<div class="fragment"><pre>00968 { -00969 <span class="keywordflow">if</span> (bail) -00970 { -00971 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()); -00972 exit(0); -00973 } -00974 <span class="keywordflow">else</span> -00975 { -00976 <span class="keywordtype">char</span> dataline[1024]; -00977 <span class="keywordflow">if</span> (user) -00978 { -00979 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>); -00980 <span class="keywordflow">while</span> (!<a class="code" href="classConfigReader.html#p1">errorlog</a>->eof()) -00981 { -00982 <a class="code" href="classConfigReader.html#p1">errorlog</a>->getline(dataline,1024); -00983 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); -00984 } -00985 } -00986 <span class="keywordflow">else</span> -00987 { -00988 WriteOpers(<span class="stringliteral">"There were errors in the configuration file:"</span>,user-><a class="code" href="classuserrec.html#o0">nick</a>); -00989 <span class="keywordflow">while</span> (!<a class="code" href="classConfigReader.html#p1">errorlog</a>->eof()) -00990 { -00991 <a class="code" href="classConfigReader.html#p1">errorlog</a>->getline(dataline,1024); -00992 WriteOpers(dataline); -00993 } -00994 } -00995 <span class="keywordflow">return</span>; -00996 } -00997 } +Definition at line <a class="el" href="modules_8cpp-source.html#l00896">896</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#l00217">connection::fd</a>, and <a class="el" href="users_8h-source.html#l00121">userrec::nick</a>. +<p> +<div class="fragment"><pre>00897 { +00898 <span class="keywordflow">if</span> (bail) +00899 { +00900 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()); +00901 exit(0); +00902 } +00903 <span class="keywordflow">else</span> +00904 { +00905 <span class="keywordtype">char</span> dataline[1024]; +00906 <span class="keywordflow">if</span> (user) +00907 { +00908 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>); +00909 <span class="keywordflow">while</span> (!<a class="code" href="classConfigReader.html#p1">errorlog</a>->eof()) +00910 { +00911 <a class="code" href="classConfigReader.html#p1">errorlog</a>->getline(dataline,1024); +00912 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); +00913 } +00914 } +00915 <span class="keywordflow">else</span> +00916 { +00917 WriteOpers(<span class="stringliteral">"There were errors in the configuration file:"</span>,user-><a class="code" href="classuserrec.html#o0">nick</a>); +00918 <span class="keywordflow">while</span> (!<a class="code" href="classConfigReader.html#p1">errorlog</a>->eof()) +00919 { +00920 <a class="code" href="classConfigReader.html#p1">errorlog</a>->getline(dataline,1024); +00921 WriteOpers(dataline); +00922 } +00923 } +00924 <span class="keywordflow">return</span>; +00925 } +00926 } </pre></div> </td> </tr> </table> @@ -310,13 +310,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#l01000">1000</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#l00929">929</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> -References <a class="el" href="modules_8h-source.html#l01155">cache</a>. +References <a class="el" href="modules_8h-source.html#l01158">cache</a>. <p> -<div class="fragment"><pre>01001 { -01002 <span class="keywordflow">return</span> EnumConf(cache,tag.c_str()); -01003 } +<div class="fragment"><pre>00930 { +00931 <span class="keywordflow">return</span> EnumConf(cache,tag.c_str()); +00932 } </pre></div> </td> </tr> </table> @@ -359,13 +359,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#l01005">1005</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#l00934">934</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> -References <a class="el" href="modules_8h-source.html#l01155">cache</a>. +References <a class="el" href="modules_8h-source.html#l01158">cache</a>. <p> -<div class="fragment"><pre>01006 { -01007 <span class="keywordflow">return</span> EnumValues(cache, tag.c_str(), index); -01008 } +<div class="fragment"><pre>00935 { +00936 <span class="keywordflow">return</span> EnumValues(cache, tag.c_str(), index); +00937 } </pre></div> </td> </tr> </table> @@ -398,15 +398,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#l00960">960</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#l00889">889</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. <p> -References <a class="el" href="modules_8h-source.html#l01160">error</a>. +References <a class="el" href="modules_8h-source.html#l01163">error</a>. <p> -<div class="fragment"><pre>00961 { -00962 <span class="keywordtype">long</span> olderr = this-><a class="code" href="classConfigReader.html#p3">error</a>; -00963 this->error = 0; -00964 <span class="keywordflow">return</span> olderr; -00965 } +<div class="fragment"><pre>00890 { +00891 <span class="keywordtype">long</span> olderr = this-><a class="code" href="classConfigReader.html#p3">error</a>; +00892 this->error = 0; +00893 <span class="keywordflow">return</span> olderr; +00894 } </pre></div> </td> </tr> </table> @@ -455,25 +455,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#l00914">914</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. -<p> -References <a class="el" href="modules_8h-source.html#l01155">cache</a>, <a class="el" href="modules_8h-source.html#l01137">CONF_VALUE_NOT_FOUND</a>, and <a class="el" href="modules_8h-source.html#l01160">error</a>. -<p> -<div class="fragment"><pre>00915 { -00916 <span class="keywordtype">char</span> val[MAXBUF]; -00917 <span class="keywordtype">char</span> t[MAXBUF]; -00918 <span class="keywordtype">char</span> n[MAXBUF]; -00919 strlcpy(t,tag.c_str(),MAXBUF); -00920 strlcpy(n,name.c_str(),MAXBUF); -00921 <span class="keywordtype">int</span> res = ReadConf(cache,t,n,index,val); -00922 <span class="keywordflow">if</span> (!res) -00923 { -00924 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a29">CONF_VALUE_NOT_FOUND</a>; -00925 <span class="keywordflow">return</span> <span class="keyword">false</span>; -00926 } -00927 std::string s = val; -00928 <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>)); -00929 } +Definition at line <a class="el" href="modules_8cpp-source.html#l00843">843</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>00844 { +00845 <span class="keywordtype">char</span> val[MAXBUF]; +00846 <span class="keywordtype">char</span> t[MAXBUF]; +00847 <span class="keywordtype">char</span> n[MAXBUF]; +00848 strlcpy(t,tag.c_str(),MAXBUF); +00849 strlcpy(n,name.c_str(),MAXBUF); +00850 <span class="keywordtype">int</span> res = ReadConf(cache,t,n,index,val); +00851 <span class="keywordflow">if</span> (!res) +00852 { +00853 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a29">CONF_VALUE_NOT_FOUND</a>; +00854 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00855 } +00856 std::string s = val; +00857 <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>)); +00858 } </pre></div> </td> </tr> </table> @@ -528,37 +528,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#l00931">931</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. -<p> -References <a class="el" href="modules_8h-source.html#l01155">cache</a>, <a class="el" href="modules_8h-source.html#l01135">CONF_NOT_A_NUMBER</a>, <a class="el" href="modules_8h-source.html#l01136">CONF_NOT_UNSIGNED</a>, <a class="el" href="modules_8h-source.html#l01137">CONF_VALUE_NOT_FOUND</a>, and <a class="el" href="modules_8h-source.html#l01160">error</a>. -<p> -<div class="fragment"><pre>00932 { -00933 <span class="keywordtype">char</span> val[MAXBUF]; -00934 <span class="keywordtype">char</span> t[MAXBUF]; -00935 <span class="keywordtype">char</span> n[MAXBUF]; -00936 strlcpy(t,tag.c_str(),MAXBUF); -00937 strlcpy(n,name.c_str(),MAXBUF); -00938 <span class="keywordtype">int</span> res = ReadConf(cache,t,n,index,val); -00939 <span class="keywordflow">if</span> (!res) -00940 { -00941 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a29">CONF_VALUE_NOT_FOUND</a>; -00942 <span class="keywordflow">return</span> 0; -00943 } -00944 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < strlen(val); i++) -00945 { -00946 <span class="keywordflow">if</span> (!isdigit(val[i])) -00947 { -00948 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a27">CONF_NOT_A_NUMBER</a>; -00949 <span class="keywordflow">return</span> 0; -00950 } -00951 } -00952 <span class="keywordflow">if</span> ((needs_unsigned) && (atoi(val)<0)) -00953 { -00954 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a28">CONF_NOT_UNSIGNED</a>; -00955 <span class="keywordflow">return</span> 0; -00956 } -00957 <span class="keywordflow">return</span> atoi(val); -00958 } +Definition at line <a class="el" href="modules_8cpp-source.html#l00860">860</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>00861 { +00862 <span class="keywordtype">char</span> val[MAXBUF]; +00863 <span class="keywordtype">char</span> t[MAXBUF]; +00864 <span class="keywordtype">char</span> n[MAXBUF]; +00865 strlcpy(t,tag.c_str(),MAXBUF); +00866 strlcpy(n,name.c_str(),MAXBUF); +00867 <span class="keywordtype">int</span> res = ReadConf(cache,t,n,index,val); +00868 <span class="keywordflow">if</span> (!res) +00869 { +00870 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a29">CONF_VALUE_NOT_FOUND</a>; +00871 <span class="keywordflow">return</span> 0; +00872 } +00873 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < strlen(val); i++) +00874 { +00875 <span class="keywordflow">if</span> (!isdigit(val[i])) +00876 { +00877 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a27">CONF_NOT_A_NUMBER</a>; +00878 <span class="keywordflow">return</span> 0; +00879 } +00880 } +00881 <span class="keywordflow">if</span> ((needs_unsigned) && (atoi(val)<0)) +00882 { +00883 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a28">CONF_NOT_UNSIGNED</a>; +00884 <span class="keywordflow">return</span> 0; +00885 } +00886 <span class="keywordflow">return</span> atoi(val); +00887 } </pre></div> </td> </tr> </table> @@ -607,24 +607,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#l00898">898</a> of file <a class="el" href="modules_8cpp-source.html">modules.cpp</a>. -<p> -References <a class="el" href="modules_8h-source.html#l01155">cache</a>, <a class="el" href="modules_8h-source.html#l01137">CONF_VALUE_NOT_FOUND</a>, and <a class="el" href="modules_8h-source.html#l01160">error</a>. -<p> -<div class="fragment"><pre>00899 { -00900 <span class="keywordtype">char</span> val[MAXBUF]; -00901 <span class="keywordtype">char</span> t[MAXBUF]; -00902 <span class="keywordtype">char</span> n[MAXBUF]; -00903 strlcpy(t,tag.c_str(),MAXBUF); -00904 strlcpy(n,name.c_str(),MAXBUF); -00905 <span class="keywordtype">int</span> res = ReadConf(cache,t,n,index,val); -00906 <span class="keywordflow">if</span> (!res) -00907 { -00908 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a29">CONF_VALUE_NOT_FOUND</a>; -00909 <span class="keywordflow">return</span> <span class="stringliteral">""</span>; -00910 } -00911 <span class="keywordflow">return</span> val; -00912 } +Definition at line <a class="el" href="modules_8cpp-source.html#l00827">827</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>00828 { +00829 <span class="keywordtype">char</span> val[MAXBUF]; +00830 <span class="keywordtype">char</span> t[MAXBUF]; +00831 <span class="keywordtype">char</span> n[MAXBUF]; +00832 strlcpy(t,tag.c_str(),MAXBUF); +00833 strlcpy(n,name.c_str(),MAXBUF); +00834 <span class="keywordtype">int</span> res = ReadConf(cache,t,n,index,val); +00835 <span class="keywordflow">if</span> (!res) +00836 { +00837 this-><a class="code" href="classConfigReader.html#p3">error</a> = <a class="code" href="modules_8h.html#a29">CONF_VALUE_NOT_FOUND</a>; +00838 <span class="keywordflow">return</span> <span class="stringliteral">""</span>; +00839 } +00840 <span class="keywordflow">return</span> val; +00841 } </pre></div> </td> </tr> </table> @@ -657,13 +657,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#l01010">1010</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#l00939">939</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">readerror</a>. +References <a class="el" href="modules_8h-source.html#l01162">readerror</a>. <p> -<div class="fragment"><pre>01011 { -01012 <span class="keywordflow">return</span> this-><a class="code" href="classConfigReader.html#p2">readerror</a>; -01013 } +<div class="fragment"><pre>00940 { +00941 <span class="keywordflow">return</span> this-><a class="code" href="classConfigReader.html#p2">readerror</a>; +00942 } </pre></div> </td> </tr> </table> @@ -691,9 +691,9 @@ The contents of the configuration file This protected member should never be acc <p> It will contain a pointer to the configuration file data with unneeded data (such as comments) stripped from it. <p> -Definition at line <a class="el" href="modules_8h-source.html#l01155">1155</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>. +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#l00870">ConfigReader()</a>, <a class="el" href="modules_8cpp-source.html#l01000">Enumerate()</a>, <a class="el" href="modules_8cpp-source.html#l01005">EnumerateValues()</a>, <a class="el" href="modules_8cpp-source.html#l00914">ReadFlag()</a>, <a class="el" href="modules_8cpp-source.html#l00931">ReadInteger()</a>, <a class="el" href="modules_8cpp-source.html#l00898">ReadValue()</a>, and <a class="el" href="modules_8cpp-source.html#l00880">~ConfigReader()</a>. </td> +Referenced by <a class="el" href="modules_8cpp-source.html#l00799">ConfigReader()</a>, <a class="el" href="modules_8cpp-source.html#l00929">Enumerate()</a>, <a class="el" href="modules_8cpp-source.html#l00934">EnumerateValues()</a>, <a class="el" href="modules_8cpp-source.html#l00843">ReadFlag()</a>, <a class="el" href="modules_8cpp-source.html#l00860">ReadInteger()</a>, <a class="el" href="modules_8cpp-source.html#l00827">ReadValue()</a>, and <a class="el" href="modules_8cpp-source.html#l00809">~ConfigReader()</a>. </td> </tr> </table> <a name="p3" doxytag="ConfigReader::error"></a><p> @@ -717,9 +717,9 @@ Referenced by <a class="el" href="modules_8cpp-source.html#l00870">ConfigReader( <p> <p> -Definition at line <a class="el" href="modules_8h-source.html#l01160">1160</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>. +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#l00870">ConfigReader()</a>, <a class="el" href="modules_8cpp-source.html#l00960">GetError()</a>, <a class="el" href="modules_8cpp-source.html#l00914">ReadFlag()</a>, <a class="el" href="modules_8cpp-source.html#l00931">ReadInteger()</a>, and <a class="el" href="modules_8cpp-source.html#l00898">ReadValue()</a>. </td> +Referenced by <a class="el" href="modules_8cpp-source.html#l00799">ConfigReader()</a>, <a class="el" href="modules_8cpp-source.html#l00889">GetError()</a>, <a class="el" href="modules_8cpp-source.html#l00843">ReadFlag()</a>, <a class="el" href="modules_8cpp-source.html#l00860">ReadInteger()</a>, and <a class="el" href="modules_8cpp-source.html#l00827">ReadValue()</a>. </td> </tr> </table> <a name="p1" doxytag="ConfigReader::errorlog"></a><p> @@ -743,9 +743,9 @@ Referenced by <a class="el" href="modules_8cpp-source.html#l00870">ConfigReader( <p> <p> -Definition at line <a class="el" href="modules_8h-source.html#l01156">1156</a> of file <a class="el" href="modules_8h-source.html">modules.h</a>. +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#l00870">ConfigReader()</a>, <a class="el" href="modules_8cpp-source.html#l00967">DumpErrors()</a>, and <a class="el" href="modules_8cpp-source.html#l00880">~ConfigReader()</a>. </td> +Referenced by <a class="el" href="modules_8cpp-source.html#l00799">ConfigReader()</a>, <a class="el" href="modules_8cpp-source.html#l00896">DumpErrors()</a>, and <a class="el" href="modules_8cpp-source.html#l00809">~ConfigReader()</a>. </td> </tr> </table> <a name="p2" doxytag="ConfigReader::readerror"></a><p> @@ -771,14 +771,14 @@ Used to store errors. <p> <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>. +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#l00870">ConfigReader()</a>, and <a class="el" href="modules_8cpp-source.html#l01010">Verify()</a>. </td> +Referenced by <a class="el" href="modules_8cpp-source.html#l00799">ConfigReader()</a>, and <a class="el" href="modules_8cpp-source.html#l00939">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 Fri May 13 15:49:26 2005 for InspIRCd by +<hr size="1"><address style="align: right;"><small>Generated on Sun May 15 17:03:09 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> |