diff options
author | jomo <github@jomo.tv> | 2014-07-24 02:31:34 +0200 |
---|---|---|
committer | jomo <github@jomo.tv> | 2014-07-24 02:31:34 +0200 |
commit | fb60c0c1782845b535f692a74bc1f81c3392708f (patch) | |
tree | c7ddca58dd3f43ec44b48c68ad9023371cf3b77c /motd.py | |
parent | bdabfc00542553073af7ebcfcfc1e500a633f516 (diff) |
allow to reset motd
Diffstat (limited to 'motd.py')
-rw-r--r-- | motd.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,7 +1,8 @@ #pylint: disable = F0401 from helpers import * -motd = colorify(server.getMotd()) +default_motd = colorify(server.getMotd()) +motd = default_motd @hook.command("getmotd") def on_getmotd_command(sender, args): @@ -17,6 +18,10 @@ def on_setmotd_command(sender, args): return True motd = colorify(" ".join(args).replace("\\n", "\n")) + + if motd == "--reset": + motd = default_motd + broadcast(None, plugin_header(name="MOTD")) broadcast(None, "&aNew MOTD:&r\n%s" % motd) broadcast(None, " ") |