This repository was archived by the owner on Apr 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.js
More file actions
144 lines (115 loc) · 5.33 KB
/
config.js
File metadata and controls
144 lines (115 loc) · 5.33 KB
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
/*
* lightIRC configuration
* www.lightIRC.com
*
* You can add or change these parameters to customize lightIRC.
* Please see the full parameters list at http://redmine.lightirc.com/projects/lightirc/wiki/Customization_parameters
*
*/
var params = {};
/* Change these parameters */
params.host = "irc.techtronix.net";
params.port = 6697;
params.policyPort = 8430;
/* Language for the user interface. Currently available translations: ar, bd, bg, br, cz, da, de, el, en, es, et, fi, fr, hu, hr, id, it, ja, lv, nl, no, pl, pt, ro, ru, sk, sl, sq, sr_cyr, sr_lat, sv, th, tr, uk */
/* params.language = "en"; */
/* Relative or absolute URL to a lightIRC CSS file.
* The use of styles only works when you upload lightIRC to your webspace.
* Example: css/lightblue.css
*/
params.styleURL = "css/lightblue.css";
/* Nick to be used. A % character will be replaced by a random number */
params.nick = "Guest_%";
/* Channel to be joined after connecting. Multiple channels can be added like this: #lightIRC,#test,#help */
/* params.autojoin = "#lounge"; */
/* Commands to be executed after connecting. E.g.: /mode %nick% +x */
params.perform = "";
/* Whether the server window (and button) should be shown */
params.showServerWindow = true;
/* Show a popup to enter a nickname */
params.showNickSelection = true;
/* Adds a password field to the nick selection box */
params.showIdentifySelection = true;
/* Show button to register a nickname */
params.showRegisterNicknameButton = true;
/* Show button to register a channel */
params.showRegisterChannelButton = true;
/* Opens new queries in background when set to true */
params.showNewQueriesInBackground = false;
/* Position of the navigation container (where channel and query buttons appear). Valid values: left, right, top, bottom */
params.navigationPosition = "bottom";
/* See more parameters at http://redmine.lightirc.com/projects/lightirc/wiki/Customization_parameters */
params.ssl = true;
params.rememberNickname = true;
params.showNickPrefixIcons = false;
params.realname = "Techtronix lightIRC User";
params.quitMessage = "Page closed";
params.defaultBanmask = "*!*@%host%";
params.performContinuousWhoRequests = true;
params.identifyCommand = "/ns identify %nick% %pass%";
params.registerNicknameCommand = "/ns register %password% %mail%";
params.registerChannelCommand = "/cs register %channel% %description%";
/* Use this method to send a command to lightIRC with JavaScript */
function sendCommand(command) {
swfobject.getObjectById('lightIRC').sendCommand(command);
}
/* Use this method to send a message to the active chatwindow */
function sendMessageToActiveWindow(message) {
swfobject.getObjectById('lightIRC').sendMessageToActiveWindow(message);
}
/* Use this method to set a random text input content in the active window */
function setTextInputContent(content) {
swfobject.getObjectById('lightIRC').setTextInputContent(content);
}
/* This method gets called if you click on a nick in the chat area */
function onChatAreaClick(nick, ident, realname, channel, host) {
//alert("onChatAreaClick: "+nick);
}
/* This method gets called if you use the parameter contextMenuExternalEvent */
function onContextMenuSelect(type, nick, ident, realname, channel, host) {
alert("onContextMenuSelect: "+nick+" for type "+type);
}
/* This method gets called if you use the parameter loopServerCommands */
function onServerCommand(command) {
return command;
}
/* This method gets called if you use the parameter loopClientCommands */
function onClientCommand(command) {
return command;
}
/* This method gets called every time the user changes the active window */
function onActiveWindowChange(window) {
//alert("Active window: "+window);
}
function onPolicyError() {
alert('An error occured while trying to connect to Techtronix. Please contact us via our website for assistance.');
}
/* This event ensures that lightIRC sends the default quit message when the user closes the browser window */
window.onbeforeunload = function() {
swfobject.getObjectById('lightIRC').sendQuit();
}
/* This loop escapes % signs in parameters. You should not change it */
for(var key in params) {
params[key] = params[key].toString().replace(/%/g, "%25");
}
/* Stuff added by Techtronix */
var windowUrl = window.location.href; // Store the URL
if (getMyUri("autojoin", windowUrl) != "")
{
params.autojoin = getMyUri("autojoin", windowUrl);
} else { params.autojoin = "#lounge" };
if (getMyUri("language", windowUrl) != "")
{
params.language = getMyUri("language", windowUrl);
} else { params.language = "en" }; // Invalid languages default to "en"
/** Get a paramter out of a URL
* @param n The key that you are looking up
* @param s The URL
* @return The value, if found, or an empty string
*/
function getMyUri(n,s)
{
n = n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");
var p = (new RegExp("[\\?&]"+n+"=([^&#]*)")).exec(s);
return (p===null) ? "" : p[1];
}