mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
global: do not allow sending empty messages
This commit is contained in:
parent
f4de604b7d
commit
0edbeb7fad
@ -14,7 +14,12 @@ def g(irc, source, args):
|
||||
Sends out a Instance-wide notice.
|
||||
"""
|
||||
permissions.check_permissions(irc, source, ["global.global"])
|
||||
message = " ".join(args)
|
||||
message = " ".join(args).strip()
|
||||
|
||||
if not message:
|
||||
irc.error("Refusing to send an empty message.")
|
||||
return
|
||||
|
||||
global_conf = conf.conf.get('global') or {}
|
||||
template = string.Template(global_conf.get('format', DEFAULT_FORMAT))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user