*** empty log message ***
authorMatthew Mondor <mmondor@pulsar-zone.net>
Sun, 26 Nov 2006 16:38:41 +0000 (16:38 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Sun, 26 Nov 2006 16:38:41 +0000 (16:38 +0000)
mmsoftware/js/js-sh/app/irclog/irclog.js

index 2451519..a9ab7f3 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: irclog.js,v 1.5 2006/11/26 15:42:06 mmondor Exp $ */
+/* $Id: irclog.js,v 1.6 2006/11/26 16:38:41 mmondor Exp $ */
 
 /* Configuration */
 var irc_channel = '#gurumeditation';
@@ -18,7 +18,7 @@ var irc_nicknames = [
 ];
 var irc_user = 'nanobit', irc_name = 'e-chemical e-alchemy';
 var irc_reconnect_delay = 10;
-var irc_version = '$Id: irclog.js,v 1.5 2006/11/26 15:42:06 mmondor Exp $';
+var irc_version = '$Id: irclog.js,v 1.6 2006/11/26 16:38:41 mmondor Exp $';
 var irc_op_passwd = 'somepassword', irc_quit_passwd = 'somepassword';
 var irc_part_message = 'Part message!';
 var irc_quit_message = 'Quit message!';
@@ -268,14 +268,14 @@ File.prototype.state_log = function()
                        to = w[2];
                        if (to.toLowerCase() == irc_nickname.toLowerCase()) {
                                if (on_channel &&
-                                   msg.match(/^!OP [\b]* [\b]*/) != null) {
+                                   msg.match(/^!OP [^\b]* [^\b]*$/) != null) {
                                        w = msg.split(' ');
                                        if (w[1] == irc_op_passwd)
                                                this.putline('MODE ' +
                                                    irc_channel + ' +o ' +
                                                    from);
                                        continue;
-                               } else if (msg.match(/^!QUIT [\b]*/)
+                               } else if (msg.match(/^!QUIT [^\b]*$/)
                                    != null) {
                                        w = msg.split(' ');
                                        if (w[1] == irc_quit_passwd) {
@@ -313,6 +313,7 @@ function main()
                fd.connect(server.address, server.port);
                fd.setsockopt(FD.SO_KEEPALIVE, 1);
                fh = new File(fd.fd, 'r+');
+               fh.setvbuf(File._IOLBF, 0);
                fh.putline('USER ' + irc_user + ' hostname servername :' +
                    irc_name);
                fh.state = File.prototype.state_nick;