-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
771 lines (744 loc) · 14.9 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
/*
* JWChat, a web based jabber client
* Copyright (C) 2003-2004 Stefan Strigler <steve@zeank.in-berlin.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* Please visit http://jwchat.sourceforge.net for more information!
*/
/*
* This is the main configuration file for the chat client itself.
* You have to edit this before you can use jwchat on your website!
*
* Have a look at the README for hints and troubleshooting!
*/
if (top.location.pathname.match(/\/eu\//)) {
var SITENAME = "eu.xfaction.net";
} else {
var SITENAME = "xfaction.net";
}
// US Realms
var BL_REALMS = [
'AmanThul',
'Barthilas',
'Blackrock',
'Caelestrasz',
'DathRemar',
'Dreadmaul',
'Frostmourne',
'Frostwolf',
'Khazgoroth',
'KilJaeden',
'Kilrogg',
'Nagrand',
'Nerzhul',
'Proudmoore',
'Senjin',
'Silver-Hand',
'Thaurissan',
'Tichondrius',
'Veknilash'
];
var C_REALMS = [
'Azjol-Nerub',
'Bloodscalp',
'Boulderfist',
'Bronzebeard',
'Crushridge',
'Daggerspine',
'Darkspear',
'Draenor',
'Dragonblight',
'Dunemaul',
'Feathermoon',
'Perenolde',
'Stonemaul',
'Stormscale',
'Suramar',
'Uldum'
];
var E_REALMS = [
'Antonidas',
'Borean-Tundra',
'Cairne',
'DrakTharon',
'Drenden',
'Farstriders',
'Garrosh',
'Hydraxis',
'MokNathal',
'Moon-Guard',
'Nazgrel',
'Nesingwary',
'Nordrassil',
'Queldorei',
'Rivendare',
'Shandris',
'Tortheldrin',
'Wyrmrest-Accord'
];
var N_REALMS = [
'Aerie-Peak',
'Altar-of-Storms',
'Alterac-Mountains',
'Anvilmar',
'Arygos',
'Blackwing-Lair',
'Deathwing',
'Demon-Soul',
'Doomhammer',
'Gnomeregan',
'Icecrown',
'Jaedenar',
'KelThuzad',
'Lethon',
'Onyxia',
'Sentinels',
'Tanaris',
'The-Venture-Co',
'Uldaman',
'Undermine'
];
var RAM_REALMS = [
'Alexstrasza',
'Alleria',
'Balnazzar',
'Blackhand',
'Chogall',
'Destromath',
'Dethecus',
'Garona',
'Gorgonnash',
'Guldan',
'Hellscream',
'Illidan',
'Kaelthas',
'Kirin-Tor',
'Ravencrest',
'Spinebreaker',
'Stormreaver',
'Whisperwind'
];
var REC_REALMS = [
'Arathor',
'Bonechewer',
'Dragonmaw',
'EldreThalas',
'Firetree',
'Frostmane',
'Gurubashi',
'Nathrezim',
'Scarlet-Crusade',
'Shadow-Council',
'Shadowsong',
'Silvermoon',
'Skywall',
'Smolderthorn',
'Spirestone',
'Terenas',
'Windrunner'
];
var RET_REALMS = [
'Area-52',
'Auchindoun',
'Azuremyst',
'Blades-Edge',
'Blood-Furnace',
'Coilfang',
'Dawnbringer',
'Exodar',
'Fizzcrank',
'Galakrond',
'Ghostlands',
'Grizzly-Hills',
'Shattered-Halls',
'Terokkar',
'The-Scryers',
'The-Underbog',
'Velen',
'Zangarmarsh'
];
var RU_REALMS = [
'Argent-Dawn',
'Arthas',
'Azgalor',
'Bleeding-Hollow',
'Bloodhoof',
'Durotan',
'Elune',
'Lothar',
'Madoran',
'Magtheridon',
'Mannoroth',
'Medivh',
'Shattered-Hand',
'Skullcrusher',
'Stormrage',
'Trollbane',
'Warsong',
'Zuljin'
];
var SHA_REALMS = [
'Agamaggan',
'Azshara',
'Baelgun',
'Dark-Iron',
'Detheroc',
'Emerald-Dream',
'Greymane',
'Kalecgos',
'Lightninghoof',
'Maelstrom',
'Malfurion',
'Moonrunner',
'Nazjatar',
'Sargeras',
'Staghelm',
'Twisting-Nether',
'Ursin',
'Wildhammer'
];
var SS_REALMS = [
'Andorhal',
'Anetheron',
'Archimonde',
'Black-Dragonflight',
'Dalaran',
'Dalvengyr',
'Dentarg',
'Duskwood',
'Executus',
'Haomarush',
'Khadgar',
'MalGanis',
'Norgannon',
'Scilla',
'Steamwheedle-Cartel',
'Thrall',
'Turalyon',
'Ysera',
'Ysondre',
'Zuluhed'
];
var VEN_REALMS = [
'Aegwynn',
'Akama',
'Chromaggus',
'Drakthul',
'Draka',
'Eitrigg',
'Garithos',
'Gundrak',
'Hakkar',
'JubeiThos',
'Khaz-Modan',
'Korgath',
'Kul-Tiras',
'Malorne',
'Mugthol',
'Muradin',
'Rexxar',
'Runetotem',
'Saurfang',
'Thorium-Brotherhood'
];
var VIN_REALMS = [
'Aggramar',
'Burning-Blade',
'Burning-Legion',
'Earthen-Ring',
'Eonar',
'Eredar',
'Gilneas',
'Gorefiend',
'Kargath',
'Laughing-Skull',
'Lightnings-Blade',
'Llane',
'Malygos',
'Shadow-Moon',
'Thunderhorn',
'Thunderlord',
'Drakkari',
'QuelThalas',
'Ragnaros'
];
var W_REALMS = [
'Anubarak',
'Blackwater-Raiders',
'Bladefist',
'Cenarion-Circle',
'Cenarius',
'Darrowmere',
'Echo-Isles',
'Fenris',
'Hyjal',
'Korialstraaz',
'Lightbringer',
'Maiev',
'Misha',
'Ravenholdt',
'Shuhalo',
'Sisters-of-Elune',
'The-Forgotten-Coast',
'Uther',
'Vashj',
'Winterhoof'
];
var US_REALMS = new Array();
US_REALMS = US_REALMS.concat(BL_REALMS);
US_REALMS = US_REALMS.concat(C_REALMS);
US_REALMS = US_REALMS.concat(E_REALMS);
US_REALMS = US_REALMS.concat(N_REALMS);
US_REALMS = US_REALMS.concat(RAM_REALMS);
US_REALMS = US_REALMS.concat(REC_REALMS);
US_REALMS = US_REALMS.concat(RET_REALMS);
US_REALMS = US_REALMS.concat(RU_REALMS);
US_REALMS = US_REALMS.concat(SHA_REALMS);
US_REALMS = US_REALMS.concat(SS_REALMS);
US_REALMS = US_REALMS.concat(VEN_REALMS);
US_REALMS = US_REALMS.concat(VIN_REALMS);
US_REALMS = US_REALMS.concat(W_REALMS);
US_REALMS.sort();
// EU English Realms
var EU_EN_BLA_REALMS = [
'Agamaggan',
'Aggramar',
'AlAkir',
'Arathor',
'Aszune',
'Azjol-Nerub',
'Bladefist',
'Bloodhoof',
'Bloodscalp',
'Burning-Blade',
'Doomhammer',
'Draenor',
'Dragonblight',
'Emerald-Dream',
'Sunstrider',
'Twilights-Hammer',
'Zenedar'
];
var EU_EN_BL_REALMS = [
'Argent-Dawn',
'Burning-Legion',
'Crushridge',
'Daggerspine',
'Deathwing',
'Dragonmaw',
'Dunemaul'
];
var EU_EN_CY_REALMS = [
'Earthen-Ring',
'Ravencrest',
'Runetotem',
'Shadowsong',
'Shattered-Hand',
'Silvermoon',
'Skullcrusher',
'Spinebreaker',
'Stormrage',
'Stormreaver',
'Stormscale',
'Terenas',
'Thunderhorn',
'Turalyon'
];
var EU_EN_CO_REALMS = [
'Balnazzar',
'Genjuros',
'Hellscream',
'Laughing-Skull',
'Magtheridon',
'Nordrassil',
'QuelThalas'
];
var EU_EN_RA_REALMS = [
'Bloodfeather',
'Darksorrow',
'Defias-Brotherhood',
'Frostwhisper',
'Haomarush',
'Lightnings-Blade',
'Neptulon',
'Ragnaros',
'Sylvanas',
'The-Maelstrom',
'The-Venture-Co.',
'Twisting-Nether',
'Vashj'
];
var EU_EN_RE_REALMS = [
'AhnQiraj',
'Bronzebeard',
'Chromaggus',
'Dentarg',
'Drakthul',
'Emeriss',
'Executus',
'Khadgar',
'Kul-Tiras',
'Mazrigos',
'Moonglade',
'Talnivarr',
'Trollbane'
];
var EU_EN_RU_REALMS = [
'Azuremyst',
'Blades-Edge',
'Hakkar',
'Scarshield-Legion',
'Steamwheedle-Cartel',
'Terokkar',
'Xavius'
];
var EU_EN_MI_REALMS = [
'Aerie-Peak',
'Boulderfist',
'Chamber-of-the-Aspects',
'Eonar',
'Frostmane',
'Grim-Batol',
'Jaedenar',
'Kazzak',
'Kilrogg',
'Outland',
'Ravenholdt',
'Saurfang',
'Tarren-Mill',
'Veknilash',
'Wildhammer'
];
var EU_EN_NF_REALMS = [
'Alonsus',
'Anachronos',
'Bronze-Dragonflight',
'Burning-Steppes',
'Darkmoon-Faire',
'Darkspear',
'Korgall',
'Lightbringer'
];
var EU_EN_VI_REALMS = [
'Auchindoun',
'Ghostlands',
'Hellfire',
'Karazhan',
'Nagrand',
'Shattered-Halls',
'Sporeggar',
'The-Shatar'
];
// EU French Realms
var EU_FR_CA_REALMS = [
'Archimonde',
'Chogall',
'Dalaran',
'Elune',
'Hyjal',
'Illidan',
'Kaelthas',
'Kirin-Tor',
'Nerzhul',
'Sargeras',
'Sinstralis'
];
var EU_FR_FE_REALMS = [
'Conseil-des-Ombres',
'DrekThar',
'Khaz-Modan',
'Les-Sentinelles',
'Rashgarroth',
'ThrokFeroth',
'Varimathras'
];
var EU_FR_VE_REALMS = [
'Arathi',
'Culte-de-la-Rive-noire',
'EldreThalas',
'Krasus',
'Suramar',
'Ysondre'
];
var EU_FR_NE_REALMS = [
'Arak-arahm',
'Confrérie-du-Thorium',
'Eitrigg',
'Garona',
'La-Croisade-écarlate',
'Medivh',
'Uldaman',
'Voljin'
];
var EU_FR_RE_REALMS = [
'Chants-éternels',
'Les-Clairvoyants',
'Marécage-de-Zangar',
'Naxxramas',
'Temple-noir'
];
// EU Deutsch Realms
var EU_DE_TO_REALMS = [
'Alexstrasza',
'Alleria',
'Antonidas',
'Baelgun',
'Blackhand'
];
var EU_DE_BL_REALMS = [
'Aegwynn',
'Destromath',
'Die-Silberne-Hand',
'Eredar',
'Frostmourne',
'Frostwolf',
'Gorgonnash',
'Guldan',
'KelThuzad',
'KilJaeden',
'Madmortem',
'MalGanis',
'Malfurion',
'Mannoroth',
'Nathrezim',
'Nozdormu',
'Perenolde',
'Proudmoore',
'Zirkel-des-Cenarius',
'Zuluhed'
];
var EU_DE_RA_REALMS = [
'AmanThul',
'Anubarak',
'Das-Syndikat',
'Der-Rat-von-Dalaran',
'Dun-Morogh',
'Kragjin',
'Kult-der-Verdammten',
'Nerathor',
'Onyxia',
'Senjin',
'Terrordar',
'Theradras',
'Wrathbringer'
];
var EU_DE_VE_REALMS = [
'Gilneas',
'Kargath',
'Khazgoroth',
'Lothar',
'Malygos',
'Rexxar',
'Ysera'
];
var EU_DE_GL_REALMS = [
'Anetheron',
'Arthas',
'Azshara',
'Blackmoore',
'Blackrock',
'Die-Arguswacht',
'Die-ewige-Wacht',
'Die-Todeskrallen',
'Durotan',
'Nazjatar',
'Nefarian',
'Thrall',
'Tichondrius'
];
var EU_DE_SC_REALMS = [
'Ambossar',
'Dalvengyr',
'Der-abyssische-Rat',
'Die-Nachtwache',
'Lordaeron',
'Malorne',
'Mugthol',
'Rajaxx',
'Taerar',
'Tirion',
'Ulduar',
'Veklor'
];
var EU_DE_HI_REALMS = [
'Area-52',
'Arygos',
'Der-Mithrilorden',
'Dethecus',
'Forscherliga',
'Garrosh',
'Norgannon',
'Teldrassil',
'Todeswache',
'UnGoro'
];
var EU_DE_ST_REALMS = [
'Blutkessel',
'Das-Konsortium',
'Die-Aldor',
'Echsenkessel',
'Festung-der-Stürme',
'Nethersturm',
'Shattrath'
];
// EU Spanish Realms
var EU_ESP_CR_REALMS = [
'Colinas-Pardas',
'CThun',
'Dun-Modr',
'Los-Errantes',
'Minahonda',
'Sanguino',
'Shendralar',
'Tyrande',
'Uldum',
'ZulJin',
'Próximamente'
];
// EU Russian Realms
var EU_RU_WK_REALMS = [
'Азурегос',
'Пиратская-бухта',
'Ясеневый-лес',
'Вечная-Песня',
'Термоштепсель',
'Страж-смерти',
'Гордунни',
'Гром',
'Король-лич',
'Свежеватель'
];
var EU_RU_BN_REALMS = [
'Седогрив',
'Подземье',
'Дракономор',
'Разувий',
'Ткач-Смерти'
];
var EU_REALMS = new Array();
EU_REALMS = EU_REALMS.concat(EU_EN_BLA_REALMS);
EU_REALMS = EU_REALMS.concat(EU_EN_BL_REALMS);
EU_REALMS = EU_REALMS.concat(EU_EN_CY_REALMS);
EU_REALMS = EU_REALMS.concat(EU_EN_CO_REALMS);
EU_REALMS = EU_REALMS.concat(EU_EN_RA_REALMS);
EU_REALMS = EU_REALMS.concat(EU_EN_RE_REALMS);
EU_REALMS = EU_REALMS.concat(EU_EN_RU_REALMS);
EU_REALMS = EU_REALMS.concat(EU_EN_MI_REALMS);
EU_REALMS = EU_REALMS.concat(EU_EN_NF_REALMS);
EU_REALMS = EU_REALMS.concat(EU_EN_VI_REALMS);
EU_REALMS = EU_REALMS.concat(EU_FR_CA_REALMS);
EU_REALMS = EU_REALMS.concat(EU_FR_FE_REALMS);
EU_REALMS = EU_REALMS.concat(EU_FR_VE_REALMS);
EU_REALMS = EU_REALMS.concat(EU_FR_NE_REALMS);
EU_REALMS = EU_REALMS.concat(EU_FR_RE_REALMS);
EU_REALMS = EU_REALMS.concat(EU_DE_TO_REALMS);
EU_REALMS = EU_REALMS.concat(EU_DE_BL_REALMS);
EU_REALMS = EU_REALMS.concat(EU_DE_RA_REALMS);
EU_REALMS = EU_REALMS.concat(EU_DE_VE_REALMS);
EU_REALMS = EU_REALMS.concat(EU_DE_GL_REALMS);
EU_REALMS = EU_REALMS.concat(EU_DE_SC_REALMS);
EU_REALMS = EU_REALMS.concat(EU_DE_HI_REALMS);
EU_REALMS = EU_REALMS.concat(EU_DE_ST_REALMS);
EU_REALMS = EU_REALMS.concat(EU_ESP_CR_REALMS);
EU_REALMS = EU_REALMS.concat(EU_RU_WK_REALMS);
EU_REALMS = EU_REALMS.concat(EU_RU_BN_REALMS);
EU_REALMS.sort();
if (SITENAME == 'eu.xfaction.net') {
var REALMS = EU_REALMS;
} else {
var REALMS = US_REALMS;
}
/* BACKENDS
* Array of objects each describing a backend.
*
* Required object fields:
* name - human readable short identifier for this backend
* httpbase - base address of http service [see README for details]
* type - type of backend, must be 'polling' or 'binding'
*
* Optional object fields:
* description - a human readable description for this backend
* servers_allowed - array of jabber server addresses users can connect to
* using this backend
*
* If BACKENDS contains more than one entry users may choose from a
* select box which one to use when logging in.
*
* If 'servers_allowed' is empty or omitted user is presented an input
* field to enter the jabber server to connect to by hand.
* If 'servers_allowed' contains more than one element user is
* presented a select box to choose a jabber server to connect to.
* If 'servers_allowed' contains one single element no option is
* presented to user.
*/
var BACKENDS =
[
{
name:"Native Binding",
description:"Ejabberd's native HTTP Binding backend",
httpbase:"/http-bind/",
type:"binding",
servers_allowed:[SITENAME]
}
];
var DEFAULTRESOURCE = "jwchat";
var DEFAULTPRIORITY = "10";
/* DEFAULTCONFERENCEGROUP + DEFAULTCONFERENCESERVER
* default values for joingroupchat form
*/
var DEFAULTCONFERENCEROOM = "support";
var DEFAULTCONFERENCESERVER = "conference."+SITENAME;
/* debugging options */
var DEBUG = false; // turn debugging on
var DEBUG_LVL = 2; // debug-level 0..4 (4 = very noisy)
var USE_DEBUGJID = false; // if true only DEBUGJID gets the debugger
var DEBUGJID = "admin@"+SITENAME; // which user get's debug messages
// most probably you don't want to change anything below
var timerval = 2000; // poll frequency in msec
var stylesheet = "jwchat.css";
var THEMESDIR = "themes";
/* Auto-login options. Define parameters for guest user account and
* when JWChat page is called with 'jid' parameter which is equal
* to GUEST_ACC value then configuration below is used for autologin.
* Sample configuration:
* var GUEST_ACC = "guest_2";
* var GUEST_PWD = "guestpwd";
* Sample call:
* http://jwchat.localhost/index.html?jid=guest_2
* will triger auto-login for the 'guest_2' account.
*
* As it is possible that many people try to login at the same time
* the auto-login function will generate random resource based on
* algorithm: DEFAULTRESOURCE + Math.round(Math.random()*1000)
*/
var GUEST_ACC = "";
var GUEST_PWD = "";
function createCookie(name,value,days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
document.cookie = name+"="+encodeURIComponent(value)+expires+"; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return decodeURIComponent(c.substring(nameEQ.length,c.length));
}
return null;
}