Changes to install command related files. connection-xpcom.js: style changes; fix to verify the socket is open before send/recieve, * dcc.js, http.js, events.js: style changes * irc-debug.js: changes to display network events * irc.js: style changes, userIsMe() convenience function added. Route events to parent network if there is no local landing spot. add usersAffected property to onChanMode events. * utils.js: add jsenv.HAS_DOCUMENT * listbox.js add MPL (duh) add prepend and insert methods * test3-handlers.js Add MPL Use new command stuff to provide online help and error reporting. Hook some basic server messages to output window. Alphabetize nicks (order breaks when someone /nicks) Added nick property to some display() lines so they can be CSS'd by user. Listen for onChanMode event. Modify client.viewsArray to allow for multiple view with the same name. * test3-static.js Add MPL Show navigator.userAgent in VERSION reply modify setCurrentObject to not care if there isnt a toolbutton associated modify getTBForObject to work with multiple view w/ same name test3.xul Add MPL Include command related scripts git-svn-id: svn://10.0.0.236/trunk@47496 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 + "', recieved " +
|
|
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;
|
|
|
|
}
|