add hostmask_tracking.py to keep track of what hostmasks a user has used
This commit is contained in:
parent
38235b1667
commit
3f3845a964
1 changed files with 11 additions and 0 deletions
11
modules/hostmask_tracking.py
Normal file
11
modules/hostmask_tracking.py
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
from src import ModuleManager, utils
|
||||||
|
|
||||||
|
class Module(ModuleManager.BaseModule):
|
||||||
|
@utils.hook("new.user")
|
||||||
|
def new_user(self, event):
|
||||||
|
userhost = event["user"].userhost()
|
||||||
|
if not userhost == None:
|
||||||
|
known_hostmasks = event["user"].get_setting("known-hostmasks", [])
|
||||||
|
if not userhost in known_hostmasks:
|
||||||
|
known_hostmasks.append(userhost)
|
||||||
|
event["user"].set_setting("known-hostmasks", known_hostmasks)
|
Loading…
Reference in a new issue