<?php

class MainController extends Controller {

    public function filters() {
        return array(
            'accessControl',
        );
    }

    public function accessRules() {
        return array(
            array('allow',
                'actions' => array('index', 'chat', 'town'),
                'users' => array('@'),
            ),
            array('deny',
                'users' => array('*'),
            //'deniedCallback' => $this->redirect('?r=site/index');
            )
        );
    }

    public function actions() {
        return array(
            'page' => array(
                'class' => 'CViewAction',
            ),
        );
    }

    public function actionIndex() {
        $this->render('index');
    }
    
    public function actionTown() {
        $this->render('town');
    }

}
