Change ducks-min-message default to 100
This commit is contained in:
parent
73052ddc49
commit
6ef7f8374d
1 changed files with 4 additions and 1 deletions
|
@ -4,6 +4,8 @@ from src import EventManager, ModuleManager, utils
|
||||||
DUCK = "・゜゜・。。・゜゜\_o< QUACK!"
|
DUCK = "・゜゜・。。・゜゜\_o< QUACK!"
|
||||||
NO_DUCK = "There was no duck!"
|
NO_DUCK = "There was no duck!"
|
||||||
|
|
||||||
|
DEFAUL_MIN_MESSAGES = 100
|
||||||
|
|
||||||
@utils.export("channelset", {"setting": "ducks-enabled",
|
@utils.export("channelset", {"setting": "ducks-enabled",
|
||||||
"help": "Whether or not to spawn ducks", "validate": utils.bool_or_none})
|
"help": "Whether or not to spawn ducks", "validate": utils.bool_or_none})
|
||||||
@utils.export("channelset", {"setting": "ducks-min-messages",
|
@utils.export("channelset", {"setting": "ducks-min-messages",
|
||||||
|
@ -29,7 +31,8 @@ class Module(ModuleManager.BaseModule):
|
||||||
|
|
||||||
if ducks_enabled and not channel.duck_active:
|
if ducks_enabled and not channel.duck_active:
|
||||||
channel.duck_lines += 1
|
channel.duck_lines += 1
|
||||||
min_lines = channel.get_setting("ducks-min-messages", 40)
|
min_lines = channel.get_setting("ducks-min-messages",
|
||||||
|
DEFAULT_MIN_MESSAGES)
|
||||||
|
|
||||||
if channel.duck_lines >= min_lines:
|
if channel.duck_lines >= min_lines:
|
||||||
show_duck = random.SystemRandom().randint(1, 20) == 1
|
show_duck = random.SystemRandom().randint(1, 20) == 1
|
||||||
|
|
Loading…
Reference in a new issue