If you want quick and don't mind dirty, you could just hijack the 'Simultaneous Sessions Limit' setting (in 'Server Settings and Optimization Options') for this purpose. Set this to however many guest sessions you want to allow, then find in includes/sessions.php:
PHP Code:
$sessions = $DB_site->query_first("SELECT COUNT(*) AS sessioncount FROM " . TABLE_PREFIX . "session");
and change to:
PHP Code:
$sessions = $DB_site->query_first("SELECT COUNT(*) AS sessioncount FROM " . TABLE_PREFIX . "session AS session WHERE session.userid = 0");
Then any guests trying to access the forum when the quota of guests sessions is full will get the busy message.
But of course this is not the way to go if you're already using this setting to limit the number of total sessions (guests
and members).