if (Config::getValue("nickservPassword")) { $server->identifyWithNickServ(); } // Connect commands ModuleManager::runConnectCommands(); // Loop through the channels in the config and join them $channels = Config::getValue("channels"); foreach ($channels as $channel) { $server->join($channel); } // Loop-edy-loop while ($server->connected()) { $line = $server->getNextLine(); $line = new ReceivedLine($line); $line->parse(); if ($line->isMappedCommand()) { $command = new Command($line); $command->execute(); } if ($line->isMappedEvent()) { $event = new Event($line); $event->execute(); } if ($line->isMappedTrigger()) { $trigger = new Trigger($line); $trigger->execute(); } if (time() - 2 >= $lastUpdate) { $db->updateScriptArrays(); $db->updateDatabase(); $lastUpdate = time();