mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Feature] Exempt a zone from IP-limit checks. (#4137)
* Exempt zone from IP checks * [Feature] Add Support for String-based Rules # Notes - Add support for string-based rules. # Images * convert to comma-seperated list * Forgot to convert the zone to a string * Update lua_general.cpp * fixed rule name * use the local string methods instead * I think this will work as desired without the extra condition --------- Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
This commit is contained in:
+18
-1
@@ -5653,6 +5653,10 @@ bool get_ruleb(int rule) {
|
||||
return RuleManager::Instance()->GetBoolRule((RuleManager::BoolType)rule);
|
||||
}
|
||||
|
||||
std::string get_rules(int rule) {
|
||||
return RuleManager::Instance()->GetStringRule((RuleManager::StringType)rule);
|
||||
}
|
||||
|
||||
luabind::scope lua_register_general() {
|
||||
return luabind::namespace_("eq")
|
||||
[(
|
||||
@@ -7244,7 +7248,13 @@ luabind::scope lua_register_rules_const() {
|
||||
#define RULE_BOOL(cat, rule, default_value, notes) \
|
||||
luabind::value(#rule, RuleManager::Bool__##rule),
|
||||
#include "../common/ruletypes.h"
|
||||
luabind::value("_BoolRuleCount", RuleManager::_BoolRuleCount)
|
||||
luabind::value("_BoolRuleCount", RuleManager::_BoolRuleCount),
|
||||
#undef RULE_BOOL
|
||||
#define RULE_STRING(cat, rule, default_value, notes) \
|
||||
luabind::value(#rule, RuleManager::String__##rule),
|
||||
#include "../common/ruletypes.h"
|
||||
luabind::value("_StringRuleCount", RuleManager::_StringRuleCount)
|
||||
#undef RULE_STRING
|
||||
)];
|
||||
}
|
||||
|
||||
@@ -7269,6 +7279,13 @@ luabind::scope lua_register_ruleb() {
|
||||
];
|
||||
}
|
||||
|
||||
luabind::scope lua_register_rules() {
|
||||
return luabind::namespace_("RuleS")
|
||||
[
|
||||
luabind::def("Get", &get_rules)
|
||||
];
|
||||
}
|
||||
|
||||
luabind::scope lua_register_journal_speakmode() {
|
||||
return luabind::class_<Journal_SpeakMode>("SpeakMode")
|
||||
.enum_("constants")
|
||||
|
||||
Reference in New Issue
Block a user