vendor/bundle/ruby/1.8/gems/io-reactor-1.0.4/examples/chatserver.rb
### Handle the specified command from the specified user
Handle the specified command from the specified user
Handle the specified command from the specified user
def handleCommand( user, command, args )
		case command
		when /quit/
			disconnectUser( user, 'Quit' )
		when /shutdown/
			shutdown()
		when /who/
			user.addOutput( self.wholist(user) )
		else
			user.addOutput("Unknown command '#{command}'")
		end
	end
def handleCommand ( user , command , args ) case command when / quit / disconnectUser ( user , 'Quit' ) when / shutdown / shutdown ( ) when / who / user . addOutput ( self . wholist ( user ) ) else user . addOutput ( "Unknown command '#{command}'" ) end end
Handle the specified command from the specified user
Handle the specified command from the specified user
user
command
args