diff --git a/mozilla/extensions/irc/xul/content/commands.js b/mozilla/extensions/irc/xul/content/commands.js index ab070189577..1aa15b6bd39 100644 --- a/mozilla/extensions/irc/xul/content/commands.js +++ b/mozilla/extensions/irc/xul/content/commands.js @@ -77,6 +77,7 @@ function addCommands(commandObject) add ("quit", "onInputExit"); add ("quote", "onInputQuote"); add ("server", "onInputServer"); + add ("squery", "onInputSquery"); add ("stalk", "onInputStalk"); add ("status", "onInputStatus"); add ("statusbar", "onInputStatusbar"); diff --git a/mozilla/extensions/irc/xul/content/handlers.js b/mozilla/extensions/irc/xul/content/handlers.js index b70aaf9d879..f824ef1bbc1 100644 --- a/mozilla/extensions/irc/xul/content/handlers.js +++ b/mozilla/extensions/irc/xul/content/handlers.js @@ -1133,6 +1133,35 @@ function cli_iscommand (e) } } +client.onInputSquery = +function cli_isquery (e) +{ + var o = getObjectDetails(client.currentObject); + + if ("server" in o) + { + var ary = e.inputData.match (/(\S+)? ?(.*)/); + if (ary == null) + return false; + + if (ary.length == 1) + { + o.server.sendData ("SQUERY " + ary[1] + "\n"); + } + else + { + o.server.sendData ("SQUERY " + ary[1] + " :" + ary[2] + "\n"); + } + return true; + } + else + { + client.currentObject.display (getMsg("onInputSimpleCommandMsg", + e.command),"WARNING"); + return false; + } +} + client.onInputStatus = function cli_istatus (e) { diff --git a/mozilla/extensions/irc/xul/content/static.js b/mozilla/extensions/irc/xul/content/static.js index 755018124cd..2822a4ed30f 100644 --- a/mozilla/extensions/irc/xul/content/static.js +++ b/mozilla/extensions/irc/xul/content/static.js @@ -36,7 +36,7 @@ const MSG_UNKNOWN = getMsg ("unknown"); client.defaultNick = getMsg( "defaultNick" ); -client.version = "0.8.7"; +client.version = "0.8.8"; client.TYPE = "IRCClient"; client.COMMAND_CHAR = "/"; @@ -2194,7 +2194,7 @@ function __display(message, msgtype, sourceObj, destObj) if (fromUser && sourceObj == me) fromAttr = me.nick + " ME!"; else if (fromUser) fromAttr = sourceObj.nick; else if (typeof sourceObj == "object") fromAttr = sourceObj.name; - + var toType = (destObj) ? destObj.TYPE : "unk"; var toAttr; @@ -2247,8 +2247,11 @@ function __display(message, msgtype, sourceObj, destObj) if (sourceObj != me) { nick = sourceObj.properNick; - if ("getURL" in sourceObj) + if (!nick) + nick = sourceObj.name + "@" + sourceObj.host; + else if ("getURL" in sourceObj) nickURL = sourceObj.getURL(); + if (toType == "IRCUser") /* msg from user to me */ { getAttention = true; diff --git a/mozilla/extensions/irc/xul/locale/en-US/chatzilla.properties b/mozilla/extensions/irc/xul/locale/en-US/chatzilla.properties index 8a9ac57b7e5..75695938af9 100644 --- a/mozilla/extensions/irc/xul/locale/en-US/chatzilla.properties +++ b/mozilla/extensions/irc/xul/locale/en-US/chatzilla.properties @@ -153,6 +153,9 @@ quoteHelp=Sends a raw command to the IRC server, not a good idea if you don't kn serverUsage= [] [] serverHelp=Connects to server on , or 6667 if is not specified. Provides the password if specified. If you are already connected, the view for is made current. If that view has been deleted, it is recreated. +squeryUsage= [] +squeryHelp=Sends the commands to the service . + stalkUsage= stalkHelp=Add text to list of words for which you would like to see alerts. Whenever a person with a nickname matching speaks, or someone says a phrase containing , your ChatZilla window will become active (on some operating systems) and its taskbar icon will flash (on some operating systems.)