/*
* InspIRCd -- Internet Relay Chat Daemon
*
- * Copyright (C) 2015 Attila Molnar <attilamolnar@hush.com>
+ * Copyright (C) 2019 linuxdaemon <linuxdaemon.irc@gmail.com>
+ * Copyright (C) 2018 Sadie Powell <sadie@witchery.services>
*
* This file is part of InspIRCd. InspIRCd is free software: you can
* redistribute it and/or modify it under the terms of the GNU General Public
/** A user specified label for the WHOX response. */
std::string whox_querytype;
+ /** Get the index in the response parameters for the different data fields
+ *
+ * The fields 'r' (realname) and 'd' (hops) will always be missing in a non-WHOX
+ * query, because WHOX splits them to 2 fields, where old WHO has them as one.
+ *
+ * @param flag The field name to look for
+ * @param out The index will be stored in this value
+ * @return True if the field is available, false otherwise
+ */
+ virtual bool GetFieldIndex(char flag, size_t& out) const = 0;
+
protected:
Request()
: fuzzy_match(false)