examples/chatserver.rb
def handle_command( user, command, args )
		case command

		when /quit/
			self.disconnect_user( user, 'Quit' )

		when /shutdown/
			self.shutdown

		when /who/
			user.add_output( self.wholist(user) )

		else
			user.add_output( "Unknown command '#{command}'" )
		end
	end
### Handle the given +command+ from the specified +user+
Handle the given +command+ from the specified +user+
Handle the given + command + from the specified + user +
def handle_command( user, command, args )
		case command
		when /quit/
			self.disconnect_user( user, 'Quit' )
		when /shutdown/
			self.shutdown
		when /who/
			user.add_output( self.wholist(user) )
		else
			user.add_output( "Unknown command '#{command}'" )
		end
	end
def handle_command ( user , command , args ) case command when / quit / self . disconnect_user ( user , 'Quit' ) when / shutdown / self . shutdown when / who / user . add_output ( self . wholist ( user ) ) else user . add_output ( "Unknown command '#{command}'" ) end end
Handle the given +command+ from the specified +user+
Handle the given + command + from the specified + user +
user
command
args