]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules/who.h
Remove the Kiwi links from the readme.
[user/henk/code/inspircd.git] / include / modules / who.h
index 4fcbe5f91e0371f5de927e34804b556b8248b95b..36aecbc03072e28086e08b57fa0584cfef6054f9 100644 (file)
@@ -1,7 +1,8 @@
 /*
  * 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
@@ -71,6 +72,17 @@ class Who::Request
        /** 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)