зеркало из https://github.com/mozilla/pjs.git
* Makefile.in, makefile.win
Install new css files and alternate images. * README Removed some rot. * events.js Add ability to disable a hook without uninstalling it. Changed return value of addHook to the new hook object. Added getHook(name) method. Removed unused variable from routeEvent. * http.js, irc-debug.js Fixed spelling error. * irc.js network.onConnect no longer forwards the event to the server. Added getModeStr() method to the IRCChanMode object to retrieve the entire mode string for a channel. * utils.js Added Clone() constructor. Fixed problem in stringTrim. Added getStackTrace() ... Whoopee!! ... * bsconnection.c, bsutil.c Stop warnings on Mac. * index.html Change links to buttons to avoid troubles with other methods (href="javascript:f()" | (href="javascript:(void 0)" | href="#") onclick="f()") * test3-commands.js Wiring for /testdisplay and /msg commands. * test3-handlers.js Added debug message toggle menuitem handler. Added style change menu item handler. Added hack to work around bad KeyUp events. Factored out some logic from onInputCompleteLine into getObjectDetails (in test3-static.js) Added /testdisplay and /msg implementation. Fixed error message for unknown network passed to /network. Added topicDate to output of /topic command. updateNetwork and updateChannel calls sprinkled throughout to keep the statusbar current. Added topic change handler. * test3-static.js Post new messages top to bottom!! Disable the debug hook by default. Added getObjectDetails (factored out of test3-handlers.js) Added setOutputStyle to dynamically change the .cs file used for the output window. Implemented updateNetwork and updateChannel. Massive changes to .display methods make output window now display using a table, instead of spans (much faster, btw.) Fixed addHistory to trim the correct side of the output, regardless of print direction. * test3.css Factored out output window styles. * test3.xul Added menu options for debug message toggle and style changes. Added statusbar (table.) * test3-output-default.css, test3-output-marble.css Added output window stylesheets.
This commit is contained in:
Родитель
f57e037c56
Коммит
5fa188bc05
|
@ -65,11 +65,13 @@ TESTFILES = \
|
|||
$(srcdir)/xul/tests/csteel2.jpg \
|
||||
$(srcdir)/xul/tests/test3.xul \
|
||||
$(srcdir)/xul/tests/test3.css \
|
||||
$(srcdir)/xul/tests/test3-output-default.css \
|
||||
$(srcdir)/xul/tests/test3-output-marble.css \
|
||||
$(srcdir)/xul/tests/test3-static.js \
|
||||
$(srcdir)/xul/tests/test3-handlers.js \
|
||||
$(srcdir)/xul/tests/test3-commands.js \
|
||||
$(srcdir)/xul/tests/g_blue.gif \
|
||||
$(srcdir)/xul/tests/g_blue_on.gif \
|
||||
$(srcdir)/xul/tests/g_green.gif \
|
||||
$(srcdir)/xul/tests/g_green_on.gif \
|
||||
$(srcdir)/xul/tests/g_grey.gif \
|
||||
$(srcdir)/xul/tests/g_grey_on.gif \
|
||||
$(srcdir)/xul/tests/green-on.gif \
|
||||
|
|
|
@ -1,30 +1,15 @@
|
|||
JS-IRC README file.
|
||||
|
||||
Copyright (C) 1999 Robert Ginda; rginda@ndcico.com
|
||||
|
||||
JavaScript IRC library, bot (runs in xpcshell), and client (runs in Mozilla.)
|
||||
|
||||
Files You'll find...
|
||||
**-------------------------------------------
|
||||
jsirc/bslib
|
||||
irc/bslib
|
||||
|
||||
basic-socket library. NSPR socket functions wrapped in an object oriented
|
||||
C api. Allows clients to connect to as many servers as desired, without
|
||||
having to worry about the messy details.
|
||||
|
||||
'make main' in this directory to create the required .o files, and a
|
||||
sample test client.
|
||||
|
||||
**-------------------------------------------
|
||||
jsirc/bslib/xpcom
|
||||
|
||||
Really Lame XPCOM wrapper around the bslib.
|
||||
|
||||
'make libbs' in this directory to create the xpcom component (libbs.so)
|
||||
and the XPCOM interface file (bsIConnection.xpt.) Copy these files to
|
||||
MOZILLA_FIVE_HOME/components directory.
|
||||
|
||||
**-------------------------------------------
|
||||
jsirc/js/lib
|
||||
irc/js/lib
|
||||
|
||||
JavaScript library files, including...
|
||||
|
||||
|
@ -64,7 +49,7 @@ over a Direct Client to Client (hence the name) connection. Currently,
|
|||
only DCC-Chat is supported. Adding the rest should be straightforward.
|
||||
|
||||
**-------------------------------------------
|
||||
jsirc/js/tests
|
||||
irc/js/tests
|
||||
|
||||
Scripts to test the various libraries including...
|
||||
|
||||
|
@ -75,10 +60,6 @@ reference while learning the rules for matching an object against a group of
|
|||
pattern objects. Object pattern matching is at the root of the hook
|
||||
functionality provided by events.js, so look here if you need a clue.
|
||||
|
||||
toys.js
|
||||
|
||||
Functions for making annoying colors in IRC.
|
||||
|
||||
ircbot.js
|
||||
|
||||
The sample bot I use to test the IRC library. It's mostly functional,
|
||||
|
@ -190,4 +171,4 @@ onQuit: User in one of the active channels has quit IRC. <user> will be
|
|||
lastQuitDate and lastQuitMessage will be set.
|
||||
channel
|
||||
user previous CIRCUser will be upgraded to a CIRCChanUser
|
||||
|
||||
|
||||
|
|
|
@ -68,7 +68,8 @@ function ep_hook(e)
|
|||
hook_loop:
|
||||
for (var h in hooks)
|
||||
{
|
||||
if (!matchObject (e, hooks[h].pattern, hooks[h].neg))
|
||||
if (!hooks[h].enabled ||
|
||||
!matchObject (e, hooks[h].pattern, hooks[h].neg))
|
||||
continue hook_loop;
|
||||
|
||||
e.hooks.push (hooks[h]);
|
||||
|
@ -86,15 +87,33 @@ function ep_hook(e)
|
|||
}
|
||||
|
||||
CEventPump.prototype.addHook =
|
||||
function ep_addhook(pattern, f, name, neg)
|
||||
function ep_addhook(pattern, f, name, neg, enabled)
|
||||
{
|
||||
|
||||
if (typeof f != "function")
|
||||
return false;
|
||||
|
||||
if (typeof enabled == "undefined")
|
||||
enabled = true;
|
||||
else
|
||||
enabled = Boolean(enabled);
|
||||
|
||||
neg = Boolean(neg);
|
||||
|
||||
return this.hooks.push({pattern: pattern, f: f, name: name, neg: neg})-1;
|
||||
return (this.hooks.push({pattern: pattern, f: f, name: name,
|
||||
neg: neg, enabled: enabled}) - 1);
|
||||
|
||||
}
|
||||
|
||||
CEventPump.prototype.getHook =
|
||||
function ep_gethook(name)
|
||||
{
|
||||
|
||||
for (var h in this.hooks)
|
||||
if (this.hooks[h].name.toLowerCase() == name.toLowerCase())
|
||||
return this.hooks[h];
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
@ -135,7 +154,6 @@ CEventPump.prototype.routeEvent =
|
|||
function ep_routeevent (e)
|
||||
{
|
||||
var count = 0;
|
||||
var ddprefix = "";
|
||||
|
||||
this.currentEvent = e;
|
||||
|
||||
|
@ -156,7 +174,7 @@ function ep_routeevent (e)
|
|||
}
|
||||
catch (ex)
|
||||
{
|
||||
dd ("Error routing event: " + ex.toSource());
|
||||
dd ("Error routing event: " + ex + " in " + e.destMethod);
|
||||
}
|
||||
if (count++ > this.MAX_EVENT_DEPTH)
|
||||
throw "Too many events in chain";
|
||||
|
|
|
@ -89,18 +89,18 @@ function http_poll (e)
|
|||
}
|
||||
else
|
||||
{
|
||||
dd ("** Caught exception: '" + ex + "' while recieving " +
|
||||
dd ("** Caught exception: '" + ex + "' while receiving " +
|
||||
this.server + this.path);
|
||||
this.state = "read-error";
|
||||
}
|
||||
}
|
||||
else
|
||||
this.state = "recieve-timeout";
|
||||
this.state = "receive-timeout";
|
||||
|
||||
switch (this.state)
|
||||
{
|
||||
case "opened":
|
||||
case "recieve-header":
|
||||
case "receive-header":
|
||||
if (this.state == "opened")
|
||||
this.headers = "";
|
||||
|
||||
|
@ -108,7 +108,7 @@ function http_poll (e)
|
|||
if (c != -1)
|
||||
{
|
||||
this.data = line.substr (c, line.length);
|
||||
this.state = "recieve-data";
|
||||
this.state = "receive-data";
|
||||
line = line.substr (0, c);
|
||||
|
||||
c = this.data.search(/\<\/html\>/i);
|
||||
|
@ -127,28 +127,28 @@ function http_poll (e)
|
|||
{
|
||||
this.docType = this.headers.substr (c, line.length);
|
||||
if (this.state == "opened")
|
||||
this.state = "recieve-doctype";
|
||||
this.state = "receive-doctype";
|
||||
this.headers = this.headers.substr (0, c);
|
||||
}
|
||||
|
||||
if (this.state == "opened")
|
||||
this.state = "recieve-header";
|
||||
this.state = "receive-header";
|
||||
break;
|
||||
|
||||
case "recieve-doctype":
|
||||
case "receive-doctype":
|
||||
var c = line.search (/\<html\>/i);
|
||||
if (c != -1)
|
||||
{
|
||||
this.docType = stringTrim(this.docType);
|
||||
this.data = line.substr (c, line.length);
|
||||
this.state = "recieve-data";
|
||||
this.state = "receive-data";
|
||||
line = line.substr (0, c);
|
||||
}
|
||||
|
||||
this.docType += line;
|
||||
break;
|
||||
|
||||
case "recieve-data":
|
||||
case "receive-data":
|
||||
this.data += line;
|
||||
var c = this.data.search(/\<\/html\>/i);
|
||||
if (c != -1)
|
||||
|
@ -156,7 +156,7 @@ function http_poll (e)
|
|||
break;
|
||||
|
||||
case "read-error":
|
||||
case "recieve-timeout":
|
||||
case "receive-timeout":
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -200,13 +200,3 @@ function http_complete(e)
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ function event_tracer (e)
|
|||
case "httpdoc":
|
||||
name = e.destObject.server + e.destObject.path;
|
||||
if (e.destObject.state != "complete")
|
||||
data = "state: '" + e.destObject.state + "', recieved " +
|
||||
data = "state: '" + e.destObject.state + "', received " +
|
||||
e.destObject.data.length;
|
||||
else
|
||||
dd ("document done:\n" + dumpObjectTree (this));
|
||||
|
|
|
@ -174,9 +174,6 @@ function net_connect (e)
|
|||
this.primChan.join();
|
||||
}
|
||||
|
||||
e.set = "server";
|
||||
e.destObject = this.primServ;
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
@ -1348,7 +1345,30 @@ function CIRCChanMode (parent)
|
|||
}
|
||||
|
||||
CIRCChanMode.prototype.TYPE = "IRCChanMode";
|
||||
|
||||
CIRCChanMode.prototype.getModeStr =
|
||||
function chan_modestr (f)
|
||||
{
|
||||
var str = "";
|
||||
|
||||
if (this.invite)
|
||||
str += "i";
|
||||
if (this.moderated)
|
||||
str += "m";
|
||||
if (!this.publicMessages)
|
||||
str += "n";
|
||||
if (!this.publicTopic)
|
||||
str += "t";
|
||||
if (this.pvt)
|
||||
str += "p";
|
||||
|
||||
if (str)
|
||||
str = "+" + str;
|
||||
|
||||
return str;
|
||||
|
||||
}
|
||||
|
||||
CIRCChanMode.prototype.setMode =
|
||||
function chanm_mode (modestr)
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@ else
|
|||
if (typeof dump == "function")
|
||||
dumpln = function (str) {dump (str + "\n");}
|
||||
else
|
||||
dumpln = function () {} /* no suitable function */
|
||||
dumpln = function () {} /* no suitable function */
|
||||
|
||||
if (DEBUG)
|
||||
dd = dumpln;
|
||||
|
@ -44,7 +44,7 @@ else
|
|||
var jsenv = new Object();
|
||||
|
||||
jsenv.HAS_XPCOM = ((typeof Components == "function") &&
|
||||
(typeof Components.classes == "function"));
|
||||
(typeof Components.classes == "function"));
|
||||
jsenv.HAS_JAVA = (typeof java == "object");
|
||||
jsenv.HAS_RHINO = (typeof defineClass == "function");
|
||||
jsenv.HAS_DOCUMENT = (typeof document == "object");
|
||||
|
@ -55,8 +55,7 @@ function dumpObject (o, pfx, sep)
|
|||
var s = "";
|
||||
|
||||
sep = (typeof sep == "undefined") ? " = " : sep;
|
||||
pfx = (typeof pfx == "undefined") ? "" : pfx;
|
||||
|
||||
pfx = (typeof pfx == "undefined") ? "" : pfx;
|
||||
|
||||
for (p in o)
|
||||
{
|
||||
|
@ -152,6 +151,24 @@ function dumpObjectTree (o, recurse, compress, level)
|
|||
|
||||
}
|
||||
|
||||
/*
|
||||
* Clones an existing object (Only the enumerable properties
|
||||
* of course.) use as a function..
|
||||
* var c = Clone (obj);
|
||||
* or a constructor...
|
||||
* var c = new Clone (obj);
|
||||
*/
|
||||
function Clone (obj)
|
||||
{
|
||||
robj = new Object();
|
||||
|
||||
for (var p in obj)
|
||||
robj[p] = obj[p];
|
||||
|
||||
return robj;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* matches a real object against one or more pattern objects.
|
||||
* if you pass an array of pattern objects, |negate| controls wether to check
|
||||
|
@ -257,8 +274,8 @@ function stringTrim (s)
|
|||
{
|
||||
if (!s)
|
||||
return "";
|
||||
s = s.replace (/^\s+/);
|
||||
return s.replace (/\s+$/);
|
||||
s = s.replace (/^\s+/, "");
|
||||
return s.replace (/\s+$/, "");
|
||||
|
||||
}
|
||||
|
||||
|
@ -331,6 +348,26 @@ function randomRange (min, max)
|
|||
|
||||
}
|
||||
|
||||
function getStackTrace ()
|
||||
{
|
||||
|
||||
if (!jsenv.HAS_XPCOM)
|
||||
return "No stack trace available.";
|
||||
|
||||
var frame = Components.stack.caller;
|
||||
var str = "<top>";
|
||||
|
||||
while (frame)
|
||||
{
|
||||
var name = frame.functionName ? frame.functionName : "[anonymous]";
|
||||
str += "\n" + name + "@" + frame.lineNumber;
|
||||
frame = frame.caller;
|
||||
}
|
||||
|
||||
return str;
|
||||
|
||||
}
|
||||
|
||||
function getInterfaces (cls)
|
||||
{
|
||||
if (!jsenv.HAS_XPCOM)
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*
|
||||
* Contributor(s):
|
||||
* Robert Ginda, rginda@ndcico.com, original author
|
||||
* Simon Fraser, smfr@netscape.com, Mac warning fixes
|
||||
*/
|
||||
|
||||
#include "string.h"
|
||||
|
@ -136,7 +137,7 @@ bs_connection_send_string (BSConnectionClass *connection, const bschar *data)
|
|||
|
||||
length = strlen (data);
|
||||
|
||||
return bs_connection_send_data (connection, data, length);
|
||||
return bs_connection_send_data (connection, (bschar *)data, length);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*
|
||||
* Contributor(s):
|
||||
* Robert Ginda, rginda@ndcico.com, original author
|
||||
* Simon Fraser, smfr@netscape.com, Mac warning fixes
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
|
@ -84,7 +85,7 @@ bs_util_resolve_host (const char *hostname, PRNetAddr *na)
|
|||
if (PR_FAILURE == rv)
|
||||
return rv;
|
||||
|
||||
return PR_EnumerateHostEnt (0, &he, 0, na);
|
||||
return (PRStatus)PR_EnumerateHostEnt (0, &he, 0, na);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -62,11 +62,13 @@ TESTFILES = \
|
|||
.\xul\tests\csteel2.jpg \
|
||||
.\xul\tests\test3.xul \
|
||||
.\xul\tests\test3.css \
|
||||
.\xul\tests\test3-output-default.css \
|
||||
.\xul\tests\test3-output-marble.css \
|
||||
.\xul\tests\test3-static.js \
|
||||
.\xul\tests\test3-handlers.js \
|
||||
.\xul\tests\test3-commands.js \
|
||||
.\xul\tests\g_blue.gif \
|
||||
.\xul\tests\g_blue_on.gif \
|
||||
.\xul\tests\g_green.gif \
|
||||
.\xul\tests\g_green_on.gif \
|
||||
.\xul\tests\g_grey.gif \
|
||||
.\xul\tests\g_grey_on.gif \
|
||||
.\xul\tests\green-on.gif \
|
||||
|
|
|
@ -59,7 +59,8 @@
|
|||
related to the IRC client is either JavaScript, XUL, or HTML, and
|
||||
therefore is platform independant.
|
||||
<p>
|
||||
<a href="#" onclick="loadClient(3)">test3.xul</a> is very
|
||||
<button onclick="loadClient(3)">test3.xul</button>
|
||||
is very
|
||||
close to what I expect
|
||||
the final client to be. At least, I expect not to throw out too much of
|
||||
this code. The UI is open for discussion.
|
||||
|
@ -67,7 +68,7 @@
|
|||
for this one. test3 displays usage info when it starts up, and
|
||||
/help can be used to display all possible commands.
|
||||
<p>
|
||||
<a href="#" onclick="loadClient(2)">test2.html</a> is
|
||||
<button onclick="loadClient(2)">test2.html</button> is
|
||||
(you guessed it) the second
|
||||
client. The messages in the output window can be styled by tweaking
|
||||
<a href="./">irc/tests/</a>test2.css. The views window
|
||||
|
@ -82,7 +83,8 @@
|
|||
/join #mozillazine
|
||||
</pre>
|
||||
<p>
|
||||
<a href="#" onclick="loadClient(1)">test1.html</a> is the
|
||||
<button onclick="loadClient(1)">test1.html</button> is
|
||||
the
|
||||
first client. It has no
|
||||
CSS, and all input is displayed in the same window. If you experience
|
||||
stability problems with the other clients, try this one.
|
||||
|
@ -95,7 +97,7 @@
|
|||
<address><a href="mailto:rginda@ndcico.com"></a></address>
|
||||
<!-- Created: Wed Sep 15 23:34:25 XXX 1999 -->
|
||||
<!-- hhmts start -->
|
||||
Last modified: Sat Sep 18 00:33:54 XXX 1999
|
||||
Last modified: Mon Oct 4 02:46:58 XXX 1999
|
||||
<!-- hhmts end -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -34,6 +34,10 @@ function addCommands(commandObject)
|
|||
"Displays help on all commands matching <command-name>, if " +
|
||||
"<command-name> is not given, displays help on all commands");
|
||||
|
||||
add ("testdisplay", "onInputTestDisplay",
|
||||
"",
|
||||
"Displays a sample text. Used to preview styles");
|
||||
|
||||
add ("network", "onInputNetwork",
|
||||
"<network-name>",
|
||||
"Sets the current network to <network-name>");
|
||||
|
@ -47,6 +51,10 @@ function addCommands(commandObject)
|
|||
"<action>",
|
||||
"Performs an 'action' on the current channel.");
|
||||
|
||||
add ("msg", "onInputMsg",
|
||||
"<user> <msg>",
|
||||
"Sends a private message <msg> to the user <user>.");
|
||||
|
||||
add ("nick", "onInputNick",
|
||||
"<nickname>",
|
||||
"Changes your current nickname.");
|
||||
|
|
|
@ -25,6 +25,7 @@ function onLoad()
|
|||
{
|
||||
|
||||
initHost(client);
|
||||
setOutputStyle ("default");
|
||||
initStatic();
|
||||
mainStep();
|
||||
|
||||
|
@ -47,12 +48,45 @@ function onTBIClick (id)
|
|||
|
||||
}
|
||||
|
||||
function onToggleTraceHook()
|
||||
{
|
||||
var h = client.eventPump.getHook ("event-tracer");
|
||||
var caption;
|
||||
|
||||
h.enabled = !h.enabled;
|
||||
caption = h.enabled ? "Debug Messages (ON)" : "Debug Messages (OFF)";
|
||||
document.getElementById("menu-dmessages").setAttribute ("value", caption);
|
||||
|
||||
}
|
||||
|
||||
function onDoStyleChange (newStyle)
|
||||
{
|
||||
|
||||
if (newStyle == "other")
|
||||
newStyle = window.prompt ("Enter style name");
|
||||
|
||||
if (newStyle)
|
||||
{
|
||||
setOutputStyle (newStyle);
|
||||
setCurrentObject(client.currentObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function onInputKeyUp (e)
|
||||
{
|
||||
|
||||
switch (e.which)
|
||||
{
|
||||
case 13: /* CR */
|
||||
if (e.target.id != "input")
|
||||
{
|
||||
dd ("** KeyUp event came from the wrong place, faking it.");
|
||||
dd ("** e.target (" + e.target + ", '" + e.target.id + "') " +
|
||||
" is of type '" + typeof e.target + "'");
|
||||
e = new Object();
|
||||
e.target = document.getElementById ("input");
|
||||
}
|
||||
e.line = e.target.value;
|
||||
onInputCompleteLine (e);
|
||||
break;
|
||||
|
@ -106,48 +140,7 @@ function onInputCompleteLine(e)
|
|||
ev.inputData = ary[2] ? stringTrim(ary[2]) : "";
|
||||
|
||||
ev.target = client.currentObject;
|
||||
|
||||
switch (client.currentObject.TYPE) /* set up event props */
|
||||
{
|
||||
case "IRCChannel":
|
||||
ev.channel = ev.target;
|
||||
ev.server = ev.channel.parent;
|
||||
ev.network = ev.server.parent;
|
||||
break;
|
||||
|
||||
case "IRCUser":
|
||||
ev.user = ev.target;
|
||||
ev.server = ev.user.parent;
|
||||
ev.network = ev.server.parent;
|
||||
break;
|
||||
|
||||
case "IRCChanUser":
|
||||
ev.user = ev.target;
|
||||
ev.channel = ev.user.parent;
|
||||
ev.server = ev.channel.parent;
|
||||
ev.network = ev.server.parent;
|
||||
break;
|
||||
|
||||
case "IRCNetwork":
|
||||
ev.network = client.currentObject;
|
||||
if (ev.network.isConnected())
|
||||
ev.server = ev.network.primServ;
|
||||
break;
|
||||
|
||||
case "IRCClient":
|
||||
if (client.lastNetwork)
|
||||
{
|
||||
ev.network = client.lastNetwork;
|
||||
if (ev.network.isConnected())
|
||||
ev.server = ev.network.primServ;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
/* no setup for unknown object */
|
||||
|
||||
}
|
||||
|
||||
getObjectDetails (ev.target, ev);
|
||||
client.eventPump.addEvent (ev);
|
||||
}
|
||||
}
|
||||
|
@ -173,8 +166,7 @@ function onInputCompleteLine(e)
|
|||
e.target.setAttribute("expanded", "NO");
|
||||
e.target.style.height = client.COLLAPSE_HEIGHT;
|
||||
e.target.value = "";
|
||||
for (var i = 1; i < lines.length - 1; i++)
|
||||
client.sayToCurrentTarget (lines[i]);
|
||||
client.sayToCurrentTarget (lines[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,7 +186,7 @@ function cli_icommand (e)
|
|||
|
||||
case 1:
|
||||
if (typeof client[ary[0].func] == "undefined")
|
||||
client.currentObject.display ("Sorry, '" + e.command +
|
||||
client.currentObject.display ("Sorry, '" + ary[0].name +
|
||||
"' has not been implemented.",
|
||||
"ERROR");
|
||||
else
|
||||
|
@ -238,7 +230,6 @@ function cli_ihelp (e)
|
|||
client.currentObject.display (ary[i].name + " " + ary[i].usage,
|
||||
"USAGE");
|
||||
client.currentObject.display (ary[i].help, "HELP");
|
||||
client.currentObject.display ("", "HELP");
|
||||
}
|
||||
|
||||
client.PRINT_DIRECTION = saveDir;
|
||||
|
@ -246,7 +237,39 @@ function cli_ihelp (e)
|
|||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
client.onInputTestDisplay =
|
||||
function cli_testdisplay (e)
|
||||
{
|
||||
|
||||
client.currentObject.display ("Hello World!", "HELLO");
|
||||
client.currentObject.display ("Nothing is wrong.", "ERROR");
|
||||
client.currentObject.display ("Use not, want not.", "USAGE");
|
||||
client.currentObject.display ("Don't Panic", "HELP");
|
||||
client.currentObject.display ("NOTICE this!", "NOTICE", "Mozilla");
|
||||
client.currentObject.display ("And hear this.", "PRIVMSG", "Mozilla");
|
||||
client.currentObject.display ("But dont do this?", "ACTION", "Mozilla");
|
||||
client.currentObject.display ("or you'll get KICKed", "KICK", "Mozilla");
|
||||
client.currentObject.display ("JOIN in the fun.", "JOIN", "Mozilla");
|
||||
client.currentObject.display ("PART when you want.", "PART", "Mozilla");
|
||||
client.currentObject.display ("But never QUIT", "QUIT", "Mozilla");
|
||||
|
||||
if (client.currentObject.TYPE == "IRCChannel")
|
||||
{
|
||||
var mynick = e.server.me.nick;
|
||||
client.currentObject.display ("NOTICE this!", "NOTICE", "!ME");
|
||||
client.currentObject.display ("And hear this.", "PRIVMSG", "!ME");
|
||||
client.currentObject.display ("But dont do this?", "ACTION", "!ME");
|
||||
client.currentObject.display ("or you'll get KICKed", "KICK", "!ME");
|
||||
client.currentObject.display ("JOIN in the fun.", "JOIN", "!ME");
|
||||
client.currentObject.display ("PART when you want.", "PART", "!ME");
|
||||
client.currentObject.display ("But never QUIT", "QUIT", "!ME");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
client.onInputNetwork =
|
||||
function clie_inetwork (e)
|
||||
{
|
||||
|
@ -254,14 +277,14 @@ function clie_inetwork (e)
|
|||
return false;
|
||||
|
||||
var net = client.networks[e.inputData];
|
||||
|
||||
|
||||
if (net)
|
||||
{
|
||||
client.lastNetwork = net;
|
||||
setCurrentObject (net);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
client.currentObject.display ("Unknown network '" + e.inputData + "'",
|
||||
"ERROR");
|
||||
return false;
|
||||
|
@ -298,7 +321,8 @@ function cli_iattach (e)
|
|||
net = client.networks[e.inputData];
|
||||
if (!net)
|
||||
{
|
||||
client.display ("Unknown network '" + e.inputData + "'", "ERROR");
|
||||
client.currentObject.display ("Unknown network '" +
|
||||
e.inputData + "'", "ERROR");
|
||||
return false;
|
||||
}
|
||||
client.lastNetwork = net;
|
||||
|
@ -344,6 +368,10 @@ function cli_imsg (e)
|
|||
|
||||
var usr = e.network.primServ.addUser(ary[1].toLowerCase());
|
||||
|
||||
if (!usr.messages)
|
||||
usr.display ("Chat with " + usr.nick + " opened.", "INFO");
|
||||
setCurrentObject (usr);
|
||||
var msg = filterOutput(ary[2], "PRIVMSG", "!ME");
|
||||
usr.say (ary[2]);
|
||||
|
||||
return true;
|
||||
|
@ -361,7 +389,7 @@ function cli_inick (e)
|
|||
e.server.sendData ('NICK ' + e.inputData + '\n');
|
||||
else
|
||||
CIRCNetwork.prototype.INITIAL_NICK = e.inputData;
|
||||
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
|
@ -403,7 +431,7 @@ function cli_iquote (e)
|
|||
return false;
|
||||
}
|
||||
|
||||
client.network.primServ.sendData (e.inputData + "\n");
|
||||
e.server.sendData (e.inputData + "\n");
|
||||
|
||||
return true;
|
||||
|
||||
|
@ -525,7 +553,8 @@ function cli_itopic (e)
|
|||
{
|
||||
if (e.channel.topic)
|
||||
{
|
||||
client.currentObject.display (e.channel.topic, "TOPIC");
|
||||
client.currentObject.display ("Topic: " + e.channel.topic,
|
||||
"TOPIC");
|
||||
client.currentObject.display ("Set by " + e.channel.topicBy +
|
||||
" on " + e.channel.topicDate + ".",
|
||||
"TOPIC");
|
||||
|
@ -538,6 +567,8 @@ function cli_itopic (e)
|
|||
if (!e.channel.setTopic(e.inputData))
|
||||
client.currentObject.display ("Could not set topic.", "ERROR");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -561,11 +592,15 @@ function my_showtonet (e)
|
|||
var str = "";
|
||||
|
||||
switch (e.code)
|
||||
{
|
||||
{
|
||||
case 004:
|
||||
str = e.params.slice(1).join (" ");
|
||||
break;
|
||||
|
||||
case "NOTICE":
|
||||
updateNetwork (e.network);
|
||||
/* no break */
|
||||
|
||||
case 372:
|
||||
case 375:
|
||||
case 376:
|
||||
|
@ -582,6 +617,22 @@ function my_showtonet (e)
|
|||
|
||||
}
|
||||
|
||||
CIRCNetwork.prototype.onPing =
|
||||
function my_netping (e)
|
||||
{
|
||||
|
||||
updateNetwork (e.network);
|
||||
|
||||
}
|
||||
|
||||
CIRCNetwork.prototype.onPong =
|
||||
function my_netpong (e)
|
||||
{
|
||||
|
||||
updateNetwork (e.network);
|
||||
|
||||
}
|
||||
|
||||
CIRCChannel.prototype.onPrivmsg =
|
||||
function my_cprivmsg (e)
|
||||
{
|
||||
|
@ -644,7 +695,21 @@ function my_366 (e)
|
|||
this.list.add (this.users[ary[u]].getDecoratedNick());
|
||||
|
||||
}
|
||||
|
||||
CIRCChannel.prototype.onTopic = /* user changed topic */
|
||||
CIRCChannel.prototype.on332 = /* TOPIC reply */
|
||||
function my_topic (e)
|
||||
{
|
||||
|
||||
if (e.code == "TOPIC")
|
||||
e.channel.display (e.channel.topicBy + " has changed the topic to '" +
|
||||
e.channel.topic + "'", "TOPIC");
|
||||
|
||||
updateChannel (e.channel);
|
||||
|
||||
}
|
||||
|
||||
|
||||
CIRCChannel.prototype.onNotice =
|
||||
function my_notice (e)
|
||||
{
|
||||
|
@ -690,6 +755,8 @@ function my_cjoin (e)
|
|||
}
|
||||
else
|
||||
this.list.add (e.user.getDecoratedNick());
|
||||
|
||||
updateChannel (e.channel);
|
||||
|
||||
}
|
||||
|
||||
|
@ -703,6 +770,8 @@ function my_cpart (e)
|
|||
this.display (e.user.properNick + " has left " + e.channel.name,
|
||||
"PART");
|
||||
this.list.remove (e.user.getDecoratedNick());
|
||||
|
||||
updateChannel (e.channel);
|
||||
|
||||
}
|
||||
|
||||
|
@ -735,6 +804,8 @@ function my_ckick (e)
|
|||
|
||||
this.list.listContainer.removeChild (e.user.getDecoratedNick());
|
||||
|
||||
updateChannel (e.channel);
|
||||
|
||||
}
|
||||
|
||||
CIRCChannel.prototype.onChanMode =
|
||||
|
@ -747,6 +818,8 @@ function my_cmode (e)
|
|||
|
||||
for (var u in e.usersAffected)
|
||||
e.usersAffected[u].updateDecoratedNick();
|
||||
|
||||
updateChannel (e.channel);
|
||||
|
||||
}
|
||||
|
||||
|
@ -757,8 +830,11 @@ function my_cnick (e)
|
|||
{
|
||||
|
||||
if (userIsMe (e.user))
|
||||
{
|
||||
this.display ("YOU are now known as " + e.user.properNick, "NICK",
|
||||
"!ME");
|
||||
updateNetwork();
|
||||
}
|
||||
else
|
||||
this.display (e.oldNick + " is now known as " + e.user.properNick,
|
||||
"NICK");
|
||||
|
@ -780,6 +856,8 @@ function my_cquit (e)
|
|||
" (" + e.reason + ")", "QUIT");
|
||||
|
||||
this.list.remove (e.user.getDecoratedNick());
|
||||
|
||||
updateChannel (e.channel);
|
||||
|
||||
}
|
||||
|
||||
|
@ -791,6 +869,15 @@ function my_cprivmsg (e)
|
|||
|
||||
}
|
||||
|
||||
CIRCUser.prototype.onNick =
|
||||
function my_unick (e)
|
||||
{
|
||||
|
||||
if (userIsMe(e.user))
|
||||
updateNetwork();
|
||||
|
||||
}
|
||||
|
||||
CIRCUser.prototype.onNotice =
|
||||
function my_notice (e)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,179 @@
|
|||
/*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla JSIRC Library.
|
||||
*
|
||||
* The Initial Developer of the Original Code is New Dimensions Consulting,
|
||||
* Inc. Portions created by New Dimensions Consulting, Inc. Copyright (C) 1999
|
||||
* New Dimenstions Consulting, Inc. All Rights Reserved.
|
||||
*
|
||||
/*
|
||||
* Contributor(s):
|
||||
* Robert Ginda, rginda@ndcico.com, original author
|
||||
*
|
||||
* Styles for output window, See test3.css for UI styles
|
||||
*
|
||||
*/
|
||||
|
||||
body {
|
||||
|
||||
margin: 0px 0px 0px 0px;
|
||||
background: black;
|
||||
|
||||
}
|
||||
|
||||
/* output from a chat session (contains msgs) */
|
||||
.chat-view {
|
||||
|
||||
vertical-align: text-bottom;
|
||||
|
||||
}
|
||||
|
||||
/* common container for all portions of a message
|
||||
* (contains msg-*s) */
|
||||
.msg {
|
||||
|
||||
font-size: 10pt;
|
||||
font-family: sans-serif;
|
||||
|
||||
}
|
||||
|
||||
.msg[user="!ME"] {
|
||||
|
||||
background: lightgrey;
|
||||
|
||||
}
|
||||
|
||||
/* message data in output window */
|
||||
.msg-data {
|
||||
|
||||
font-weight: bold;
|
||||
color: lightgrey;
|
||||
background: #1a2a44;
|
||||
|
||||
}
|
||||
|
||||
/* message data in output window */
|
||||
|
||||
.msg-data[user="!ME"]{
|
||||
|
||||
background: black;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="JOIN"],
|
||||
.msg-data[msgtype="PART"] {
|
||||
|
||||
width: 100%;
|
||||
font-variant: small-caps;
|
||||
background: lightgray;
|
||||
color: black;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="HELLO"] {
|
||||
|
||||
background: white;
|
||||
color: darkgreen;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="ERROR"] {
|
||||
|
||||
background: red;
|
||||
color: white;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="USAGE"] {
|
||||
|
||||
font-style: italic;
|
||||
color: white;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="HELP"] {
|
||||
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="ACTION"] {
|
||||
|
||||
color: cyan;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="NOTICE"] {
|
||||
|
||||
color: yellow;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="KICK"] {
|
||||
|
||||
background: orange;
|
||||
color: yellow;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="QUIT"] {
|
||||
|
||||
background: lightgrey;
|
||||
color: brown;
|
||||
|
||||
}
|
||||
|
||||
/* nickname field in output */
|
||||
.msg-user {
|
||||
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
color: lightgrey;
|
||||
font-weight: bold;
|
||||
background: grey;
|
||||
|
||||
}
|
||||
|
||||
.msg-user[parity="odd"]{
|
||||
|
||||
background: black;
|
||||
|
||||
}
|
||||
|
||||
.msg-user[user="!ME"] {
|
||||
|
||||
color : white;
|
||||
|
||||
}
|
||||
|
||||
.msg-user[msgtype="ACTION"] {
|
||||
|
||||
font-style: italic;
|
||||
|
||||
}
|
||||
|
||||
/* Message type indicator in output window */
|
||||
.msg-type {
|
||||
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
color: brown;
|
||||
font-weight: bold;
|
||||
background: lightgrey;
|
||||
|
||||
}
|
||||
|
||||
.msg-type[user="!ME"] {
|
||||
|
||||
background: silver;
|
||||
|
||||
}
|
|
@ -0,0 +1,152 @@
|
|||
/*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla JSIRC Library.
|
||||
*
|
||||
* The Initial Developer of the Original Code is New Dimensions Consulting,
|
||||
* Inc. Portions created by New Dimensions Consulting, Inc. Copyright (C) 1999
|
||||
* New Dimenstions Consulting, Inc. All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Contributor(s):
|
||||
* Robert Ginda, rginda@ndcico.com, original author
|
||||
*
|
||||
* Styles for output window, See test3.css for UI styles
|
||||
*
|
||||
*/
|
||||
|
||||
body {
|
||||
|
||||
margin: 0px 0px 0px 0px;
|
||||
background: url(xtal.jpg);
|
||||
|
||||
}
|
||||
|
||||
/* output from a chat session (contains msgs) */
|
||||
.chat-view {
|
||||
|
||||
vertical-align: text-bottom;
|
||||
|
||||
}
|
||||
|
||||
/* common container for all portions of a message
|
||||
* (contains msg-*s) */
|
||||
.msg {
|
||||
|
||||
font-size: 10pt;
|
||||
font-family: sans-serif;
|
||||
|
||||
}
|
||||
|
||||
.msg[user="!ME"] {
|
||||
|
||||
background: lightgrey;
|
||||
|
||||
}
|
||||
|
||||
/* message data in output window */
|
||||
.msg-data {
|
||||
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="JOIN"],
|
||||
.msg-data[msgtype="PART"] {
|
||||
|
||||
font-variant: small-caps;
|
||||
color: darkslategrey;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="ACTION"] {
|
||||
|
||||
color: darkred;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="NOTICE"] {
|
||||
|
||||
color: green;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="KICK"] {
|
||||
|
||||
color: slategrey;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="QUIT"] {
|
||||
|
||||
color: brown;
|
||||
|
||||
}
|
||||
|
||||
/* nickname field in output */
|
||||
.msg-user {
|
||||
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
color: blue;
|
||||
font-weight: bold;
|
||||
background: grey;
|
||||
|
||||
}
|
||||
|
||||
.msg-user[user="!ME"] {
|
||||
|
||||
color: green;
|
||||
|
||||
}
|
||||
|
||||
.msg-user[msgtype="ACTION"] {
|
||||
|
||||
font-style: italic;
|
||||
|
||||
}
|
||||
|
||||
/* Message type indicator in output window */
|
||||
.msg-type {
|
||||
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
color: brown;
|
||||
font-weight: bold;
|
||||
background: lightgrey;
|
||||
|
||||
}
|
||||
|
||||
/* Listbox on left of UI (aka QuickList) */
|
||||
.quick-list {
|
||||
|
||||
border: thin silver inset;
|
||||
overflow: auto;
|
||||
background: white;
|
||||
|
||||
}
|
||||
|
||||
/* common container for individual quicklist items */
|
||||
.list-option {
|
||||
|
||||
margin: 2px;
|
||||
|
||||
}
|
||||
|
||||
/* text in the quicklist */
|
||||
.option-text {
|
||||
font-weight: bold;
|
||||
align: right;
|
||||
}
|
||||
|
||||
/* graphic in the quicklist */
|
||||
.option-graphic {
|
||||
}
|
|
@ -29,14 +29,14 @@ client.UPDATE_DELAY = 500;
|
|||
client.EXPAND_HEIGHT = "200px";
|
||||
client.COLLAPSE_HEIGHT = "25px";
|
||||
client.TYPE = "IRCClient";
|
||||
client.OP1_IMG = "g_blue_on.gif"; /* user is op image */
|
||||
client.OP0_IMG = "g_blue.gif"; /* user isnt op image */
|
||||
client.OP1_IMG = "g_green_on.gif"; /* user is op image */
|
||||
client.OP0_IMG = "g_green.gif"; /* user isnt op image */
|
||||
client.V1_IMG = "g_grey_on.gif"; /* user is voice image */
|
||||
client.V0_IMG = "g_grey.gif"; /* user isnt voide image */
|
||||
client.ACT_IMG = "green-on.gif"; /* view has activity image */
|
||||
client.NACT_IMG = "green-off.gif"; /* view has no activity image */
|
||||
client.CUR_IMG = "yellow-on.gif"; /* view is currently displayed */
|
||||
client.PRINT_DIRECTION = -1; /*1 => new messages at bottom, -1 => at top */
|
||||
client.PRINT_DIRECTION = 1; /*1 => new messages at bottom, -1 => at top */
|
||||
|
||||
client.name = "*client*";
|
||||
client.viewsArray = new Array();
|
||||
|
@ -117,7 +117,8 @@ function initHost(obj)
|
|||
* (the 4th param inverts the match) */
|
||||
obj.eventPump.addHook ([{type: "poll", set: /^(server|dcc-chat)$/},
|
||||
{type: "event-end"}], event_tracer,
|
||||
"event-tracer", true /* negate */);
|
||||
"event-tracer", true /* negate */,
|
||||
false /* disable */);
|
||||
|
||||
}
|
||||
|
||||
|
@ -130,14 +131,168 @@ function mainStep()
|
|||
|
||||
}
|
||||
|
||||
function newInlineText (data, className)
|
||||
function getObjectDetails (obj, rv)
|
||||
{
|
||||
var a = document.createElement ("html:a");
|
||||
switch (obj.TYPE)
|
||||
{
|
||||
case "IRCChannel":
|
||||
rv.channel = obj;
|
||||
rv.server = rv.channel.parent;
|
||||
rv.network = rv.server.parent;
|
||||
break;
|
||||
|
||||
if (data)
|
||||
a.appendChild (document.createTextNode (data));
|
||||
if (typeof className != "undefined")
|
||||
a.setAttribute ("class", className);
|
||||
case "IRCUser":
|
||||
rv.user = obj;
|
||||
rv.server = rv.user.parent;
|
||||
rv.network = rv.server.parent;
|
||||
break;
|
||||
|
||||
case "IRCChanUser":
|
||||
rv.user = obj;
|
||||
rv.channel = rv.user.parent;
|
||||
rv.server = rv.channel.parent;
|
||||
rv.network = rv.server.parent;
|
||||
break;
|
||||
|
||||
case "IRCNetwork":
|
||||
rv.network = obj;
|
||||
if (rv.network.isConnected())
|
||||
rv.server = rv.network.primServ;
|
||||
break;
|
||||
|
||||
case "IRCClient":
|
||||
if (obj.lastNetwork)
|
||||
{
|
||||
rv.network = obj.lastNetwork;
|
||||
if (rv.network.isConnected())
|
||||
rv.server = rv.network.primServ;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
/* no setup for unknown object */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function setOutputStyle (style)
|
||||
{
|
||||
var oc = top.frames[0].document;
|
||||
|
||||
oc.close();
|
||||
oc.open();
|
||||
oc.write ("<html><head>" +
|
||||
"<LINK REL=StyleSheet " +
|
||||
"HREF='resource:///irc/tests/test3-output-" + style + ".css' " +
|
||||
"TYPE='text/css' MEDIA='screen'></head> " +
|
||||
"<body><div id='output' class='output-window'></div></body>" +
|
||||
"</html>");
|
||||
|
||||
client.output = oc.getElementById ("output");
|
||||
|
||||
}
|
||||
|
||||
function updateNetwork(obj)
|
||||
{
|
||||
var o = new Object();
|
||||
getObjectDetails (client.currentObject, o);
|
||||
|
||||
if (obj && obj != o.network)
|
||||
return;
|
||||
|
||||
var net = o.network ? o.network.name : "(none)";
|
||||
var serv = "(none)", nick = "(unknown)", lag = "(unknown)",
|
||||
ping = "(never)";
|
||||
if (o.server)
|
||||
{
|
||||
serv = o.server.connection.host;
|
||||
if (o.server.me)
|
||||
nick = o.server.me.properNick;
|
||||
lag = (o.server.lag != -1) ? o.server.lag : "(unknown)";
|
||||
if (o.server.lastPing)
|
||||
{
|
||||
var mins = o.server.lastPing.getMinutes();
|
||||
if (mins.length == 1)
|
||||
mins = "0" + mins;
|
||||
ping = o.server.lastPing.getHours() + ":" + mins;
|
||||
}
|
||||
else
|
||||
ping = "(never)";
|
||||
}
|
||||
|
||||
document.getElementById ("net-name").firstChild.data = net;
|
||||
document.getElementById ("server-name").firstChild.data = serv;
|
||||
document.getElementById ("server-nick").firstChild.data = nick;
|
||||
document.getElementById ("server-lag").firstChild.data = lag;
|
||||
document.getElementById ("last-ping").firstChild.data = ping;
|
||||
|
||||
}
|
||||
|
||||
function updateChannel (obj)
|
||||
{
|
||||
if (obj && obj != client.currentObject)
|
||||
return;
|
||||
|
||||
var o = new Object();
|
||||
getObjectDetails (client.currentObject, o);
|
||||
|
||||
var chan = "(none)", l = "(none)", k = "(none)", mode = "(none)",
|
||||
users = 0, topicBy = "(nobody)", topic = "(unknown)";
|
||||
|
||||
if (o.channel)
|
||||
{
|
||||
chan = o.channel.name;
|
||||
l = (o.channel.mode.limit != -1) ? o.channel.mode.limit : "(none)";
|
||||
k = o.channel.mode.key ? o.channel.mode.key : "(none)";
|
||||
mode = o.channel.mode.getModeStr();
|
||||
if (!mode)
|
||||
mode = "(none)";
|
||||
users = o.channel.getUsersLength();
|
||||
topic = o.channel.topic ? o.channel.topic : "(none)";
|
||||
topicBy = o.channel.topicBy ? o.channel.topicBy : "(nobody)";
|
||||
}
|
||||
|
||||
document.getElementById ("channel-name").firstChild.data = chan;
|
||||
document.getElementById ("channel-limit").firstChild.data = l;
|
||||
document.getElementById ("channel-key").firstChild.data = k;
|
||||
document.getElementById ("channel-mode").firstChild.data = mode;
|
||||
document.getElementById ("channel-users").firstChild.data = users;
|
||||
document.getElementById ("channel-topic").firstChild.data = topic;
|
||||
document.getElementById ("channel-topicby").firstChild.data = topicBy;
|
||||
|
||||
}
|
||||
|
||||
function newInlineText (data, className, tagName)
|
||||
{
|
||||
if (typeof tagName == "undefined")
|
||||
tagName = "html:a";
|
||||
|
||||
var a = document.createElement (tagName);
|
||||
a.setAttribute ("class", className);
|
||||
|
||||
switch (typeof data)
|
||||
{
|
||||
case "string":
|
||||
a.appendChild (document.createTextNode (data));
|
||||
break;
|
||||
|
||||
case "object":
|
||||
for (var p in data)
|
||||
if (p != "data")
|
||||
a.setAttribute (p, data[p]);
|
||||
else
|
||||
a.appendChild (document.createTextNode (data[p]));
|
||||
break;
|
||||
|
||||
case "undefined":
|
||||
break;
|
||||
|
||||
default:
|
||||
dd ("** INVALID TYPE ('" + typeof data + "') passed to " +
|
||||
"newInlineText.");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return a;
|
||||
|
||||
|
@ -155,22 +310,25 @@ function setCurrentObject (obj)
|
|||
if (tb)
|
||||
tb.setAttribute ("src", client.NACT_IMG);
|
||||
|
||||
var output = document.getElementById ("output");
|
||||
|
||||
output.removeChild (output.firstChild);
|
||||
output.appendChild (obj.messages);
|
||||
if (client.output.firstChild)
|
||||
client.output.removeChild (client.output.firstChild);
|
||||
client.output.appendChild (obj.messages);
|
||||
|
||||
var quickList = document.getElementById ("quickList");
|
||||
if (!obj.list)
|
||||
obj.list = new CListBox();
|
||||
|
||||
quickList.removeChild (quickList.firstChild);
|
||||
|
||||
if (quickList.firstChild)
|
||||
quickList.removeChild (quickList.firstChild);
|
||||
quickList.appendChild (obj.list.listContainer);
|
||||
|
||||
client.currentObject = obj;
|
||||
tb = getTBForObject(obj);
|
||||
if (tb)
|
||||
tb.setAttribute ("src", client.CUR_IMG);
|
||||
|
||||
updateNetwork();
|
||||
updateChannel();
|
||||
|
||||
}
|
||||
|
||||
|
@ -178,9 +336,10 @@ function addHistory (source, obj)
|
|||
{
|
||||
if (!source.messages)
|
||||
{
|
||||
source.messages = document.createElement ("span");
|
||||
source.messages = document.createElement ("html:table");
|
||||
source.messages.setAttribute ("class", "chat-view");
|
||||
source.messages.setAttribute ("type", source.TYPE);
|
||||
source.messages.setAttribute ("width", "100%");
|
||||
|
||||
switch (source.TYPE)
|
||||
{
|
||||
|
@ -202,7 +361,10 @@ function addHistory (source, obj)
|
|||
}
|
||||
|
||||
if (client.PRINT_DIRECTION == 1)
|
||||
{
|
||||
source.messages.appendChild (obj);
|
||||
window.frames[0].scrollTo(0, 100000);
|
||||
}
|
||||
else
|
||||
source.messages.insertBefore (obj, source.messages.firstChild);
|
||||
|
||||
|
@ -214,7 +376,10 @@ function addHistory (source, obj)
|
|||
source.messageCount++;
|
||||
|
||||
if (source.messageCount > source.MAX_MESSAGES)
|
||||
source.messages.removeChild (source.messages.lastChild);
|
||||
if (client.PRINT_DIRECTION == 1)
|
||||
source.messages.removeChild (source.messages.firstChild);
|
||||
else
|
||||
source.messages.removeChild (source.messages.lastChild);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -330,25 +495,28 @@ function cli_display (message, msgtype)
|
|||
{
|
||||
var ary = message.split ("\n");
|
||||
|
||||
var msgContainer = newInlineText ("", "msg");
|
||||
msgContainer.setAttribute ("network", "{LOCAL}");
|
||||
msgContainer.setAttribute ("msgtype", msgtype);
|
||||
var msgRow = newInlineText (
|
||||
{network : "{LOCAL}", msgtype: msgtype}, "msg", "html:tr");
|
||||
|
||||
var msg = newInlineText ("[" + msgtype + "]", "msg-type");
|
||||
msg.setAttribute ("network", "{LOCAL}");
|
||||
msg.setAttribute ("msgtype", msgtype);
|
||||
msgContainer.appendChild(msg);
|
||||
var msg = newInlineText (
|
||||
{data: "[" + msgtype + "]", network: "{LOCAL}", msgtype: msgtype},
|
||||
"msg-type", "html:td");
|
||||
|
||||
msgRow.appendChild(msg);
|
||||
|
||||
var msgData = newInlineText (
|
||||
{network: "{LOCAL}", msgtype: msgtype},
|
||||
"msg-data", "html:td");
|
||||
|
||||
for (var l in ary)
|
||||
{
|
||||
var msg = newInlineText (ary[l], "msg-data");
|
||||
msg.setAttribute ("network", "{LOCAL}");
|
||||
msg.setAttribute ("msgtype", msgtype);
|
||||
msgContainer.appendChild(msg);
|
||||
msgContainer.appendChild (document.createElement ("html:br"));
|
||||
msgData.appendChild(newInlineText (ary[l]));
|
||||
msgData.appendChild (document.createElement ("html:br"));
|
||||
}
|
||||
|
||||
addHistory (this, msgContainer);
|
||||
msgRow.appendChild (msgData);
|
||||
|
||||
addHistory (this, msgRow);
|
||||
notifyActivity (this);
|
||||
|
||||
}
|
||||
|
@ -368,27 +536,30 @@ function net_display (message, msgtype)
|
|||
{
|
||||
var ary = message.split ("\n");
|
||||
|
||||
var msgContainer = newInlineText ("", "msg");
|
||||
msgContainer.setAttribute ("network", this.name);
|
||||
msgContainer.setAttribute ("msgtype", msgtype);
|
||||
var msgRow = newInlineText (
|
||||
{network: this.name, msgtype: msgtype},
|
||||
"msg", "html:tr");
|
||||
|
||||
var msg = newInlineText (
|
||||
{data: "[" + msgtype + "]", network: this.name, msgtype: msgtype},
|
||||
"msg-type", "html:td");
|
||||
|
||||
var msg = newInlineText ("[" + msgtype + "]", "msg-type");
|
||||
msg.setAttribute ("network", this.name);
|
||||
msg.setAttribute ("msgtype", msgtype);
|
||||
msgContainer.appendChild(msg);
|
||||
msgRow.appendChild(msg);
|
||||
|
||||
var msgData = newInlineText (
|
||||
{network: this.name, msgtype: msgtype}, "msg-data", "html:td");
|
||||
|
||||
for (var l in ary)
|
||||
{
|
||||
var msg = newInlineText (ary[l], "msg-data");
|
||||
msg.setAttribute ("network", this.name);
|
||||
msg.setAttribute ("msgtype", msgtype);
|
||||
msgContainer.appendChild(msg);
|
||||
msgContainer.appendChild (document.createElement ("html:br"));
|
||||
msgData.appendChild(newInlineText(ary[l]));
|
||||
msgData.appendChild (document.createElement ("html:br"));
|
||||
}
|
||||
|
||||
addHistory (this, msgContainer);
|
||||
msgRow.appendChild (msgData);
|
||||
|
||||
addHistory (this, msgRow);
|
||||
notifyActivity (this);
|
||||
|
||||
|
||||
}
|
||||
|
||||
CIRCUser.prototype.getDecoratedNick =
|
||||
|
@ -447,35 +618,86 @@ function usr_updnick()
|
|||
}
|
||||
|
||||
CIRCUser.prototype.display =
|
||||
function user_display(message, msgtype)
|
||||
function user_display(message, msgtype, sourceNick)
|
||||
{
|
||||
var ary = message.split ("\n");
|
||||
|
||||
dd ("user.display");
|
||||
|
||||
var msgContainer = newInlineText ("", "msg");
|
||||
msgContainer.setAttribute ("network", this.parent.parent.name);
|
||||
msgContainer.setAttribute ("user", this.nick);
|
||||
msgContainer.setAttribute ("msgtype", msgtype);
|
||||
|
||||
var msg = newInlineText ("[" + msgtype + "]", "msg-type");
|
||||
msg.setAttribute ("network", this.parent.parent.name);
|
||||
msg.setAttribute ("user", this.nick);
|
||||
msg.setAttribute ("msgtype", msgtype);
|
||||
msgContainer.appendChild(msg);
|
||||
|
||||
if (this.TYPE == "IRCUser")
|
||||
{
|
||||
var msgRow = newInlineText (
|
||||
{network: this.parent.parent.name, user: this.nick,
|
||||
msgtype: msgtype},
|
||||
"msg", "html:tr");
|
||||
|
||||
var nickText;
|
||||
var realNick = (!sourceNick || sourceNick != "!ME") ? this.properNick :
|
||||
this.parent.me.properNick;
|
||||
|
||||
switch (msgtype)
|
||||
{
|
||||
|
||||
case "ACTION":
|
||||
nickText = newInlineText ("*" + realNick + "* ",
|
||||
"msg-user", "html:td");
|
||||
break;
|
||||
|
||||
case "NOTICE":
|
||||
nickText = newInlineText ("[" + realNick + "] ",
|
||||
"msg-user", "html:td");
|
||||
break;
|
||||
|
||||
case "PRIVMSG":
|
||||
nickText = newInlineText ("<" + realNick + "> ",
|
||||
"msg-user", "html:td");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (nickText)
|
||||
{
|
||||
this.parity = (typeof this.parity != "undefined") ? this.parity :
|
||||
false;
|
||||
|
||||
if ((this.lastNickDisplayed) &&
|
||||
(realNick != this.lastNickDisplayed))
|
||||
{
|
||||
this.parity = !this.parity;
|
||||
this.lastNickDisplayed = realNick;
|
||||
}
|
||||
else
|
||||
this.lastNickDisplayed = realNick;
|
||||
|
||||
nickText.setAttribute ("parity", (this.parity) ? "even" : "odd");
|
||||
nickText.setAttribute ("network", this.parent.parent.name);
|
||||
nickText.setAttribute ("user", this.nick);
|
||||
nickText.setAttribute ("msgtype", msgtype);
|
||||
msgRow.appendChild (nickText);
|
||||
}
|
||||
else
|
||||
{
|
||||
var msg = newInlineText (
|
||||
{data: "[" + msgtype + "]", network: this.parent.parent.name,
|
||||
user: this.nick, msgtype: msgtype},
|
||||
"msg-type", "html:td");
|
||||
|
||||
msgRow.appendChild (msg);
|
||||
}
|
||||
|
||||
var msgData = newInlineText (
|
||||
{network: this.parent.parent.name, msgtype: msgtype},
|
||||
"msg-data", "html:td");
|
||||
|
||||
msgData.setAttribute ("width", "100%");
|
||||
|
||||
for (var l in ary)
|
||||
{
|
||||
var msg = newInlineText (ary[l], "msg-data");
|
||||
msg.setAttribute ("network", this.parent.parent.name);
|
||||
msg.setAttribute ("user", this.nick);
|
||||
msg.setAttribute ("msgtype", msgtype);
|
||||
msgContainer.appendChild(msg);
|
||||
msgContainer.appendChild (document.createElement ("html:br"));
|
||||
msgData.appendChild(newInlineText (ary[l]));
|
||||
msgData.appendChild (document.createElement ("html:br"));
|
||||
}
|
||||
addHistory (this, msgContainer);
|
||||
|
||||
msgRow.appendChild (msgData);
|
||||
|
||||
addHistory (this, msgRow);
|
||||
notifyActivity (this);
|
||||
|
||||
}
|
||||
|
@ -483,84 +705,98 @@ function user_display(message, msgtype)
|
|||
{
|
||||
this.parent.display (message, msgtype, this.nick);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
CIRCChannel.prototype.display =
|
||||
function chan_display (message, msgtype, nick)
|
||||
{
|
||||
var ary = message.split ("\n");
|
||||
var nickText;
|
||||
|
||||
dd ("channel.display");
|
||||
var msgRow = newInlineText (
|
||||
{network: this.parent.parent.name , channel: this.name, user: nick,
|
||||
msgtype: msgtype},
|
||||
"msg", "html:tr");
|
||||
|
||||
var msgContainer = newInlineText ("", "msg");
|
||||
msgContainer.setAttribute ("network", this.parent.parent.name);
|
||||
msgContainer.setAttribute ("channel", this.name);
|
||||
msgContainer.setAttribute ("user", nick);
|
||||
msgContainer.setAttribute ("msgtype", msgtype);
|
||||
if (nick)
|
||||
{
|
||||
var realNick;
|
||||
|
||||
if (this.users[nick])
|
||||
realNick = this.users[nick].properNick;
|
||||
else if (nick == "!ME")
|
||||
realNick = this.parent.me.properNick;
|
||||
else
|
||||
realNick = nick + "?";
|
||||
|
||||
switch (msgtype)
|
||||
{
|
||||
|
||||
case "ACTION":
|
||||
nickText = newInlineText ("*" + realNick + "* ",
|
||||
"msg-user", "html:td");
|
||||
break;
|
||||
|
||||
case "NOTICE":
|
||||
nickText = newInlineText ("[" + realNick + "] ",
|
||||
"msg-user", "html:td");
|
||||
break;
|
||||
|
||||
var msg = newInlineText ("[" + msgtype + "]", "msg-type");
|
||||
msg.setAttribute ("network", this.parent.parent.name);
|
||||
msg.setAttribute ("channel", this.name);
|
||||
msg.setAttribute ("user", nick);
|
||||
msg.setAttribute ("msgtype", msgtype);
|
||||
msgContainer.appendChild (msg);
|
||||
case "PRIVMSG":
|
||||
nickText = newInlineText ("<" + realNick + "> ",
|
||||
"msg-user", "html:td");
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (nickText)
|
||||
{
|
||||
this.parity = (typeof this.parity != "undefined") ? this.parity : false;
|
||||
|
||||
if ((this.lastNickDisplayed) &&
|
||||
(nick != this.lastNickDisplayed))
|
||||
{
|
||||
this.parity = !this.parity;
|
||||
this.lastNickDisplayed = nick;
|
||||
}
|
||||
else
|
||||
this.lastNickDisplayed = nick;
|
||||
|
||||
nickText.setAttribute ("parity", (this.parity) ? "even" : "odd");
|
||||
nickText.setAttribute ("network", this.parent.parent.name);
|
||||
nickText.setAttribute ("channel", this.name);
|
||||
nickText.setAttribute ("user", nick);
|
||||
nickText.setAttribute ("msgtype", msgtype);
|
||||
msgRow.appendChild (nickText);
|
||||
}
|
||||
else
|
||||
{
|
||||
var msg = newInlineText (
|
||||
{data: "[" + msgtype + "]", network: this.parent.parent.name,
|
||||
channel: this.name, user: nick, msgtype: msgtype},
|
||||
"msg-type", "html:td");
|
||||
|
||||
msgRow.appendChild (msg);
|
||||
}
|
||||
|
||||
var msgData = newInlineText (
|
||||
{network: this.parent.parent.name, channel: this.name,
|
||||
user: nick, msgtype: msgtype},
|
||||
"msg-data", "html:td");
|
||||
|
||||
msgData.setAttribute ("parity", (this.parity) ? "even" : "odd");
|
||||
|
||||
for (var l in ary)
|
||||
{
|
||||
var msg = newInlineText (ary[l], "msg-data");
|
||||
msg.setAttribute ("network", this.parent.parent.name);
|
||||
msg.setAttribute ("channel", this.name);
|
||||
msg.setAttribute ("user", nick);
|
||||
msg.setAttribute ("msgtype", msgtype);
|
||||
|
||||
if (nick)
|
||||
{
|
||||
var nickText;
|
||||
var realNick = (nick == "!ME") ? this.parent.me.properNick
|
||||
: this.users[nick].properNick;
|
||||
|
||||
switch (msgtype)
|
||||
{
|
||||
|
||||
case "PRIVMSG":
|
||||
nickText = newInlineText ("<" + realNick + "> ",
|
||||
"msg-user");
|
||||
break;
|
||||
|
||||
case "ACTION":
|
||||
nickText = newInlineText ("*" + realNick + "* ",
|
||||
"msg-user");
|
||||
break;
|
||||
|
||||
case "NOTICE":
|
||||
nickText = newInlineText ("[" + realNick + "] ",
|
||||
"msg-user");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (nickText)
|
||||
{
|
||||
nickText.setAttribute ("network", this.parent.parent.name);
|
||||
nickText.setAttribute ("channel", this.name);
|
||||
nickText.setAttribute ("user", nick);
|
||||
nickText.setAttribute ("msgtype", msgtype);
|
||||
msgContainer.appendChild (nickText);
|
||||
}
|
||||
|
||||
if (nick == "!ME")
|
||||
addHistory (this.users[this.parent.me.nick], msgContainer);
|
||||
else
|
||||
addHistory (this.users[nick], msgContainer);
|
||||
|
||||
}
|
||||
|
||||
msgContainer.appendChild (msg);
|
||||
msgContainer.appendChild (document.createElement ("html:br"));
|
||||
msgData.appendChild (newInlineText (ary[l]));
|
||||
msgData.appendChild (document.createElement ("html:br"));
|
||||
}
|
||||
|
||||
addHistory (this, msgContainer);
|
||||
msgRow.appendChild (msgData);
|
||||
|
||||
addHistory (this, msgRow);
|
||||
notifyActivity (this);
|
||||
|
||||
}
|
||||
|
|
|
@ -18,11 +18,15 @@
|
|||
*
|
||||
* Contributor(s):
|
||||
* Robert Ginda, rginda@ndcico.com, original author
|
||||
*
|
||||
* Styles for UI, See test3-output-default.css for output window styles
|
||||
*
|
||||
*/
|
||||
|
||||
#outer-box {
|
||||
|
||||
margin: 5px;
|
||||
|
||||
}
|
||||
|
||||
#main-splitter {
|
||||
|
@ -33,6 +37,33 @@
|
|||
|
||||
}
|
||||
|
||||
.status-table {
|
||||
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
|
||||
#status-bar {
|
||||
|
||||
margin-top: 5px;
|
||||
border: thin silver inset;
|
||||
|
||||
}
|
||||
|
||||
.status-label {
|
||||
|
||||
text-align: right;
|
||||
|
||||
}
|
||||
|
||||
.status-data {
|
||||
|
||||
text-align: left;
|
||||
color: brown;
|
||||
|
||||
}
|
||||
|
||||
/* Activity indicator buttons */
|
||||
.activity-button {
|
||||
|
||||
|
@ -47,120 +78,16 @@
|
|||
|
||||
}
|
||||
|
||||
/* the output window (contains chat-views) */
|
||||
.output-window {
|
||||
.output-container {
|
||||
|
||||
border: thin silver inset;
|
||||
overflow: auto;
|
||||
background: url(xtal.jpg);
|
||||
border: thin silver inset;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
/* output from a chat session (contains msgs) */
|
||||
.chat-view {
|
||||
|
||||
vertical-align: text-bottom;
|
||||
|
||||
}
|
||||
|
||||
/* common container for all portions of a message
|
||||
* (contains msg-*s) */
|
||||
.msg {
|
||||
|
||||
font-family: sans-serif;
|
||||
|
||||
}
|
||||
|
||||
.msg[user="!ME"] {
|
||||
|
||||
background: lightgrey;
|
||||
|
||||
}
|
||||
|
||||
/* message data in output window */
|
||||
.msg-data {
|
||||
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="JOIN"],
|
||||
.msg-data[msgtype="PART"] {
|
||||
|
||||
font-variant: small-caps;
|
||||
color: darkslategrey;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="ACTION"] {
|
||||
|
||||
color: darkred;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="NOTICE"] {
|
||||
|
||||
color: green;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="KICK"] {
|
||||
|
||||
color: slategrey;
|
||||
|
||||
}
|
||||
|
||||
.msg-data[msgtype="QUIT"] {
|
||||
|
||||
color: brown;
|
||||
|
||||
}
|
||||
|
||||
/* nickname field in output */
|
||||
.msg-user {
|
||||
|
||||
color: blue;
|
||||
|
||||
}
|
||||
|
||||
.msg-user[user="!ME"] {
|
||||
|
||||
color: darkgreen;
|
||||
|
||||
}
|
||||
|
||||
.msg-user[msgtype="ACTION"] {
|
||||
|
||||
font-style: italic;
|
||||
|
||||
}
|
||||
|
||||
/* Message type indicator in output window */
|
||||
.msg-type {
|
||||
|
||||
color: grey;
|
||||
font-weight: bold;
|
||||
margin-right: 10px;
|
||||
|
||||
}
|
||||
|
||||
.msg-type[msgtype="PRIVMSG"], /* dont show message types indicator */
|
||||
.msg-type[msgtype="ACTION"], /* for these kinds of messages */
|
||||
.msg-type[msgtype="JOIN"],
|
||||
.msg-type[msgtype="PART"],
|
||||
.msg-type[msgtype="QUIT"],
|
||||
.msg-type[msgtype="KICK"],
|
||||
.msg-type[msgtype="MODE"] {
|
||||
|
||||
display: none;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Listbox on left of UI (aka QuickList) */
|
||||
.quick-list {
|
||||
|
||||
min-width: 150px;
|
||||
border: thin silver inset;
|
||||
overflow: auto;
|
||||
background: white;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is JSIRC Test Client #2
|
||||
The Original Code is JSIRC Test Client #3
|
||||
|
||||
The Initial Developer of the Original Code is New Dimensions Consulting,
|
||||
Inc. Portions created by New Dimensions Consulting, Inc. Copyright (C) 1999
|
||||
|
@ -48,9 +48,22 @@ resource:///irc/tests/test3.xul
|
|||
|
||||
<toolbox>
|
||||
<menubar>
|
||||
<menu value="File">
|
||||
<menu value="Options">
|
||||
<menupopup>
|
||||
<menuitem value="New" oncommand="dump('foo\n');"/>
|
||||
<menuitem id="menu-dmessages" value="Debug Messages (OFF)"
|
||||
oncommand="onToggleTraceHook()"/>
|
||||
<menuseparator/>
|
||||
<menu value="Style">
|
||||
<menupopup>
|
||||
<menuitem value="Default"
|
||||
oncommand="onDoStyleChange('default')"/>
|
||||
<menuitem value="Marble"
|
||||
oncommand="onDoStyleChange('marble')"/>
|
||||
<menuseparator/>
|
||||
<menuitem value="Other..."
|
||||
oncommand="onDoStyleChange('other')"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menubar>
|
||||
|
@ -61,17 +74,75 @@ resource:///irc/tests/test3.xul
|
|||
</toolbar>
|
||||
</toolbox>
|
||||
|
||||
<box id="outer-box" align="horizontal" flex="1">
|
||||
<html:div id="quickList" class="quick-list" flex="2">
|
||||
hello
|
||||
</html:div>
|
||||
<splitter id="main-splitter" align="vertical"/>
|
||||
<box align="vertical" flex="1">
|
||||
<html:div id="output" class="output-window" flex="1">
|
||||
hello
|
||||
<box id="outer-box" align="vertical" flex="1">
|
||||
<box id="inner-box" align="horizontal" flex="1">
|
||||
<html:div id="quickList" class="quick-list" flex="0" width="150px">
|
||||
</html:div>
|
||||
<html:textarea id="input" class="input-window" flex="0"/>
|
||||
<splitter id="main-splitter" align="vertical"/>
|
||||
<box align="vertical" flex="1">
|
||||
<html:iframe id="it-doesnt-matter-anyway" class="output-container"
|
||||
src="about:blank" flex="1"/>
|
||||
<html:textarea id="input" class="input-window"/>
|
||||
</box>
|
||||
</box>
|
||||
<html:div id="status-bar">
|
||||
<html:table class="status-table">
|
||||
<html:tr>
|
||||
<html:td class="status-label">Network</html:td>
|
||||
<html:td class="status-data">
|
||||
<html:a id="net-name">(none)</html:a>
|
||||
</html:td>
|
||||
<html:td class="status-label">Server</html:td>
|
||||
<html:td class="status-data">
|
||||
<html:a id="server-name">(none)</html:a>
|
||||
</html:td>
|
||||
<html:td class="status-label">Nickname</html:td>
|
||||
<html:td class="status-data">
|
||||
<html:a id="server-nick">(unknown)</html:a>
|
||||
</html:td>
|
||||
<html:td class="status-label">Lag</html:td>
|
||||
<html:td class="status-data">
|
||||
<html:a id="server-lag">-1</html:a>
|
||||
</html:td>
|
||||
<html:td class="status-label">Last Ping</html:td>
|
||||
<html:td class="status-data">
|
||||
<html:a id="last-ping">(never)</html:a>
|
||||
</html:td>
|
||||
</html:tr>
|
||||
<html:tr>
|
||||
<html:td class="status-label">Channel</html:td>
|
||||
<html:td class="status-data">
|
||||
<html:a id="channel-name">(none)</html:a>
|
||||
</html:td>
|
||||
<html:td class="status-label">Mode</html:td>
|
||||
<html:td class="status-data">
|
||||
<html:a id="channel-mode">(none)</html:a>
|
||||
</html:td>
|
||||
<html:td class="status-label">Users</html:td>
|
||||
<html:td class="status-data">
|
||||
<html:a id="channel-users">(none)</html:a>
|
||||
</html:td>
|
||||
<html:td class="status-label">Limit</html:td>
|
||||
<html:td class="status-data">
|
||||
<html:a id="channel-limit">(none)</html:a>
|
||||
</html:td>
|
||||
<html:td class="status-label">Key</html:td>
|
||||
<html:td class="status-data">
|
||||
<html:a id="channel-key">(none)</html:a>
|
||||
</html:td>
|
||||
</html:tr>
|
||||
<html:tr>
|
||||
<html:td class="status-label">Topic By</html:td>
|
||||
<html:td class="status-data">
|
||||
<html:a id="channel-topicby">(nobody)</html:a>
|
||||
</html:td>
|
||||
<html:td class="status-label">Topic</html:td>
|
||||
<html:td class="status-data" colspan="7">
|
||||
<html:a id="channel-topic">(none)</html:a>
|
||||
</html:td>
|
||||
</html:tr>
|
||||
</html:table>
|
||||
</html:div>
|
||||
</box>
|
||||
|
||||
</window>
|
||||
|
|
Загрузка…
Ссылка в новой задаче