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. git-svn-id: svn://10.0.0.236/trunk@50318 18797224-902f-48f8-a5cc-f745e15eee43
63 lines
1.5 KiB
JavaScript
63 lines
1.5 KiB
JavaScript
/*
|
|
* Hook used to trace events.
|
|
*/
|
|
function event_tracer (e)
|
|
{
|
|
var name="", data="";
|
|
|
|
switch (e.set)
|
|
{
|
|
case "server":
|
|
name = e.destObject.connection.host;
|
|
if (e.type == "rawdata")
|
|
data = "'" + e.data + "'";
|
|
break;
|
|
|
|
case "network":
|
|
case "channel":
|
|
name = e.destObject.name;
|
|
break;
|
|
|
|
case "user":
|
|
name = e.destObject.nick;
|
|
break;
|
|
|
|
case "httpdoc":
|
|
name = e.destObject.server + e.destObject.path;
|
|
if (e.destObject.state != "complete")
|
|
data = "state: '" + e.destObject.state + "', received " +
|
|
e.destObject.data.length;
|
|
else
|
|
dd ("document done:\n" + dumpObjectTree (this));
|
|
break;
|
|
|
|
case "dcc-chat":
|
|
name = e.destObject.host + ":" + e.destObject.port;
|
|
if (e.type == "rawdata")
|
|
data = "'" + e.data + "'";
|
|
break;
|
|
|
|
case "client":
|
|
if (e.type == "do-connect")
|
|
data = "attempt: " + e.attempt + "/" +
|
|
e.destObject.MAX_CONNECT_ATTEMPTS;
|
|
break;
|
|
|
|
default:
|
|
break;
|
|
}
|
|
|
|
if (name)
|
|
name = "[" + name + "]";
|
|
|
|
str = "Level " + e.level + ": '" + e.type + "', " +
|
|
e.set + name + "." + e.destMethod;
|
|
if (data)
|
|
str += "\ndata : " + data;
|
|
|
|
dd (str);
|
|
|
|
return true;
|
|
|
|
}
|