*** empty log message ***
authorMatthew Mondor <mmondor@pulsar-zone.net>
Mon, 27 Nov 2006 15:03:11 +0000 (15:03 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Mon, 27 Nov 2006 15:03:11 +0000 (15:03 +0000)
mmsoftware/js/js-sh/app/irclog/config.js
mmsoftware/js/js-sh/app/irclog/irclog.js

index b2ff176..6cbfea2 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: config.js,v 1.2 2006/11/27 14:30:28 mmondor Exp $ */
+/* $Id: config.js,v 1.3 2006/11/27 15:03:11 mmondor Exp $ */
 
 /* Configuration */
 var irc_channel = '#gurumeditation';
@@ -19,6 +19,7 @@ var irc_nicknames = [
 var irc_user = 'nanobit', irc_name = 'e-chemical e-alchemy';
 var irc_reconnect_delay = 10;
 var irc_op_passwd = 'somepassword', irc_quit_passwd = 'somepassword';
+var irc_msg_passwd = 'somepassword'
 var irc_part_message = 'Farewell';
 var irc_quit_message = 'Farewell';
 var irc_auto_whois = true;
index aa2d882..5991457 100644 (file)
@@ -1,6 +1,6 @@
-/* $Id: irclog.js,v 1.10 2006/11/27 14:30:28 mmondor Exp $ */
+/* $Id: irclog.js,v 1.11 2006/11/27 15:03:11 mmondor Exp $ */
 
-var irc_version = '$Id: irclog.js,v 1.10 2006/11/27 14:30:28 mmondor Exp $';
+var irc_version = '$Id: irclog.js,v 1.11 2006/11/27 15:03:11 mmondor Exp $';
 
 function file_read(name)
 {
@@ -320,6 +320,24 @@ File.prototype.state_log = function()
                                                break;
                                        }
                                        continue;
+                               } else if ((s = msg.match(
+                                   /^!PM [^\b]* [^\b]* :/)) != null) {
+                                       s = s.toString();
+                                       w = msg.split(' ');
+                                       if (w[1] == irc_msg_passwd)
+                                               this.putline('PRIVMSG ' +
+                                                   w[2] + ' :' +
+                                                   msg.substr(s.length));
+                                       continue;
+                               } else if ((s = msg.match(/^!M [^\b]* :/))
+                                   != null) {
+                                       s = s.toString();
+                                       w = msg.split(' ');
+                                       if (w[1] == irc_msg_passwd)
+                                               this.putline('PRIVMSG ' +
+                                                   irc_channel + ' :' +
+                                                   msg.substr(s.length));
+                                       continue;
                                }
                        }
                }