bug 165901, "Clicking on network/channel name has no effect"
bug 165875, "Support CTCP CLIENTINFO in Chatzilla"
bug 165868, "Support CTCP TIME in Chatzilla"
bug 137892, "Pref for new tab threshold is ignored"
fix strict warning in static.js
This commit is contained in:
rginda%netscape.com 2002-09-03 23:33:27 +00:00
Родитель 60890492c0
Коммит 831a3efda5
5 изменённых файлов: 48 добавлений и 21 удалений

Просмотреть файл

@ -177,12 +177,6 @@ function (aPort, aScheme)
IRCProtocolHandler.prototype.newURI =
function (aSpec, aCharset, aBaseURI)
{
if (aBaseURI)
{
debug ("-*- ircHandler: aBaseURI passed to newURI, bailing.\n");
return null;
}
var url = Components.classes[STANDARDURL_CONTRACTID].
createInstance(nsIStandardURL);
url.init(nsIStandardURL.URLTYPE_STANDARD, 6667, aSpec, aCharset, aBaseURI);

Просмотреть файл

@ -1503,6 +1503,12 @@ function serv_ctcp (e)
e.CTCPData = ary[2] ? ary[2] : "";
e.CTCPCode = ary[1].toLowerCase();
if (e.CTCPCode.search (/^reply/i) == 0)
{
dd ("dropping spoofed reply.");
return false;
}
e.type = "ctcp-" + e.CTCPCode;
e.destMethod = "onCTCP" + ary[1][0].toUpperCase() +
ary[1].substr (1, ary[1].length).toLowerCase();
@ -1525,6 +1531,24 @@ function serv_ctcp (e)
}
CIRCServer.prototype.onCTCPClientinfo =
function serv_ccinfo (e)
{
var clientinfo = new Array();
for (var fname in this)
{
var ary = fname.match(/^onCTCP(.*)/);
if (ary && ary[1].search(/^Reply/) == -1)
clientinfo.push (ary[1].toUpperCase());
}
e.server.ctcpTo (e.user.nick, "CLIENTINFO", clientinfo.join(" "),
"NOTICE");
return true;
}
CIRCServer.prototype.onCTCPAction =
function serv_cact (e)
{
@ -1533,6 +1557,15 @@ function serv_cact (e)
}
CIRCServer.prototype.onCTCPTime =
function serv_cping (e)
{
e.server.ctcpTo (e.user.nick, "TIME", new Date(), "NOTICE");
return true;
}
CIRCServer.prototype.onCTCPVersion =
function serv_cver (e)

Просмотреть файл

@ -3265,8 +3265,8 @@ function my_cprivmsg (e)
else
{
playSounds(client.MSG_BEEP);
if (client.NEW_TAB_THRESHOLD == 0 ||
client.viewsArray.length < client.NEW_TAB_THRESHOLD)
if (client.NEW_TAB_LIMIT == 0 ||
client.viewsArray.length < client.NEW_TAB_LIMIT)
{
var tab = openQueryTab (e.server, e.user.nick);
if (client.FOCUS_NEW_TAB)

Просмотреть файл

@ -32,11 +32,11 @@
* | seperated
* +- initialScripts (String) urls for scripts to run at startup,
* | semicolon seperated
* +- newTabThreshold (Number) max number of tabs to have open before disabling
* | automatic tab creation for private messages.
* | use 0 for unlimited new tabs, or 1 to disable
* | automatic tab creation.
* +- focusNewTab (Boolean) bring new tabs created in response to a private
* +- newTabLimit (Number) max number of tabs to have open before disabling
* | automatic tab creation for private messages.
* | use 0 for unlimited new tabs, or 1 to disable
* | automatic tab creation.
* +- raiseNewTab (Boolean) bring new tabs created in response to a private
* | message to the front.
* +- munger (Boolean) send output through text->html munger
* | +- colorCodes (Boolean) enable color code handling
@ -112,10 +112,10 @@ function readIRCPrefs (rootNode)
client.INITIAL_URLS = "irc://";
client.INITIAL_SCRIPTS =
getCharPref (pref, rootNode + "initialScripts", "");
client.NEW_TAB_THRESHOLD =
getIntPref (pref, rootNode + "newTabThreshold", 15);
client.FOCUS_NEW_TAB =
getIntPref (pref, rootNode + "focusNewTab", false);
client.NEW_TAB_LIMIT =
getIntPref (pref, rootNode + "newTabLimit", 15);
client.RAISE_NEW_TAB =
getBoolPref (pref, rootNode + "raiseNewTab", false);
client.ADDRESSED_NICK_SEP =
getCharPref (pref, rootNode + "nickCompleteStr",
client.ADDRESSED_NICK_SEP).replace(/\s*$/, "");
@ -212,8 +212,8 @@ function writeIRCPrefs (rootNode)
pref.setCharPref (rootNode + "nickCompleteStr", client.ADDRESSED_NICK_SEP);
pref.setCharPref (rootNode + "initialURLs", client.INITIAL_URLS);
pref.setCharPref (rootNode + "initialScripts", client.INITIAL_SCRIPTS);
pref.setCharPref (rootNode + "newTabThreshold", client.NEW_TAB_THRESHOLD);
pref.setCharPref (rootNode + "focusNewTab", client.FOCUS_NEW_TAB);
pref.setIntPref (rootNode + "newTabLimit", client.NEW_TAB_LIMIT);
pref.setBoolPref (rootNode + "raiseNewTab", client.RAISE_NEW_TAB);
pref.setCharPref (rootNode + "style.default", client.DEFAULT_STYLE);
pref.setCharPref (rootNode + "stalkWords",
client.stalkingVictims.join ("; "));

Просмотреть файл

@ -36,7 +36,7 @@ const MSG_UNKNOWN = getMsg ("unknown");
client.defaultNick = getMsg( "defaultNick" );
client.version = "0.8.9";
client.version = "0.8.10";
client.TYPE = "IRCClient";
client.COMMAND_CHAR = "/";
@ -314,7 +314,7 @@ function processStartupURLs()
if (!wentSomewhere)
{
/* if we had nowhere else to go, connect to any default urls */
ary = client.INITIAL_URLS.split(/\s*;\s*/).reverse();
var ary = client.INITIAL_URLS.split(/\s*;\s*/).reverse();
for (var i in ary)
{
if (ary[i] && ary[i] != "irc://")