cosmetic
darcs-hash:20020227013142-a279a-df5a919c65f53f694cd7c10cf93866fd26747067.gz
This commit is contained in:
parent
31e5d2de63
commit
5251afde6b
1 changed files with 19 additions and 24 deletions
43
news-cancel
43
news-cancel
|
@ -6,7 +6,7 @@
|
||||||
## Login stransky <stransky@crans.org>
|
## Login stransky <stransky@crans.org>
|
||||||
##
|
##
|
||||||
## Started on dim 13 jan 2002 02:30:56 CET Nicolas STRANSKY
|
## Started on dim 13 jan 2002 02:30:56 CET Nicolas STRANSKY
|
||||||
## Last update ven 25 jan 2002 08:53:48 CET Nicolas STRANSKY
|
## Last update mer 27 fév 2002 02:28:58 CET Nicolas STRANSKY
|
||||||
##
|
##
|
||||||
## Script pour annuler ou modérer un message de news.
|
## Script pour annuler ou modérer un message de news.
|
||||||
#
|
#
|
||||||
|
@ -28,7 +28,7 @@ VERIF () {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "on ne fait rien"
|
echo "On ne fait rien."
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -36,26 +36,20 @@ VERIF () {
|
||||||
}
|
}
|
||||||
|
|
||||||
SAUVEGARDE () {
|
SAUVEGARDE () {
|
||||||
echo "sauvegarde du mail dans /root/moderes/ ? [o/n] "
|
echo "Sauvegarde du message dans /root/moderes/..."
|
||||||
read reponse
|
sleep 1
|
||||||
case $reponse in
|
rep=`echo $newsgroup | sed 's/\./\//g'`
|
||||||
o*|O*)
|
cp /var/spool/news/articles/$rep/$numero /root/moderes/$newsgroup'.'$numero.nws
|
||||||
rep=`echo $newsgroup | sed 's/\./\//g'`
|
moderateur=`who am i | awk '{print $1}'`
|
||||||
cp /var/spool/news/articles/$rep/$numero /root/moderes/$newsgroup'.'$numero.nws
|
echo "$1 de $newsgroup.$numero" > /tmp/news-cancel1.txt
|
||||||
moderateur=`who am i | awk '{print $1}'`
|
echo " " >> /tmp/news-cancel1.txt
|
||||||
echo "modérateur : $moderateur" > /tmp/commentaires.txt
|
echo "modérateur : $moderateur" >> /tmp/news-cancel1.txt
|
||||||
echo "commentaires : " >> /tmp/commentaires.txt
|
echo "commentaires : " > /tmp/news-cancel-commentaires.txt
|
||||||
$EDITOR /tmp/commentaires.txt
|
$EDITOR /tmp/news-cancel-commentaires.txt
|
||||||
echo . >> /tmp/commentaires.txt
|
cat /tmp/news-cancel-commentaires.txt >> /tmp/news-cancel1.txt
|
||||||
cat /tmp/commentaires.txt | mutt -nx -a /root/moderes/$newsgroup'.'$numero.nws -s "moderation de $newsgroup.$numero par $moderateur" moderateurs
|
cat /tmp/news-cancel1.txt | mutt -nx -a /root/moderes/$newsgroup'.'$numero.nws -s "moderation de $newsgroup.$numero par $moderateur" moderateurs
|
||||||
rm -f /tmp/commentaires.txt
|
rm -f /tmp/news-cancel*
|
||||||
;;
|
echo " "
|
||||||
|
|
||||||
*)
|
|
||||||
echo "on ne fait rien"
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,14 +75,15 @@ then
|
||||||
case $1 in
|
case $1 in
|
||||||
\<*@*\>)
|
\<*@*\>)
|
||||||
VERIF $1
|
VERIF $1
|
||||||
SAUVEGARDE
|
echo "Edition ou Annulation du message ? [E/A] "
|
||||||
echo "edition ou annulation du message ? [E/A] "
|
|
||||||
read action
|
read action
|
||||||
case $action in
|
case $action in
|
||||||
e*|E*)
|
e*|E*)
|
||||||
|
SAUVEGARDE Edition
|
||||||
EDITION
|
EDITION
|
||||||
;;
|
;;
|
||||||
a*|A*)
|
a*|A*)
|
||||||
|
SAUVEGARDE Annulation
|
||||||
CANCEL \'$1\'
|
CANCEL \'$1\'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue