# Class: MessageController

# MessageController

The Message controller.

# Public Instance Methods

### browser (curarea)

Show source...

        # File bbs/lib/controllers/message.rb, line 73
    73:   def browser(curarea)
    74:     Telegard.unimplmented
    75:   end

### listall (curarea)

Show source...

        # File bbs/lib/controllers/message.rb, line 77
    77:   def listall(curarea)
    78:     areameta = $db[:msgareas].where(:id => curarea).first
    79:
    80:     # Connect to message area database
    81:     areadb = Sequel.connect("jdbc:h2:tcp://localhost/msgareas/#{areameta[:id]}")
    82:
    83:     msgslist = Tgtemplate::Template.parse_dataset(areadb[:msgs].filter(:msgarea_id => $session.msgarea, :enabled =>true).all)
    84:     Tgtemplate.display('msgarea_list_msgs.ftl', {'msgs' => msglist, 'areaname' => areameta[:name].capitalize})
    85:
    86:     # Disconnect and destroy instance
    87:     areadb.disconnect
    88:     areadb = nil
    89:   end

### menu ()

Show source...

        # File bbs/lib/controllers/message.rb, line 58
    58:   def menu
    59:     done = false
    60:     validkeys=['/G']
    61:     until done == true
    62:       key = Tgio::Input.menuprompt('menu_message.ftl',validkeys, nil) # nil is for tpl vars hash
    63:       print "\n"
    64:       case key
    65:         when "/G"
    66:           puts "Goodbye!"
    67:           done = true
    68:           return 0
    69:       end #/case
    70:     end #/until
    71:   end