Willow Chat

Configuration

willowchat.cfg controls a number of Willow Chat options. When willowchat is run it will look for wc.cfg in its directory. You can use a different location with willowchat --config /path/to/custom.cfg. The default file is show below:

{
    "debug": 0,
    "listen": [
        "http://:8007"
    ],
    "backend": "irc://localhost:9999",
    "startBuiltin": true,
    "rooms": {
        // basic is a class of rooms
        //
        "default": {
            "display": {
                "floating": true,
                "floatingToggle": false,
                "width": 400,
                "height": 300,
                "theme": "simple",
                "resizable": true,
                "greeting": "Willow Chat"
// TODO: allow custom css
//                "customCss": 'http://www.exmaple.com/style.css'
            },
            "roomAssignmentMode": "static",
            "staticRoomName": "main"
        },
        "roomPerPage": {
            "display": {
                "floating": true,
                "floatingToggle": true,
                "width": 400,
                "height": 300,
                "theme": "simple",
                "resizable": true,
                "greeting": "My Chat Room"
            },
            "roomAssignmentMode": "referrer"
        }
    }
}

Global

debug

boolean

Setting debug to true makes Willow Chat display verbose messages.

listen

list of strings

Specifies a list of interfaces and ports for Willow Chat to listen on. Each entry should look like an http uri, for instance "http://127.0.0.1:8000" means that orbited should bind to 127.0.0.1 on port 8000. If you want to bind to all interfaces, just specify the port, like so "http://:80" which will have Willow Chat listen on all interfaces, port 80.

backend

string

This option is used to specify the protocol, hostname, and port of the back-end server. At this point, only the irc protocol is supported. If the back-end server is running locally on port 6667, the value of this field should be "irc://127.0.0.1:6667"

startBuiltin

boolean

Willow Chat comes with a built-in irc server that you can run if you want to avoid installing an additional component. IF you set the startBuiltin option to true, then the Willow Chat daemon will start an irc server and bind to the hostname and port as specified in the back-end server.

builtinBindAddr

string

Sometimes you want the builtin server to bind to a different interface than you specify as the back-end server. For instance, if you specify the back-end irc server as "irc://localhost:6667", and enabled the built-in server, then it will only listen to connections from localhost. To make the server listen to all connections, set the value of builtinBindAddr = ""

rooms

dictionary

This section defines classes of rooms. Note that a class of room doesn't map directly to a room. You might make a class of room called "siteWideChat" where users are always put in the same chat room, and an additional class called "refererChat" where every page gets its own chat room.

display

floating

boolean

Controls whether Willow Chat sits in the lower-right hand corner or remains embedded in the is movable by the page designer.

floatingToggle

boolean

value of true will cause the gui to display a button that allows users to toggle the chat room between the floating mode and the embedded mode. This option can be set rather or not floating is true, thus allowing embedded chat rooms to be turned into floating chat rooms per user discretion.

width

int

The width of the Willow Chat GUI. (This can be overridden with container options)

height

The height of the Willow Chat GUI. (This can be overriden with container options)

theme

string

Willow Chat uses predefined themes, this settings let you select which one to use.

resizable

boolean

Controls whether the gui is resizable or not

greeting

string

The message displayed on the login screen.

roomAssignmentMode

string

One of "static", "referer", "given". "static" means that all rooms of this class go to a given roomId. "referer" means that the roomId will be determined based on the http refer such that each webpage chatroom has a unique roomId. "given" means that the roomId will be supplied by the container options.

staticRoomName

string

if the roomAssignmentMode is "static", then the staticRoomName is used to specify that static name. Don't include any back-end specific naming conventions. (That is, don't use "#willowchat" when you're using an irc back-end -- just use "willowchat")