summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-09 14:20:04 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-09 14:20:04 +0000
commitf0680338833dd76966ba1769980abb9eafb50467 (patch)
tree4dbfcefd4a49f325e5f9d4a9d60e65702aaef81c /src/helperfuncs.cpp
parent542eca81f416df9891e24399b540d8a309950fe1 (diff)
Tidy up loglevel enum (remove some C-ish defines)
change ServerConfig to pass a pointer to 'this' to Validation etc functions git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4811 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp45
1 files changed, 1 insertions, 44 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index 97cb68f33..5adc18650 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -61,7 +61,7 @@ extern std::vector<userrec*> local_users;
static char TIMESTR[26];
static time_t LAST = 0;
-/** log()
+/** Log()
* Write a line of text `text' to the logfile (and stdout, if in nofork) if the level `level'
* is greater than the configured loglevel.
*/
@@ -107,49 +107,6 @@ void InspIRCd::Log(int level, const std::string &text)
}
}
-/** readfile()
- * Read the contents of a file located by `fname' into a file_cache pointed at by `F'.
- *
- * XXX - we may want to consider returning a file_cache or pointer to one, less confusing.
- */
-void readfile(file_cache &F, const char* fname)
-{
- FILE* file;
- char linebuf[MAXBUF];
-
- log(DEBUG,"readfile: loading %s",fname);
- F.clear();
- file = fopen(fname,"r");
-
- if (file)
- {
- while (!feof(file))
- {
- fgets(linebuf,sizeof(linebuf),file);
- linebuf[strlen(linebuf)-1]='\0';
-
- if (!*linebuf)
- {
- strcpy(linebuf," ");
- }
-
- if (!feof(file))
- {
- F.push_back(linebuf);
- }
- }
-
- fclose(file);
- }
- else
- {
- log(DEBUG,"readfile: failed to load file: %s",fname);
- }
-
- log(DEBUG,"readfile: loaded %s, %lu lines",fname,(unsigned long)F.size());
-}
-
-
std::string GetServerDescription(const char* servername)
{
std::string description = "";