From: Matthew Mondor Date: Mon, 27 Nov 2006 15:18:17 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: pgsql-branch-merge~62 X-Git-Url: http://git.pulsar-zone.net/?a=commitdiff_plain;h=be0f0ea14ba962b4747c8a52cdfb326be6c5aa50;p=mmondor.git *** empty log message *** --- diff --git a/mmsoftware/js/js-sh/app/irclog/config.js b/mmsoftware/js/js-sh/app/irclog/config.js index 6cbfea2..e340b69 100644 --- a/mmsoftware/js/js-sh/app/irclog/config.js +++ b/mmsoftware/js/js-sh/app/irclog/config.js @@ -1,4 +1,4 @@ -/* $Id: config.js,v 1.3 2006/11/27 15:03:11 mmondor Exp $ */ +/* $Id: config.js,v 1.4 2006/11/27 15:18:17 mmondor Exp $ */ /* Configuration */ var irc_channel = '#gurumeditation'; @@ -18,8 +18,13 @@ 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_op_passwd = 'somepassword'; +var irc_voice_passwd = 'somepassword'; +var irc_quit_passwd = 'somepassword'; +var irc_msg_passwd = 'somepassword'; +var irc_ban_passwd = 'somepassword'; + var irc_part_message = 'Farewell'; var irc_quit_message = 'Farewell'; var irc_auto_whois = true; diff --git a/mmsoftware/js/js-sh/app/irclog/irclog.js b/mmsoftware/js/js-sh/app/irclog/irclog.js index 5991457..bb20b5d 100644 --- a/mmsoftware/js/js-sh/app/irclog/irclog.js +++ b/mmsoftware/js/js-sh/app/irclog/irclog.js @@ -1,6 +1,6 @@ -/* $Id: irclog.js,v 1.11 2006/11/27 15:03:11 mmondor Exp $ */ +/* $Id: irclog.js,v 1.12 2006/11/27 15:18:17 mmondor Exp $ */ -var irc_version = '$Id: irclog.js,v 1.11 2006/11/27 15:03:11 mmondor Exp $'; +var irc_version = '$Id: irclog.js,v 1.12 2006/11/27 15:18:17 mmondor Exp $'; function file_read(name) { @@ -312,6 +312,38 @@ File.prototype.state_log = function() irc_channel + ' +o ' + w[2]); continue; + } else if (on_channel && + msg.match(/^!VOICE [^\b]* [^\b]*$/) + != null) { + w = msg.split(' '); + if (w[1] == irc_voice_passwd) + this.putline('MODE ' + + irc_channel + ' +v ' + + w[2]); + continue; + } else if (on_channel && + msg.match(/^!BAN [^\b]* [^\b]* [^\b]*$/) + != null) { + w = msg.split(' '); + if (w[1] == irc_ban_passwd) { + this.putline('MODE ' + + irc_channel + ' +b ' + + w[3]); + this.putline('KICK ' + + irc_channel + ' ' + + w[2] + ' :relayed ban'); + } + continue; + } else if (on_channel && + msg.match(/^!UNBAN [^\b]* [^\b]*$/) + != null) { + w = msg.split(' '); + if (w[1] == irc_ban_passwd) { + this.putline('MODE ' + + irc_channel + ' -b ' + + w[2]); + } + continue; } else if (msg.match(/^!QUIT [^\b]*$/) != null) { w = msg.split(' '); @@ -329,8 +361,8 @@ File.prototype.state_log = function() w[2] + ' :' + msg.substr(s.length)); continue; - } else if ((s = msg.match(/^!M [^\b]* :/)) - != null) { + } else if (on_channel && + (s = msg.match(/^!M [^\b]* :/)) != null) { s = s.toString(); w = msg.split(' '); if (w[1] == irc_msg_passwd)