fix double plugin header
This commit is contained in:
4
motd.py
4
motd.py
@@ -12,7 +12,6 @@ def onGetMotdCommand(sender, args):
|
|||||||
@hook.command("setmotd")
|
@hook.command("setmotd")
|
||||||
def onSetMotdCommand(sender, args):
|
def onSetMotdCommand(sender, args):
|
||||||
global motd
|
global motd
|
||||||
plugHeader(sender, "MOTD")
|
|
||||||
if sender.hasPermission("utils.setmotd"):
|
if sender.hasPermission("utils.setmotd"):
|
||||||
if not checkargs(sender, args, 1, -1):
|
if not checkargs(sender, args, 1, -1):
|
||||||
return True
|
return True
|
||||||
@@ -20,10 +19,11 @@ def onSetMotdCommand(sender, args):
|
|||||||
motd = colorify(" ".join(args).replace("\\n", "\n"))
|
motd = colorify(" ".join(args).replace("\\n", "\n"))
|
||||||
broadcast("", plugHeader(name="MOTD"))
|
broadcast("", plugHeader(name="MOTD"))
|
||||||
broadcast("", "&aNew MOTD:&r\n%s" % motd)
|
broadcast("", "&aNew MOTD:&r\n%s" % motd)
|
||||||
|
broadcast(" ")
|
||||||
else:
|
else:
|
||||||
noperm(sender)
|
noperm(sender)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@hook.event("server.ServerListPingEvent")
|
@hook.event("server.ServerListPingEvent")
|
||||||
def onServerPing(event):
|
def onServerPing(event):
|
||||||
event.setMotd(motd)
|
event.setMotd(motd)
|
||||||
|
|||||||
Reference in New Issue
Block a user