Login.rb
RubyMud/Commands/Login.rb · 569 B
From the archive rbmud-0.1rc2.tar.gz
Download the archive « Back to the archive contents
require "Command.rb"
require "Commands.rb"
require "Player.rb"
module RubyMud
class Login < Command
def words
return ["login"]
end
def initialize()
super()
end
#login username password
def execute(clientConnection,string)
tokens = string.split(' ')
if (tokens.length != 3)
return
end
clientConnection.player = Player.new($rootRoom,tokens[1],clientConnection)
clientConnection.send("Logged in\r\n")
print "going to make player\n"
end
end
# Create the instance, it adds itself to the commands list
Login.new()
end # module