diff options
author | jomo <github@jomo.tv> | 2014-07-16 00:33:43 +0200 |
---|---|---|
committer | jomo <github@jomo.tv> | 2014-07-16 00:33:43 +0200 |
commit | 1430a454ed18ac3a815cc4d39c7dffd2e6ac9e90 (patch) | |
tree | 493cbf18f33d635e7b3123438d8857f8544726c2 /motd.py | |
parent | d2ec8b6d3f2d0804dbf52e7931cb589e9b323acd (diff) |
removed camelcase, added more coding style to readme
Diffstat (limited to 'motd.py')
-rw-r--r-- | motd.py | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -3,27 +3,29 @@ from helpers import * motd = server.getMotd() + @hook.command("getmotd") -def onGetMotdCommand(sender, args): - plugHeader(sender, "MOTD") +def on_getmotd_command(sender, args): + plugin_header(sender, "MOTD") msg(sender, motd, usecolor=False) @hook.command("setmotd") -def onSetMotdCommand(sender, args): +def on_setmotd_command(sender, args): global motd if sender.hasPermission("utils.setmotd"): if not checkargs(sender, args, 1, -1): return True motd = colorify(" ".join(args).replace("\\n", "\n")) - broadcast("", plugHeader(name="MOTD")) + broadcast("", plugin_header(name="MOTD")) broadcast("", "&aNew MOTD:&r\n%s" % motd) broadcast(" ") else: noperm(sender) return True + @hook.event("server.ServerListPingEvent") -def onServerPing(event): +def on_server_ping(event): event.setMotd(motd) |