0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd: Add convenience to test if line has a param number.

This commit is contained in:
Jason Volk 2016-09-10 14:58:09 -07:00
parent 9d558e5eb4
commit eb1d8fd8e6

View file

@ -47,6 +47,14 @@ inline auto &command(line &line) { return line.cmd;
inline auto &parv(const line &line) { return line.parv; }
inline auto &parv(line &line) { return line.parv; }
inline auto parc(const line &line) { return parv(line).size(); }
bool has(const line &line, const uint &argp);
inline bool
has(const line &line,
const uint &argp)
{
return parc(line) > argp;
}
inline auto &
line::operator[](const size_t &pos)