public function listClockedInUsers(&$irc, &$data) { if (!$this->_isAuthenticated($irc, $data)) { return; } $list = User::getClockedInList(); if (count($list) == 0) { $this->sendResponse($irc, $data->nick, 'There are no clocked-in users as of now.'); } else { $this->sendResponse($irc, $data->nick, 'The following is the list of clocked-in users:'); foreach ($list as $name => $email) { $this->sendResponse($irc, $data->nick, "{$name}: {$email}"); } } }
/** * Format is "list-clocked-in" * * @param Net_SmartIRC $irc * @param Net_SmartIRC_data $data */ public final function listClockedIn(Net_SmartIRC $irc, Net_SmartIRC_data $data) { if (!$this->isAuthenticated($data)) { return; } $list = User::getClockedInList(); if (count($list) == 0) { $this->sendResponse($data->nick, 'There are no clocked-in users as of now.'); return; } $this->sendResponse($data->nick, 'The following is the list of clocked-in users:'); foreach ($list as $name => $email) { $this->sendResponse($data->nick, "{$name}: {$email}"); } }