# HG changeset patch # User HIROSE Yuuji # Date 1339985750 -32400 # Node ID 0b104c49457a0c692e253f72dcce22faf1d61af5 # Parent 42f196a6c6c067d5df052dc6b38de7b5148866e3 Multiple email addresses can be acceptable diff -r 42f196a6c6c0 -r 0b104c49457a after5.rb --- a/after5.rb Mon Jun 18 11:01:23 2012 +0900 +++ b/after5.rb Mon Jun 18 11:15:50 2012 +0900 @@ -4,7 +4,7 @@ # Associative Scheduling Table - after5 # (C)2003, 2004, 2006, 2008, 2012 by HIROSE Yuuji [yuujigentei.org] # $Id: after5.rb,v 1.19 2012/04/01 11:52:25 yuuji Exp yuuji $ -# Last modified Mon Jun 18 09:15:28 2012 on firestorm +# Last modified Mon Jun 18 11:03:46 2012 on firestorm # See http://www.gentei.org/~yuuji/software/after5/ # このスクリプトはEUCで保存してください。 $hgid = <<_HGID_.split[1..-2].join(" ") @@ -1112,17 +1112,6 @@ 'notifymail' => true, 'mailbracket' => '[%n-ML]', } - @ntlist = [ - ['nt10m', "10"+msg('minutes', 'before')], - ['nt30m', "30"+msg('minutes', 'before')], - ['nt60m', "60"+msg('minutes', 'before')], - ['nttoday', msg('theday')], - ['nt1d', "1"+msg('days', 'before')], - ['nt2d', "2"+msg('days', 'before')], - ['nt3d', "3"+msg('days', 'before')], - ['nt7d', "7"+msg('days', 'before')], - ['nt30d', "30"+msg('days', 'before')], - ] @subjtags = [['[GroupID:#]', "[%i:%c]"], ['[GroupID:#####]', "[%i:%5c]"], ['[GroupName:#]', "[%n:%c]"], @@ -1147,6 +1136,17 @@ @cookie = getcookie() importcookie() @lang = (/^j/i =~ @opt['lang'] ? 0 : 1) + @ntlist = [ # this shoud be set after @lang + ['nt10m', "10"+msg('minutes', 'before')], + ['nt30m', "30"+msg('minutes', 'before')], + ['nt60m', "60"+msg('minutes', 'before')], + ['nttoday', msg('theday')], + ['nt1d', "1"+msg('days', 'before')], + ['nt2d', "2"+msg('days', 'before')], + ['nt3d', "3"+msg('days', 'before')], + ['nt7d', "7"+msg('days', 'before')], + ['nt30d', "30"+msg('days', 'before')], + ] p @cookie if $DEBUG p @params if $DEBUG @@ -1273,9 +1273,17 @@ "This mail was sent by the access from %s\n"], 'newpassword' => ["%s さんのパスワードは %s です。\n", "The password of %s is %s\n"], - 'mischief' => ["身に覚えのない場合はいたずらです。どうしましょ。", - 'If you have no idea for getting this message, '+ - 'it is mischief by someone else'], + 'mischief' => ["身に覚えのない場合はMLへの代理登録の可能性があります。 +上記URLが見慣れたものならばアクセスしてみるか、 +このURLの管理人(%s さん)に問い合わせてみて下さい。 +それらも心当たりのない場合はいたずらです。対処しますので管理人まで御連絡下さい。", + 'If you have no idea of the reason for getting this message, '+ + 'it may be a invitation of mailing list from your friend. +Please try to access URL above if it is familiar one or +contact to the administrator of the site(is %s). +If you have completely no clue for this invitation, +it might be a mischief by someone else. Please notice the fact +to the administrator. Thank you.'], 'user' => ['ユーザ', 'user'], 'group' => ['グループ', 'group'], 'mladdress' => ['公開MLアドレス(%s以外にしたい場合設定する)', @@ -1341,6 +1349,8 @@ 'regaddress' => ['登録アカウント名', 'Account id'], 'existent' => ['既にあるんすよ → ', 'Already exists: '], 'mailaddress' => ['通知送付先アドレス', 'Notification email address'], + 'multipleok' => ['
(スペースで区切って複数指定可)', +'
(Two or more addresses are OK by delimiting with space.)'], 'weburl' => ['ゲストブックとかURL
(予定への反応を書いて欲しい場所)', 'Your guest book URL'], 'usermodwarn' => ['いちいち yes/no とか確認取らないから押したら最後、気いつけて。', 'This is the final decision. Make sure and sure.'], @@ -1353,8 +1363,6 @@ "Consiering the groups registered in another group, notification to the group `%s' is send to members as follows."], 'noadmingroup' => ['管理できるグループはないっす', "'There's no groups under your administration."], - 'multiplemail' => ['複数の宛先に通知したいなら..', - 'Wanna send notify to multiple address...'], 'nickname' => ['ニックネーム', 'nickname'], 'shortnameplz' => ['表が崩れるほど長すぎるニックネームは嫌われるよ。短めにね。', 'Because nickname is displayed many times in table, shorter name is prefered.'], @@ -1526,6 +1534,10 @@ # Create new user from Web-UI newp = pm.setnewpasswd(user, @opt['pswdlen']) @sc.createuser(user, user) + putLog("New user [#{user}] created\n") + sendMail(@opt['maintainer'], "After5 New User", + sprintf("URL=%s\nREMOTE_ADDR=%s\nuser=%s", + @opt['url'], ENV['REMOTE_ADDR'], user)) sendMail(email, "#{@mybase} new account", sprintf(msg('accessfrom'), ENV['REMOTE_ADDR']) + sprintf(@opt['url']) + "\n" + @@ -1656,7 +1668,7 @@ m.close else # exec(@attr['mail'], "-s", subject, to) - recipient = rcptto || [to] + recipient = rcptto || to.split(/,\s*|\s+/) #p recipient if spoolto && spoolto.is_a?(String) && proc { @@ -2756,7 +2768,7 @@ @sc.members(name) else [name] - end.collect {|u| mailaddress(u, name)} + end.collect {|u| mailaddress(u, name).split(/,\s*|\s+/)}.flatten # p rcpts # p to sendMail(to, subj, body, from, rcpts, @@ -2839,7 +2851,7 @@ @O.print @H.p(msg('usermodwarn')) @O.print \ @H.elementln("form", {'action'=>@myname+"?-usermod", 'method'=>'POST'}){ - @H.elementln("table"){ + @H.elementln("table", {"class" => "border"}){ @H.elementln("tr"){ @H.element("td", tdclass) {msg('regaddress')} + \ @H.element("td") { @@ -2847,7 +2859,7 @@ } } + \ @H.elementln("tr"){ - @H.element("td", tdclass) {msg('mailaddress')} + \ + @H.element("td", tdclass) {msg('mailaddress', 'multipleok')} + \ @H.element("td") { @H.text("newmail", mailaddress(user), @opt['size'], 80) } @@ -2865,10 +2877,7 @@ } } } + \ - @H.elementln("p"){ - msg('shortnameplz') + "
\n" + \ - @H.a(@after5url+"multiplenotify.html", msg('multiplemail')) - } + \ + @H.elementln("p"){msg('shortnameplz')} + \ '
' + \ @H.submit_reset("GO") } # form