From 69c3a32784b8c638ea10c269c3f63ede86b8aaa0 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 11 Nov 2006 15:17:40 +0000 Subject: Add irc::portparser, a class to parse port ranges in the form "6660,6661,6662-6669,7000". Needs testing, watch next few commits. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5690 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/hashcomp.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/hashcomp.h b/include/hashcomp.h index b2756b340..b22ba1267 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -292,6 +292,18 @@ namespace irc } }; + class portparser : public classbase + { + private: + commasepstream* sep; + long in_range; + long range_begin; + long range_end; + public: + portparser(const std::string &source); + ~portparser(); + long GetToken(); + }; /** The irc_char_traits class is used for RFC-style comparison of strings. * This class is used to implement irc::string, a case-insensitive, RFC- -- cgit v1.2.3