public function showusers($req, $res, $args)
    {
        Container::get('hooks')->fire('controller.admin.users.showusers');

        $search_ip = $args['ip'];

        if (!@preg_match('%^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$%', $search_ip) &&
            !@preg_match('%^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:'.
                '[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|'.
                '(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:'.
                '([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:)'.
                '{0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|'.
                '(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:)'.
                '{0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|'.
                '(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|'.
                '(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::'.
                '([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|'.
                '(([0-9A-Fa-f]{1,4}:){1,7}:))$%', $search_ip)) {
            throw new  RunBBException(__('Bad IP message'), 400);
        }

        // Fetch user count
        $num_users = $this->model->getNumUsersIp($search_ip);

        // Determine the user offset (based on $_GET['p'])
        $num_pages = ceil($num_users / 50);

        $p = (!Input::query('p') || Input::query('p') <= 1 || Input::query('p') > $num_pages) ?
            1 : intval(Input::query('p'));
        $start_from = 50 * ($p - 1);

        return View::setPageInfo([
            'title' => [Utils::escape(ForumSettings::get('o_board_title')), __('Admin'),
                __('Users'), __('Results head')],
            'active_page' => 'admin',
            'admin_console' => true,
            'paging_links' => '<span class="pages-label">' . __('Pages') . ' </span>' .
                Url::paginateOld($num_pages, $p, '?ip_stats=' . $search_ip),
            'page' => $p,
            'start_from' => $start_from,
            'info' => $this->model->getInfoPoster($search_ip, $start_from),
        ])->display('@forum/admin/users/show_users');
    }