summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/configparser.h10
-rw-r--r--include/hashcomp.h8
-rw-r--r--include/inspircd.h4
3 files changed, 10 insertions, 12 deletions
diff --git a/include/configparser.h b/include/configparser.h
index 478899ed9..4b83d26d7 100644
--- a/include/configparser.h
+++ b/include/configparser.h
@@ -61,13 +61,19 @@ struct ParseStack
struct FileWrapper
{
FILE* const f;
- FileWrapper(FILE* file) : f(file) {}
+ bool close_with_pclose;
+ FileWrapper(FILE* file, bool use_pclose = false) : f(file), close_with_pclose(use_pclose) {}
operator bool() { return f; }
operator FILE*() { return f; }
~FileWrapper()
{
if (f)
- fclose(f);
+ {
+ if (close_with_pclose)
+ pclose(f);
+ else
+ fclose(f);
+ }
}
};
diff --git a/include/hashcomp.h b/include/hashcomp.h
index 0340cb634..59986e66f 100644
--- a/include/hashcomp.h
+++ b/include/hashcomp.h
@@ -441,7 +441,7 @@ namespace irc
/** Used to split on commas
*/
- commasepstream* sep;
+ commasepstream sep;
/** Current position in a range of ports
*/
@@ -462,7 +462,7 @@ namespace irc
/** Used to determine overlapping of ports
* without O(n) algorithm being used
*/
- std::map<long, bool> overlap_set;
+ std::set<long> overlap_set;
/** Returns true if val overlaps an existing range
*/
@@ -475,10 +475,6 @@ namespace irc
*/
portparser(const std::string &source, bool allow_overlapped = true);
- /** Frees the internal commasepstream object
- */
- ~portparser();
-
/** Fetch the next token from the stream
* @return The next port number is returned, or 0 if none remain
*/
diff --git a/include/inspircd.h b/include/inspircd.h
index 78e0c1b3e..c06a28043 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -790,10 +790,6 @@ class CoreExport InspIRCd
*/
void SendWhoisLine(User* user, User* dest, int numeric, const char* format, ...) CUSTOM_PRINTF(5, 6);
- /** Handle /STATS
- */
- void DoStats(char statschar, User* user, string_list &results);
-
/** Handle /WHOIS
*/
void DoWhois(User* user, User* dest,unsigned long signon, unsigned long idle, const char* nick);