Say.rb
RubyMud/Commands/Say.rb · 527 B
From the archive rbmud-0.1rc2.tar.gz
Download the archive « Back to the archive contents
require "Command.rb"
require "Commands.rb"
module RubyMud
class Say < Command
def words
return ["say","sing","utter"]
end
def initialize()
super()
end
def execute(clientConnection,string)
tokens = string.split(' ')
doing = tokens[0]
tokens.delete_at(0)
# Send the rest to the room
player = clientConnection.player
player.parent.roomTalkFromMobile(player,"#{doing}(s): \""+tokens.join(" ")+"\"")
end
end
# Create the instance, it adds itself to the commands list
Say.new()
end #module