change !fedi "!" arg to still show CW but also show content of Note
This commit is contained in:
parent
20a115e71d
commit
1c02de8a69
1 changed files with 7 additions and 4 deletions
|
@ -55,11 +55,11 @@ class Module(ModuleManager.BaseModule):
|
||||||
account = None
|
account = None
|
||||||
url = None
|
url = None
|
||||||
|
|
||||||
show_cw = True
|
strict_cw = True
|
||||||
args_split = event["args_split"][:]
|
args_split = event["args_split"][:]
|
||||||
for i, arg in enumerate(args_split):
|
for i, arg in enumerate(args_split):
|
||||||
if arg == "!":
|
if arg == "!":
|
||||||
show_cw = False
|
strict_cw = False
|
||||||
args_split.pop(i)
|
args_split.pop(i)
|
||||||
break
|
break
|
||||||
|
|
||||||
|
@ -101,8 +101,11 @@ class Module(ModuleManager.BaseModule):
|
||||||
shorturl = self.exports.get_one("shorturl")(event["server"], url,
|
shorturl = self.exports.get_one("shorturl")(event["server"], url,
|
||||||
context=event["target"])
|
context=event["target"])
|
||||||
|
|
||||||
if cw and show_cw:
|
if cw:
|
||||||
out = "CW: %s - %s" % (cw, shorturl)
|
if strict_cw:
|
||||||
|
out = "CW: %s - %s" % (cw, shorturl)
|
||||||
|
else:
|
||||||
|
out = "(CW %s) %s - %s" % (cw, out, shorturl)
|
||||||
else:
|
else:
|
||||||
out = "%s - %s" % (out, shorturl)
|
out = "%s - %s" % (out, shorturl)
|
||||||
event["stdout"].write(out)
|
event["stdout"].write(out)
|
||||||
|
|
Loading…
Reference in a new issue