[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-messenger-build/master] Add patch for replying CTCP time query with UTC (#15161)



commit cc76370a70c5f4ac883e9e47c74094b976dbafae
Author: Sukhbir Singh <sukhbir@xxxxxxxxxxxxxx>
Date:   Sat Apr 25 06:26:05 2015 -0400

    Add patch for replying CTCP time query with UTC (#15161)
---
 projects/instantbird/config          |    1 +
 projects/instantbird/ctcp-time.patch |   21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/projects/instantbird/config b/projects/instantbird/config
index e4e3816..f0c81a9 100644
--- a/projects/instantbird/config
+++ b/projects/instantbird/config
@@ -68,6 +68,7 @@ input_files:
   - filename: theme-extension-update.patch
   - filename: installer.patch
   - filename: cert_override.txt
+  - filename: ctcp-time.patch
   - filename: branding/name.patch
   - filename: branding/default.png
   - filename: branding/default16.png
diff --git a/projects/instantbird/ctcp-time.patch b/projects/instantbird/ctcp-time.patch
new file mode 100644
index 0000000..749cd36
--- /dev/null
+++ b/projects/instantbird/ctcp-time.patch
@@ -0,0 +1,21 @@
+diff --git a/chat/protocols/irc/ircCTCP.jsm b/chat/protocols/irc/ircCTCP.jsm
+index 5722479..642fad3 100644
+--- a/chat/protocols/irc/ircCTCP.jsm
++++ b/chat/protocols/irc/ircCTCP.jsm
+@@ -195,7 +195,7 @@ var ctcpBase = {
+       if (aMessage.command == "PRIVMSG") {
+         // TIME
+         // Received a TIME request, send a human readable response.
+-        let now = (new Date()).toString();
++        let now = (new Date()).toUTCString();
+         this.LOG("Received TIME request from " + aMessage.origin +
+                  ". Sending TIME response: \"" + now + "\".");
+         this.sendCTCPMessage(aMessage.origin, true, "TIME", ":" + now);
+@@ -230,6 +230,7 @@ var ctcpBase = {
+         this.sendCTCPMessage(aMessage.origin, true, "VERSION", version);
+       }
+       else if (aMessage.command == "NOTICE" && aMessage.ctcp.param.length) {
++
+         // VERSION #:#:#
+         // Received VERSION response, display to the user.
+         let response = _("ctcp.version", aMessage.origin,

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits