From b07f6fabe40bc2f983bf399deadd4b1adec25bca Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Wed, 2 Oct 2013 22:12:58 +0000
Subject: [PATCH] Synchronet crashes when given an invalid strftime string
 apparently.

---
 exec/irc.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/exec/irc.js b/exec/irc.js
index ee5b57d13a..abd7a418c4 100644
--- a/exec/irc.js
+++ b/exec/irc.js
@@ -807,8 +807,8 @@ function handle_ctcp(prefix,message)  {
 		case "TIME":
 			from_nick=get_highlighted_nick(prefix,message);
 			to_nick=get_nick(prefix);
-			sock.send("NOTICE "+to_nick+" :\x01TIME "+strftime("%A, %B %d, %I:%M:%S%p, %G %Z",time())+"\x01\r\n");
-			screen.print_line(">"+from_nick+"<"+" CTCP TIME Reply: "+strftime("%A, %B %d, %I:%M:%S%p, %G %Z",time() ));
+			sock.send("NOTICE "+to_nick+" :\x01TIME "+strftime("%A, %B %d, %I:%M:%S%p, %Y %Z",time())+"\x01\r\n");
+			screen.print_line(">"+from_nick+"<"+" CTCP TIME Reply: "+strftime("%A, %B %d, %I:%M:%S%p, %Y %Z",time() ));
 			break;
 	}
 }
-- 
GitLab