merge master
with develop
This commit is contained in:
commit
afb32e4163
2 changed files with 8 additions and 2 deletions
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
from src import ModuleManager, utils
|
from src import ModuleManager, utils
|
||||||
|
|
||||||
|
CAP = utils.irc.Capability("message-tags", "draft/message-tags-0.2")
|
||||||
|
|
||||||
@utils.export("channelset", utils.Setting("greeting",
|
@utils.export("channelset", utils.Setting("greeting",
|
||||||
"Set a greeting to send to users when they join",
|
"Set a greeting to send to users when they join",
|
||||||
example="welcome to the channel!"))
|
example="welcome to the channel!"))
|
||||||
|
@ -10,5 +12,9 @@ class Module(ModuleManager.BaseModule):
|
||||||
def join(self, event):
|
def join(self, event):
|
||||||
greeting = event["channel"].get_setting("greeting", None)
|
greeting = event["channel"].get_setting("greeting", None)
|
||||||
if greeting:
|
if greeting:
|
||||||
|
tags = {}
|
||||||
|
if event["server"].has_capability(CAP):
|
||||||
|
tags["+draft/channel-context"] = event["channel"].name
|
||||||
|
|
||||||
event["user"].send_notice("[%s] %s" % (event["channel"].name,
|
event["user"].send_notice("[%s] %s" % (event["channel"].name,
|
||||||
greeting))
|
greeting), tags)
|
||||||
|
|
|
@ -5,7 +5,7 @@ dnspython ==2.0.0
|
||||||
feedparser ==6.0.2
|
feedparser ==6.0.2
|
||||||
html5lib ==1.0.1
|
html5lib ==1.0.1
|
||||||
isodate ==0.6.0
|
isodate ==0.6.0
|
||||||
lxml ==4.6.5
|
lxml ==4.9.1
|
||||||
netifaces ==0.10.9
|
netifaces ==0.10.9
|
||||||
PySocks ==1.7.1
|
PySocks ==1.7.1
|
||||||
python-dateutil ==2.8.1
|
python-dateutil ==2.8.1
|
||||||
|
|
Loading…
Reference in a new issue