rem: var sampleUser = {TYPE: "IRCUser", nick: "ircmonkey", name: "IRCMonkey", properNick: "IRCMonkey", displayName: "IRCMonkey", host: ""}; var sampleChannel = {TYPE: "IRCChannel", name: "#mojo", displayName: "#mojo"}; 
add: var sampleUser = {TYPE: "IRCUser", encodedName: "ircmonkey", canonicalName: "ircmonkey", unicodeName: "IRCMonkey", viewName: "IRCMonkey", host: "", name: "chatzilla"}; var sampleChannel = {TYPE: "IRCChannel", encodedName: "#mojo", canonicalName: "#mojo", unicodeName: "#Mojo", viewName: "#Mojo"}; 
context: function cmdTestDisplay(e){    display(MSG_TEST_HELLO, MT_HELLO);    display(MSG_TEST_INFO, MT_INFO);    display(MSG_TEST_ERROR, MT_ERROR);    display(MSG_TEST_HELP, MT_HELP);    display(MSG_TEST_USAGE, MT_USAGE);    display(MSG_TEST_STATUS, MT_STATUS);    if (e.server && e.server.me)    {        var me = e.server.me;        var sampleUser = {TYPE: "IRCUser", nick: "ircmonkey",                          name: "IRCMonkey", properNick: "IRCMonkey",                          displayName: "IRCMonkey",                          host: ""};        var sampleChannel = {TYPE: "IRCChannel", name: "#mojo",                              displayName: "#mojo"};        function test (from, to)        {            var fromText = (from != me) ? from.TYPE + " ``" + from.name + "''" :                MSG_YOU;            var toText   = (to != me) ? to.TYPE + " ``" + to.name + "''" :                MSG_YOU;                        display (getMsg(MSG_TEST_PRIVMSG, [fromText, toText]),                     "PRIVMSG", from, to);            display (getMsg(MSG_TEST_ACTION, [fromText, toText]),                     "ACTION", from, to);            display (getMsg(MSG_TEST_NOTICE, [fromText, toText]),                     "NOTICE", from, to);        }                test (sampleUser, me); /* from user to me */        test (me, sampleUser); /* me to user */        display(MSG_TEST_URL, "PRIVMSG", sampleUser, me);        display(MSG_TEST_STYLES, "PRIVMSG", sampleUser, me);        display(MSG_TEST_EMOTICON, "PRIVMSG", sampleUser, me);        display(MSG_TEST_RHEET, "PRIVMSG", sampleUser, me);        display(unescape(MSG_TEST_CTLCHR), "PRIVMSG", sampleUser, me);        display(unescape(MSG_TEST_COLOR), "PRIVMSG", sampleUser, me);        display(MSG_TEST_QUOTE, "PRIVMSG", sampleUser, me);        if (e.channel)        {            test (sampleUser, sampleChannel); /* user to channel */            test (me, sampleChannel);         /* me to channel */            display(MSG_TEST_TOPIC, "TOPIC", sampleUser, sampleChannel);            display(MSG_TEST_JOIN, "JOIN", sampleUser, sampleChannel);            display(MSG_TEST_PART, "PART", sampleUser, sampleChannel);            display(MSG_TEST_KICK, "KICK", sampleUser, sampleChannel);            display(MSG_TEST_QUIT, "QUIT", sampleUser, sampleChannel);            display(getMsg(MSG_TEST_STALK, me.nick),                    "PRIVMSG", sampleUser, sampleChannel);            display(MSG_TEST_STYLES, "PRIVMSG", me, sampleChannel);        }    }}
meta: 1567	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1567/c6101b49aef97cf47069c333c0e54bcdd4a66616/commands.js/buggy/xul/content/commands.js