znmud-0.0.1/benchmark/
znmud-0.0.1/cmd/
znmud-0.0.1/cmd/emotes/
znmud-0.0.1/cmd/objects/
znmud-0.0.1/cmd/tiny/
znmud-0.0.1/doc/
znmud-0.0.1/farts/
znmud-0.0.1/lib/
znmud-0.0.1/lib/combat/
znmud-0.0.1/lib/core/bodytypes/
znmud-0.0.1/lib/engine/
znmud-0.0.1/lib/farts/
znmud-0.0.1/logs/
#
# 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