fix double plugin header

This commit is contained in:
jomo
2014-07-09 00:24:55 +02:00
parent 2d02165d06
commit a87b9eb9d1

View File

@@ -12,7 +12,6 @@ def onGetMotdCommand(sender, args):
@hook.command("setmotd")
def onSetMotdCommand(sender, args):
global motd
plugHeader(sender, "MOTD")
if sender.hasPermission("utils.setmotd"):
if not checkargs(sender, args, 1, -1):
return True
@@ -20,10 +19,11 @@ def onSetMotdCommand(sender, args):
motd = colorify(" ".join(args).replace("\\n", "\n"))
broadcast("", plugHeader(name="MOTD"))
broadcast("", "&aNew MOTD:&r\n%s" % motd)
broadcast(" ")
else:
noperm(sender)
return True
@hook.event("server.ServerListPingEvent")
def onServerPing(event):
event.setMotd(motd)
event.setMotd(motd)