]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules/cap.h
m_cap Add Capability::GetCapValue(), list capabilities with values
[user/henk/code/inspircd.git] / include / modules / cap.h
index 1ad2ff2f120b0fc629e47f0853b53c91ae5886bb..e242720b58dec7c6ed0823bd837217c6868e26b7 100644 (file)
@@ -25,6 +25,7 @@ namespace Cap
 {
        static const unsigned int MAX_CAPS = (sizeof(intptr_t) * 8) - 1;
        static const intptr_t CAP_302_BIT = (intptr_t)1 << MAX_CAPS;
+       static const unsigned int MAX_VALUE_LENGTH = 100;
 
        typedef intptr_t Ext;
        typedef LocalIntExt ExtItem;
@@ -232,5 +233,14 @@ namespace Cap
                {
                        return true;
                }
+
+               /** Query the value of this capability for a user
+                * @param user User who will get the value of the capability
+                * @return Value to show to the user. If NULL, the capability has no value (default).
+                */
+               virtual const std::string* GetValue(LocalUser* user) const
+               {
+                       return NULL;
+               }
        };
 }