Skip to content

Commit ca5f35f

Browse files
committed
Add preprocessConfig func
1 parent 42a9976 commit ca5f35f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/src/main/kotlin/io/github/rothes/esu/core/module/CommonModule.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ abstract class CommonModule<C, L> : CommonFeature<C, L>(), Module<C, L> {
4141

4242
open fun buildLangLoader(builder: YamlConfigurationLoader.Builder) { }
4343

44+
open fun preprocessConfig(loadedConfiguration: LoadedConfiguration) {}
45+
4446
fun User.hasPerm(shortPerm: String): Boolean {
4547
return hasPermission(perm(shortPerm))
4648
}
@@ -65,6 +67,7 @@ abstract class CommonModule<C, L> : CommonFeature<C, L>(), Module<C, L> {
6567
yamlLoader = { buildLangLoader(it); it },
6668
)
6769
)
70+
preprocessConfig(configNode)
6871
loadConfig(root, configNode)
6972
loadLang(root, langNodes)
7073
configNode.save()

0 commit comments

Comments
 (0)