2003-01-23 19:45:57 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
< html > < head > < meta http-equiv = "Content-Type" content = "text/html;charset=iso-8859-1" >
2005-03-25 03:51:56 +00:00
< title > InspIRCd: FileReader class Reference< / title >
2004-04-03 15:46:53 +00:00
< link href = "inspircd.css" rel = "stylesheet" type = "text/css" >
2003-01-23 19:45:57 +00:00
< / head > < body >
2005-03-25 03:51:56 +00:00
<!-- 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 >
< h1 > FileReader Class Reference< / h1 > Caches a text file into memory and can be used to retrieve lines from it.
2003-01-23 19:45:57 +00:00
< a href = "#_details" > More...< / a >
< p >
< code > #include < < a class = "el" href = "modules_8h-source.html" > modules.h< / a > > < / code >
< p >
2005-03-25 03:51:56 +00:00
Inherits < a class = "el" href = "classclassbase.html" > classbase< / a > .
< p >
< a href = "classFileReader-members.html" > List of all members.< / a > < table border = 0 cellpadding = 0 cellspacing = 0 >
2003-01-23 19:45:57 +00:00
< tr > < td > < / td > < / tr >
2003-03-30 12:32:32 +00:00
< tr > < td colspan = 2 > < br > < h2 > Public Member Functions< / h2 > < / td > < / tr >
2005-03-25 03:51:56 +00:00
< tr > < td class = "memItemLeft" nowrap align = right valign = top > < / td > < td class = "memItemRight" valign = bottom > < a class = "el" href = "classFileReader.html#a0" > FileReader< / a > ()< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Default constructor. < / em > < a href = "#a0" > < / a > < em > < br > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = right valign = top > < / td > < td class = "memItemRight" valign = bottom > < a class = "el" href = "classFileReader.html#a1" > FileReader< / a > (std::string filename)< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Secondary constructor. < / em > < a href = "#a1" > < / a > < em > < br > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = right valign = top > < / td > < td class = "memItemRight" valign = bottom > < a class = "el" href = "classFileReader.html#a2" > ~FileReader< / a > ()< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Default destructor. < / em > < a href = "#a2" > < / a > < em > < br > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = right valign = top > void < / td > < td class = "memItemRight" valign = bottom > < a class = "el" href = "classFileReader.html#a3" > LoadFile< / a > (std::string filename)< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Used to load a file. < / em > < a href = "#a3" > < / a > < em > < br > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = right valign = top > bool < / td > < td class = "memItemRight" valign = bottom > < a class = "el" href = "classFileReader.html#a4" > Exists< / a > ()< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Returns true if the file exists This function will return false if the file could not be opened. < / em > < a href = "#a4" > < / a > < em > < br > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = right valign = top > std::string < / td > < td class = "memItemRight" valign = bottom > < a class = "el" href = "classFileReader.html#a5" > GetLine< / a > (int x)< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Retrieve one line from the file. < / em > < a href = "#a5" > < / a > < em > < br > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = right valign = top > int < / td > < td class = "memItemRight" valign = bottom > < a class = "el" href = "classFileReader.html#a6" > FileSize< / a > ()< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Returns the size of the file in lines. < / em > < a href = "#a6" > < / a > < em > < br > < br > < / td > < / tr >
2003-01-23 19:45:57 +00:00
< tr > < td colspan = 2 > < br > < h2 > Private Attributes< / h2 > < / td > < / tr >
2005-04-13 12:41:46 +00:00
< tr > < td class = "memItemLeft" nowrap align = right valign = top > < a class = "el" href = "modules_8h.html#a31" > file_cache< / a > < / td > < td class = "memItemRight" valign = bottom > < a class = "el" href = "classFileReader.html#r0" > fc< / a > < / td > < / tr >
2005-03-25 03:51:56 +00:00
2003-01-23 19:45:57 +00:00
< / table >
< hr > < a name = "_details" > < / a > < h2 > Detailed Description< / h2 >
2005-03-25 03:51:56 +00:00
Caches a text file into memory and can be used to retrieve lines from it.
2003-01-23 19:45:57 +00:00
< p >
This class contains methods for read-only manipulation of a text file in memory. Either use the constructor type with one parameter to load a file into memory at construction, or use the LoadFile method to load a file.
< p >
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
Definition at line < a class = "el" href = "modules_8h-source.html#l00980" > 980< / a > of file < a class = "el" href = "modules_8h-source.html" > modules.h< / a > .< hr > < h2 > Constructor & Destructor Documentation< / h2 >
2003-01-23 19:45:57 +00:00
< a name = "a0" doxytag = "FileReader::FileReader" > < / a > < p >
2005-03-25 03:51:56 +00:00
< table class = "mdTable" width = "100%" cellpadding = "2" cellspacing = "0" >
2003-01-23 19:45:57 +00:00
< tr >
2005-03-25 03:51:56 +00:00
< td class = "mdRow" >
2003-01-23 19:45:57 +00:00
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > FileReader::FileReader < / td >
< td class = "md" valign = "top" > ( < / td >
2005-03-25 03:51:56 +00:00
< td class = "mdname1" valign = "top" nowrap > < / td >
< td class = "md" valign = "top" > ) < / td >
2003-01-23 19:45:57 +00:00
< td class = "md" nowrap > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
2005-03-25 03:51:56 +00:00
Default constructor.
2003-01-23 19:45:57 +00:00
< p >
This method does not load any file into memory, you must use the LoadFile method after constructing the class this way.
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
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 > .
2003-01-23 19:45:57 +00:00
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
< div class = "fragment" > < pre > 00871 {
00872 }
2003-01-23 19:45:57 +00:00
< / pre > < / div > < / td >
< / tr >
< / table >
< a name = "a1" doxytag = "FileReader::FileReader" > < / a > < p >
2005-03-25 03:51:56 +00:00
< table class = "mdTable" width = "100%" cellpadding = "2" cellspacing = "0" >
2003-01-23 19:45:57 +00:00
< tr >
2005-03-25 03:51:56 +00:00
< td class = "mdRow" >
2003-01-23 19:45:57 +00:00
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > FileReader::FileReader < / td >
< td class = "md" valign = "top" > ( < / td >
2004-04-02 12:38:41 +00:00
< td class = "md" nowrap valign = "top" > std::string < / td >
2005-03-25 03:51:56 +00:00
< td class = "mdname1" valign = "top" nowrap > < em > filename< / em > < / td >
< td class = "md" valign = "top" > ) < / td >
2003-01-23 19:45:57 +00:00
< td class = "md" nowrap > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
2005-03-25 03:51:56 +00:00
Secondary constructor.
2003-01-23 19:45:57 +00:00
< p >
2004-04-02 12:38:41 +00:00
This method initialises the class with a file loaded into it ready for GetLine and and other methods to be called. If the file could not be loaded, < a class = "el" href = "classFileReader.html#a6" > FileReader::FileSize< / a > returns 0.
2003-01-23 19:45:57 +00:00
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
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 > .
2003-01-23 19:45:57 +00:00
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
References < a class = "el" href = "modules_8h-source.html#l00982" > fc< / a > , and < a class = "el" href = "modules_8h-source.html#l00067" > file_cache< / a > .
2003-01-23 19:45:57 +00:00
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
< div class = "fragment" > < pre > 00864 {
00865 < a class = "code" href = "modules_8h.html#a31" > file_cache< / a > c;
00866 readfile(c,filename.c_str());
00867 this-> < a class = "code" href = "classFileReader.html#r0" > fc< / a > = c;
00868 }
2003-01-23 19:45:57 +00:00
< / pre > < / div > < / td >
< / tr >
< / table >
< a name = "a2" doxytag = "FileReader::~FileReader" > < / a > < p >
2005-03-25 03:51:56 +00:00
< table class = "mdTable" width = "100%" cellpadding = "2" cellspacing = "0" >
2003-01-23 19:45:57 +00:00
< tr >
2005-03-25 03:51:56 +00:00
< td class = "mdRow" >
2003-01-23 19:45:57 +00:00
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
2005-03-25 03:51:56 +00:00
< td class = "md" nowrap valign = "top" > FileReader::~< a class = "el" href = "classFileReader.html" > FileReader< / a > < / td >
2003-01-23 19:45:57 +00:00
< td class = "md" valign = "top" > ( < / td >
2005-03-25 03:51:56 +00:00
< td class = "mdname1" valign = "top" nowrap > < / td >
< td class = "md" valign = "top" > ) < / td >
2003-01-23 19:45:57 +00:00
< td class = "md" nowrap > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
2005-03-25 03:51:56 +00:00
Default destructor.
2003-01-23 19:45:57 +00:00
< p >
This deletes the memory allocated to the file.
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
Definition at line < a class = "el" href = "modules_8cpp-source.html#l00882" > 882< / a > of file < a class = "el" href = "modules_8cpp-source.html" > modules.cpp< / a > .
2003-01-23 19:45:57 +00:00
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
< div class = "fragment" > < pre > 00883 {
00884 }
2003-01-23 19:45:57 +00:00
< / pre > < / div > < / td >
< / tr >
< / table >
< hr > < h2 > Member Function Documentation< / h2 >
2004-04-02 12:38:41 +00:00
< a name = "a4" doxytag = "FileReader::Exists" > < / a > < p >
2005-03-25 03:51:56 +00:00
< table class = "mdTable" width = "100%" cellpadding = "2" cellspacing = "0" >
2004-04-02 12:38:41 +00:00
< tr >
2005-03-25 03:51:56 +00:00
< td class = "mdRow" >
2004-04-02 12:38:41 +00:00
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > bool FileReader::Exists < / td >
< td class = "md" valign = "top" > ( < / td >
2005-03-25 03:51:56 +00:00
< td class = "mdname1" valign = "top" nowrap > < / td >
< td class = "md" valign = "top" > ) < / td >
2004-04-02 12:38:41 +00:00
< td class = "md" nowrap > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
2005-03-25 03:51:56 +00:00
Returns true if the file exists This function will return false if the file could not be opened.
2004-04-08 18:14:00 +00:00
< p >
2004-04-07 18:21:29 +00:00
2004-04-02 12:38:41 +00:00
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
Definition at line < a class = "el" href = "modules_8cpp-source.html#l00886" > 886< / a > of file < a class = "el" href = "modules_8cpp-source.html" > modules.cpp< / a > .
2004-04-02 12:38:41 +00:00
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
References < a class = "el" href = "modules_8h-source.html#l00982" > fc< / a > .
2004-04-02 12:38:41 +00:00
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
< div class = "fragment" > < pre > 00887 {
00888 < span class = "keywordflow" > if< / span > (< a class = "code" href = "classFileReader.html#r0" > fc< / a > .size() == 0)
00889 {
00890 < span class = "keywordflow" > return< / span > (< span class = "keyword" > false< / span > );
00891 }
00892 < span class = "keywordflow" > else< / span >
00893 {
00894 < span class = "keywordflow" > return< / span > (< span class = "keyword" > true< / span > );
00895 }
00896 }
2004-04-02 12:38:41 +00:00
< / pre > < / div > < / td >
< / tr >
< / table >
< a name = "a6" doxytag = "FileReader::FileSize" > < / a > < p >
2005-03-25 03:51:56 +00:00
< table class = "mdTable" width = "100%" cellpadding = "2" cellspacing = "0" >
2003-01-23 19:45:57 +00:00
< tr >
2005-03-25 03:51:56 +00:00
< td class = "mdRow" >
2003-01-23 19:45:57 +00:00
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > int FileReader::FileSize < / td >
< td class = "md" valign = "top" > ( < / td >
2005-03-25 03:51:56 +00:00
< td class = "mdname1" valign = "top" nowrap > < / td >
< td class = "md" valign = "top" > ) < / td >
2003-01-23 19:45:57 +00:00
< td class = "md" nowrap > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
2005-03-25 03:51:56 +00:00
Returns the size of the file in lines.
2003-01-23 19:45:57 +00:00
< p >
This method returns the number of lines in the read file. If it is 0, no lines have been read into memory, either because the file is empty or it does not exist, or cannot be opened due to permission problems.
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
Definition at line < a class = "el" href = "modules_8cpp-source.html#l00905" > 905< / a > of file < a class = "el" href = "modules_8cpp-source.html" > modules.cpp< / a > .
2003-01-23 19:45:57 +00:00
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
References < a class = "el" href = "modules_8h-source.html#l00982" > fc< / a > .
2003-01-23 19:45:57 +00:00
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
< div class = "fragment" > < pre > 00906 {
00907 < span class = "keywordflow" > return< / span > < a class = "code" href = "classFileReader.html#r0" > fc< / a > .size();
00908 }
2003-01-23 19:45:57 +00:00
< / pre > < / div > < / td >
< / tr >
< / table >
2004-04-02 12:38:41 +00:00
< a name = "a5" doxytag = "FileReader::GetLine" > < / a > < p >
2005-03-25 03:51:56 +00:00
< table class = "mdTable" width = "100%" cellpadding = "2" cellspacing = "0" >
2003-01-23 19:45:57 +00:00
< tr >
2005-03-25 03:51:56 +00:00
< td class = "mdRow" >
2003-01-23 19:45:57 +00:00
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
2004-04-02 12:38:41 +00:00
< td class = "md" nowrap valign = "top" > std::string FileReader::GetLine < / td >
2003-01-23 19:45:57 +00:00
< td class = "md" valign = "top" > ( < / td >
< td class = "md" nowrap valign = "top" > int < / td >
2005-03-25 03:51:56 +00:00
< td class = "mdname1" valign = "top" nowrap > < em > x< / em > < / td >
< td class = "md" valign = "top" > ) < / td >
2003-01-23 19:45:57 +00:00
< td class = "md" nowrap > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
2005-03-25 03:51:56 +00:00
Retrieve one line from the file.
2004-04-07 18:21:29 +00:00
< p >
This method retrieves one line from the text file. If an empty non-NULL string is returned, the index was out of bounds, or the line had no data on it.
2003-01-23 19:45:57 +00:00
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
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 > .
2003-01-23 19:45:57 +00:00
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
References < a class = "el" href = "modules_8h-source.html#l00982" > fc< / a > .
2003-01-23 19:45:57 +00:00
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
< div class = "fragment" > < pre > 00899 {
00900 < span class = "keywordflow" > if< / span > ((x< 0) || (x> < a class = "code" href = "classFileReader.html#r0" > fc< / a > .size()))
00901 < span class = "keywordflow" > return< / span > < span class = "stringliteral" > ""< / span > ;
00902 < span class = "keywordflow" > return< / span > < a class = "code" href = "classFileReader.html#r0" > fc< / a > [x];
00903 }
2003-01-23 19:45:57 +00:00
< / pre > < / div > < / td >
< / tr >
< / table >
< a name = "a3" doxytag = "FileReader::LoadFile" > < / a > < p >
2005-03-25 03:51:56 +00:00
< table class = "mdTable" width = "100%" cellpadding = "2" cellspacing = "0" >
2003-01-23 19:45:57 +00:00
< tr >
2005-03-25 03:51:56 +00:00
< td class = "mdRow" >
2003-01-23 19:45:57 +00:00
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > void FileReader::LoadFile < / td >
< td class = "md" valign = "top" > ( < / td >
2004-04-02 12:38:41 +00:00
< td class = "md" nowrap valign = "top" > std::string < / td >
2005-03-25 03:51:56 +00:00
< td class = "mdname1" valign = "top" nowrap > < em > filename< / em > < / td >
< td class = "md" valign = "top" > ) < / td >
2003-01-23 19:45:57 +00:00
< td class = "md" nowrap > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
2005-03-25 03:51:56 +00:00
Used to load a file.
2003-01-23 19:45:57 +00:00
< p >
2004-04-02 12:38:41 +00:00
This method loads a file into the class ready for GetLine and and other methods to be called. If the file could not be loaded, < a class = "el" href = "classFileReader.html#a6" > FileReader::FileSize< / a > returns 0.
2003-01-23 19:45:57 +00:00
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
Definition at line < a class = "el" href = "modules_8cpp-source.html#l00874" > 874< / a > of file < a class = "el" href = "modules_8cpp-source.html" > modules.cpp< / a > .
2003-01-23 19:45:57 +00:00
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
References < a class = "el" href = "modules_8h-source.html#l00982" > fc< / a > , and < a class = "el" href = "modules_8h-source.html#l00067" > file_cache< / a > .
2003-01-23 19:45:57 +00:00
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
< div class = "fragment" > < pre > 00875 {
00876 < a class = "code" href = "modules_8h.html#a31" > file_cache< / a > c;
00877 readfile(c,filename.c_str());
00878 this-> < a class = "code" href = "classFileReader.html#r0" > fc< / a > = c;
00879 }
2003-01-23 19:45:57 +00:00
< / pre > < / div > < / td >
< / tr >
< / table >
< hr > < h2 > Member Data Documentation< / h2 >
2005-03-25 03:51:56 +00:00
< a name = "r0" doxytag = "FileReader::fc" > < / a > < p >
< table class = "mdTable" width = "100%" cellpadding = "2" cellspacing = "0" >
2003-01-23 19:45:57 +00:00
< tr >
2005-03-25 03:51:56 +00:00
< td class = "mdRow" >
2003-01-23 19:45:57 +00:00
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
2005-04-13 12:41:46 +00:00
< td class = "md" nowrap valign = "top" > < a class = "el" href = "modules_8h.html#a31" > file_cache< / a > < a class = "el" href = "classFileReader.html#r0" > FileReader::fc< / a > < code > [private]< / code >
2003-01-23 19:45:57 +00:00
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
Definition at line < a class = "el" href = "modules_8h-source.html#l00982" > 982< / a > of file < a class = "el" href = "modules_8h-source.html" > modules.h< / a > .
2003-01-23 19:45:57 +00:00
< p >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
Referenced by < a class = "el" href = "modules_8cpp-source.html#l00886" > Exists()< / a > , < a class = "el" href = "modules_8cpp-source.html#l00863" > FileReader()< / a > , < a class = "el" href = "modules_8cpp-source.html#l00905" > FileSize()< / a > , < a class = "el" href = "modules_8cpp-source.html#l00898" > GetLine()< / a > , and < a class = "el" href = "modules_8cpp-source.html#l00874" > LoadFile()< / a > . < / td >
2003-01-23 19:45:57 +00:00
< / 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 >
New docs for API:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1106 e03df62e-2008-0410-955e-edbf42e46eb7
2005-04-15 19:31:08 +00:00
< hr size = "1" > < address style = "align: right;" > < small > Generated on Fri Apr 15 19:30:21 2005 for InspIRCd by
2003-01-23 19:45:57 +00:00
< a href = "http://www.doxygen.org/index.html" >
2005-03-25 03:51:56 +00:00
< img src = "doxygen.png" alt = "doxygen" align = "middle" border = 0 >
< / a > 1.3.3 < / small > < / address >
2003-01-23 19:45:57 +00:00
< / body >
< / html >