#
# file:: cmd_motd.rb
require 'olc/editor'
# This source code copyright (C) 2009 Craig Smith
# All rights reserved.
#
# Released under the terms of the TeensyMUD Public License
# See LICENSE file for additional information.
#
module Cmd
bindtextdomain("cmd")
# Message of the Day
def cmd_motd(args)
if not world.is_admin? id
if world.motd
add_event(id, id, :show, world.motd)
else
add_event(id, id, :show, _("There are no posted MOTD."))
end
return
end
# Else we are an admin so we can set the MOTD if we want
new = _("new")
edit = _("edit")
case args
when nil, ""
if world.motd
add_event(id, id, :show, world.motd)
else
add_event(id, id, :show, _("There are no posted MOTD."))
end
when new, edit
@mode = :olc
@olc = Editor.new(id, world, "motd")
else
sendto _("Admin Usage: @motd new")
end
end
end