chiark / gitweb /
Improved CVS magic stuff - maybe it will build this time
[irc.git] / acrobat-chiark-0.2.py
index 851e5f49beb0a717382b4452a8952247ec5d3cbc..e258636eed6cfce43ea4b630fd134a62f1a9acf4 100755 (executable)
@@ -1,7 +1,10 @@
 #!/usr/bin/env python2
+# $Id$
 #
 # Joel Rosdahl <joel@rosdahl.net>
 # Andrew Walkingshaw <andrew@lexical.org.uk>
+# Peter Corbett <ptc24@cam.ac.uk>
+# Matthew Vernon <matthew@debian.org>
 # 
 # This file is part of Acrobat.
 #
 # by the Free Software Foundation; either version 2 of the License,
 # or (at your option) any later version.
 #
-# Foobar is distributed in the hope that it will be useful,
+# Acrobat is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with Foobar; if not, write to the Free Software
+# along with Acrobat; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 # USA.
 
@@ -30,7 +33,7 @@
               back with the url.
 """
 
-import string, urllib, sys, cPickle, os, random
+import string, urllib, sys, cPickle, os, random, re
 from ircbot import SingleServerIRCBot
 from irclib import nm_to_n, irc_lower
 
@@ -46,6 +49,10 @@ class Acrobat(SingleServerIRCBot):
                                     [(server, port)], nickname, nickname)
         self.channel = channel
         self.owner = owner
+        # version control magic
+        acrorevision="$Revision$"
+        acrorev1=re.sub(Revision$\([^$]*\)$,\1,acrorevision)
+        acrorev2=re.sub($\(.*\),\1,acrorev1)
         # load the karma db
         try:
             f = open("karmadump", "r")