]> git.pond.sub.org Git - empserver/blob - scripts/postresults
scripts: Use mailx rather than mail, and drop bogus -e
[empserver] / scripts / postresults
1 #!/bin/csh
2 #
3 # postresults - Steve McClure (ionica@empire.cx), 1998
4 #    Do an automated post to rec.games.empire of a game's power chart
5 #    and the last day's annoucements.
6 #
7 # To use, you need to create a visitor country in your game.  For example,
8 # use "News" and "reporter" for the country name/rep of a special country
9 # used to get the power chart and annos.
10 #
11 # Also, this file references a "visitor" account.  If you don't have one,
12 # you may want to take that line out.
13 #
14 # Note that this uses 'inews' to post.  It's also very crude.  But, it
15 # works great when used from a cronjob.
16 #
17 # You will also want to change the messages below to more accurately 
18 # reflect your game.
19 #
20 # Note this is the same script I used to post results for the Winterfest
21 # '98 Tourney.  I'm submitting it to wolfpack for inclusion with the
22 # server.
23
24 # Change the following variables depending on where your binaries/game
25 # is located
26 setenv INEWS      /usr/local/news/inews
27 setenv TMPDIR     /empire/ionica/Tourney
28 setenv TMPFILE    rd3game1.txt
29 setenv CLIENT     /usr/local/bin/empire
30 setenv EMPIREHOST 149.84.128.9
31 setenv EMPIREPORT 6641
32 setenv EMPCOUNTRY News
33 setenv EMPREP     reporter
34 setenv EMPTITLE   "Winterfest '98 Tourney Round 3, Game #1"
35 setenv DEITYMAIL  ionica@empire.net
36 #
37
38 cd $TMPDIR
39
40 echo '' > $TMPFILE
41 echo "This is the daily power chart and announcements for the" >> $TMPFILE
42 echo $EMPTITLE >> $TMPFILE
43 echo '' >> $TMPFILE
44 echo "This is the Final Round of the Winterfest '98 Tourney\!" >> $TMPFILE
45 echo '' >> $TMPFILE
46 echo "This game has a visitor account (Country 'visitor' Representative 'visitor')" >> $TMPFILE
47 echo "and can be found at host '$EMPIREHOST' and port '$EMPIREPORT'." >> $TMPFILE
48 echo '' >> $TMPFILE
49 echo "For more questions about this game, send e-mail to '$DEITYMAIL'" >> $TMPFILE
50 echo '' >> $TMPFILE
51 echo '------' >> $TMPFILE
52 echo '' >> $TMPFILE
53 $CLIENT $EMPCOUNTRY $EMPREP << EOF
54 pow new >> $TMPFILE
55 EOF
56 echo '' >> $TMPFILE
57 echo '------' >> $TMPFILE
58 echo '' >> $TMPFILE
59 $CLIENT $EMPCOUNTRY $EMPREP << EOF
60 wire 1 >> $TMPFILE
61 EOF
62 echo '' >> $TMPFILE
63 echo '------' >> $TMPFILE
64 echo '' >> $TMPFILE
65
66 $INEWS -t "$EMPTITLE" -n "rec.games.empire" -r "$DEITYMAIL" "$TMPFILE"