2
* JWChat, a web based jabber client
3
* Copyright (C) 2003-2004 Stefan Strigler <steve@zeank.in-berlin.de>
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
* Please visit http://jwchat.sourceforge.net for more information!
23
* This is the main configuration file for the chat client itself.
24
* You have to edit this before you can use jwchat on your website!
26
* Have a look at the README for hints and troubleshooting!
29
var SITENAME = "localhost";
32
* Array of objects each describing a backend.
34
* Required object fields:
35
* name - human readable short identifier for this backend
36
* httpbase - base address of http service [see README for details]
37
* type - type of backend, must be 'polling' or 'binding'
39
* Optional object fields:
40
* description - a human readable description for this backend
41
* servers_allowed - array of jabber server addresses users can connect to
44
* If BACKENDS contains more than one entry users may choose from a
45
* select box which one to use when logging in.
47
* If 'servers_allowed' is empty or omitted user is presented an input
48
* field to enter the jabber server to connect to by hand.
49
* If 'servers_allowed' contains more than one element user is
50
* presented a select box to choose a jabber server to connect to.
51
* If 'servers_allowed' contains one single element no option is
57
name:"Native Binding",
58
description:"Ejabberd's native HTTP Binding backend",
59
httpbase:"/http-bind/",
61
servers_allowed:[SITENAME]
64
name:"Native Polling",
65
description:"Ejabberd's native HTTP Polling backend",
66
httpbase:"/http-poll/",
68
servers_allowed:[SITENAME]
72
description:"HTTP Binding backend that allows connecting to any jabber server",
75
default_server: SITENAME
78
name:"Restricted Relay",
79
description:"This one let's you choose from a limited list of allowed servers",
82
servers_allowed:[SITENAME,'jabber.org','jwchat.org']
86
var DEFAULTRESOURCE = "jwchat";
87
var DEFAULTPRIORITY = "10";
89
/* DEFAULTCONFERENCEGROUP + DEFAULTCONFERENCESERVER
90
* default values for joingroupchat form
92
var DEFAULTCONFERENCEROOM = "talks";
93
var DEFAULTCONFERENCESERVER = "conference."+SITENAME;
95
/* debugging options */
96
var DEBUG = false; // turn debugging on
97
var DEBUG_LVL = 2; // debug-level 0..4 (4 = very noisy)
99
var USE_DEBUGJID = false; // if true only DEBUGJID gets the debugger
100
var DEBUGJID = "admin@"+SITENAME; // which user get's debug messages
103
// most probably you don't want to change anything below
105
var timerval = 2000; // poll frequency in msec
107
var stylesheet = "jwchat.css";
108
var THEMESDIR = "themes";
110
/* Auto-login options. Define parameters for guest user account and
111
* when JWChat page is called with 'jid' parameter which is equal
112
* to GUEST_ACC value then configuration below is used for autologin.
113
* Sample configuration:
114
* var GUEST_ACC = "guest_2";
115
* var GUEST_PWD = "guestpwd";
117
* http://jwchat.localhost/index.html?jid=guest_2
118
* will triger auto-login for the 'guest_2' account.
120
* As it is possible that many people try to login at the same time
121
* the auto-login function will generate random resource based on
122
* algorithm: DEFAULTRESOURCE + Math.round(Math.random()*1000)