summaryrefslogtreecommitdiff
path: root/include/modes.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-05-13 22:57:53 -0400
committerAdam <Adam@anope.org>2014-05-13 22:57:53 -0400
commit63b02b8c97e73d5a1fc7005e9693a954179ded0d (patch)
tree84d67d16b8f984eef67653c7a50f7154aa33bb23 /include/modes.h
parent1c8a77ab9f4adfd0afd8217bc462bb338925dcea (diff)
Sanitize nuh masks more to prevent the other side from rewriting them, which screws with our internal tracking of them
Diffstat (limited to 'include/modes.h')
-rw-r--r--include/modes.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/modes.h b/include/modes.h
index 3ba54c439..d1dc4624e 100644
--- a/include/modes.h
+++ b/include/modes.h
@@ -88,7 +88,7 @@ class CoreExport UserModeParam : public UserMode
* @param value The param
* @return true or false
*/
- virtual bool IsValid(const Anope::string &value) const { return true; }
+ virtual bool IsValid(Anope::string &value) const { return true; }
};
/** This class is a channel mode, all channel modes use this/inherit from this
@@ -135,7 +135,7 @@ class CoreExport ChannelModeList : public ChannelMode
* @param mask The mask
* @return true for yes, false for no
*/
- virtual bool IsValid(const Anope::string &mask) const { return true; }
+ virtual bool IsValid(Anope::string &mask) const;
/** Checks if mask affects user
* Should only be used for extbans or other weird ircd-specific things.
@@ -177,7 +177,7 @@ class CoreExport ChannelModeParam : public ChannelMode
* @param value The param
* @return true for yes, false for no
*/
- virtual bool IsValid(const Anope::string &value) const { return true; }
+ virtual bool IsValid(Anope::string &value) const { return true; }
};
/** This is a mode that is a channel status, eg +v/h/o/a/q.
@@ -259,7 +259,7 @@ class CoreExport ChannelModeKey : public ChannelModeParam
public:
ChannelModeKey(char mc) : ChannelModeParam("KEY", mc) { }
- bool IsValid(const Anope::string &value) const anope_override;
+ bool IsValid(Anope::string &value) const anope_override;
};
/** This class is used for oper only channel modes
@@ -404,6 +404,8 @@ class CoreExport Entry
*/
const Anope::string GetMask() const;
+ const Anope::string GetNUHMask() const;
+
/** Check if this entry matches a user
* @param u The user
* @param full True to match against a users real host and IP