lib/meimei/client.rb
# Starts the main event loop.
Starts the main event loop.
Starts the main event loop .
def start
      self.load_plugins()
      @running = true
      while @running
        @servers.each do |server|
          unless server.is_connected
            if server.reconnect_delay_passed? && server.connect
              server.write("PASS #{@password}") if @password
              server.write("NICK #{@nick}")
              server.write("USER #{@username} hostname servername :#{@username}")
            end
          end
          autoping()
          check_timer_plugins()
          @current_server = self.select()
          if @current_server
            msg = @current_server.read
            if msg != nil
              autojoin_on_recognize(server, msg)
              process_message(msg)
            end
          end
        end        
      end
    end
def start self . load_plugins ( ) @running = true while @running @servers . each do | server | unless server . is_connected if server . reconnect_delay_passed? && server . connect server . write ( "PASS #{@password}" ) if @password server . write ( "NICK #{@nick}" ) server . write ( "USER #{@username} hostname servername :#{@username}" ) end end autoping ( ) check_timer_plugins ( ) @current_server = self . select ( ) if @current_server msg = @current_server . read if msg != nil autojoin_on_recognize ( server , msg ) process_message ( msg ) end end end end end
Starts the main event loop.
Starts the main event loop .