<commit_before>//
// $Id: SceneManager.java,v 1.2 2001/08/21 01:07:19 mdb Exp $

package com.threerings.whirled.server;

import com.threerings.cocktail.party.server.PlaceManager;
import com.threerings.whirled.data.Scene;

public class SceneManager extends PlaceManager
{
    public Scene getScene ()
    {
        return _scene;
    }

    /**
     * Called by the scene registry once the scene manager has been
     * created (and initialized), but before it is started up.
     */
    protected void postInit (Scene scene, SceneRegistry screg)
    {
        _scene = scene;
        _screg = screg;
    }

    /**
     * We're fully ready to go, so now we register ourselves with the
     * scene registry which will make us available to the clients and
     * system at large.
     */
    protected void didStartup ()
    {
        super.didStartup();
        _screg.sceneManagerDidInit(this);
    }

    protected void toString (StringBuffer buf)
    {
        super.toString(buf);
        buf.append("scene=").append(_scene);
    }

    protected Scene _scene;
    protected SceneRegistry _screg;
}
<commit_msg>Add chat support by default into the Whirled scene manager. This will probably come out again because it should really be added by the manager used by the target application. They may not want exactly the same kind of chat support.<commit_after>//
// $Id: SceneManager.java,v 1.3 2001/08/22 00:09:52 mdb Exp $

package com.threerings.whirled.server;

import com.threerings.cocktail.party.chat.ChatMessageHandler;
import com.threerings.cocktail.party.chat.ChatService;
import com.threerings.cocktail.party.server.PlaceManager;

import com.threerings.whirled.data.Scene;

public class SceneManager extends PlaceManager
{
    public Scene getScene ()
    {
        return _scene;
    }

    /**
     * Called by the scene registry once the scene manager has been
     * created (and initialized), but before it is started up.
     */
    protected void postInit (Scene scene, SceneRegistry screg)
    {
        _scene = scene;
        _screg = screg;
    }

    /**
     * We're fully ready to go, so now we register ourselves with the
     * scene registry which will make us available to the clients and
     * system at large.
     */
    protected void didStartup ()
    {
        super.didStartup();
        _screg.sceneManagerDidInit(this);

        // register a chat message handler because we want to support
        // chatting
        MessageHandler handler = new ChatMessageHandler();
        registerMessageHandler(ChatService.SPEAK_REQUEST, handler);
    }

    protected void toString (StringBuffer buf)
    {
        super.toString(buf);
        buf.append("scene=").append(_scene);
    }

    protected Scene _scene;
    protected SceneRegistry _screg;
}

{'fraction_non_alphanumeric': 0.08333333333333333, 'fraction_numerical': 0.011494252873563218, 'mean_word_length': 2.7083888149134485, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1214318', 'n_tokens_mistral': 831, 'n_tokens_neox': 779, 'n_words': 259}