InspIRCd
2.0
|
#include <hashcomp.h>
Public Member Functions | |
portparser (const std::string &source, bool allow_overlapped=true) | |
long | GetToken () |
The portparser class seperates out a port range into integers. A port range may be specified in the input string in the form "6660,6661,6662-6669,7020". The end of the stream is indicated by a return value of 0 from portparser::GetToken(). If you attempt to specify an illegal range (e.g. one where start >= end, or start or end < 0) then GetToken() will return the first element of the pair of numbers.
irc::portparser::portparser | ( | const std::string & | source, |
bool | allow_overlapped = true |
||
) |
Create a portparser and fill it with the provided data
source | The source text to parse from |
allow_overlapped | Allow overlapped ranges |
long irc::portparser::GetToken | ( | ) |
Fetch the next token from the stream