cmd_debugmode.rb

znmud-0.0.1/cmd/zombie/cmd_debugmode.rb · 676 B

From the archive znmud-minimal-0.0.1.tar.gz

Download the archive   « Back to the archive contents

#
# file::    cmd_debugmode.rb

# 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")

  # The enables extra debug info for builders/admins
  def cmd_debugmode(args)
    debugmode = get_stat(:debugmode)
    debugmode ? debugmode = false : debugmode = true
    msg = _("Toggled debug mode ")
    if debugmode
	msg << _("[COLOR Magenta]ON[/COLOR]")
    else
	msg << _("[COLOR Magenta]OFF[/COLOR]")
    end
    msg+"\n"
    set_stat(:debugmode, debugmode)
    sendto(msg)
  end

end

Site Stats

Snippets: 1791
Codebases: 571