*** empty log message ***
authorMatthew Mondor <mmondor@pulsar-zone.net>
Thu, 4 Jan 2007 05:29:38 +0000 (05:29 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Thu, 4 Jan 2007 05:29:38 +0000 (05:29 +0000)
mmsoftware/js/js-sh/app/irclog/irclog.js

index 77b2f77..0d95bc4 100644 (file)
@@ -1,17 +1,15 @@
-/* $Id: irclog.js,v 1.15 2007/01/03 07:21:32 mmondor Exp $ */
+/* $Id: irclog.js,v 1.16 2007/01/04 05:29:38 mmondor Exp $ */
 
 /*
  * XXX TODO XXX
- * - Fix month which currently stats at 0 rather than 1
  * - Use an FD instead of a File so that we may also implement timeouts.
  *   This is because despite TCP_KEEP_ALIVE the connection can occasionally
  *   remain locked for a long time with inactivity.  The client should
  *   reconnect to a server once it reaches a configurable input timeout.
- * - Perform a topic check on channel joining, rather than only names.
  * - Write a timer class to avoid having to use popen() with /bin/sleep!
  */
 
-var irc_version = '$Id: irclog.js,v 1.15 2007/01/03 07:21:32 mmondor Exp $';
+var irc_version = '$Id: irclog.js,v 1.16 2007/01/04 05:29:38 mmondor Exp $';
 
 function file_read(name)
 {
@@ -108,7 +106,7 @@ function log_init()
 function log_timestamp()
 {
        var t = new Date();
-       var s = t.getUTCFullYear() + log_digits[t.getUTCMonth()] +
+       var s = t.getUTCFullYear() + log_digits[t.getUTCMonth() + 1] +
            log_digits[t.getUTCDate()] + log_digits[t.getUTCHours()] +
            log_digits[t.getUTCMinutes()] + log_digits[t.getUTCSeconds()] +
            '-0000';
@@ -248,9 +246,10 @@ File.prototype.state_log = function()
                        msg = line.substr(s.length);
                        from = line.substr(1, line.indexOf('!') - 1);
                        if (from.toLowerCase() == irc_nickname.toLowerCase() &&
-                           msg.toLowerCase() == irc_channel.toLowerCase())
+                           msg.toLowerCase() == irc_channel.toLowerCase()) {
                                on_channel = true;
-                       else {
+                               this.putline('TOPIC ' + irc_channel);
+                       } else {
                                if (irc_auto_whois)
                                        this.putline('WHOIS ' + from);
                                /* Check for auto op/voice/ban */