replace guard dog consul
This commit is contained in:
parent
d1f6b8d318
commit
1e4e919910
21
modules/ban_join.py
Normal file
21
modules/ban_join.py
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Bans a user as soon as they join a channel.
|
||||||
|
"""
|
||||||
|
import time
|
||||||
|
|
||||||
|
from module import user_joined
|
||||||
|
from tools import configureHostMask
|
||||||
|
|
||||||
|
@user_joined(True)
|
||||||
|
def ban_join(bot, trigger):
|
||||||
|
"""
|
||||||
|
Bans a user as soon as they join a channel.
|
||||||
|
"""
|
||||||
|
banhee = trigger.nick
|
||||||
|
banmask = configureHostMask(banhee)
|
||||||
|
period = 30
|
||||||
|
|
||||||
|
bot.mode(trigger.channel, True, "b", mask=banmask)
|
||||||
|
time.sleep(period)
|
||||||
|
bot.mode(trigger.channel, False, "b", mask=banmask)
|
Loading…
Reference in New Issue
Block a user