chiark / gitweb /
Improved CVS magic stuff - maybe it will build this time
[irc.git] / acrobat-chiark-0.2.py
index a8b6cc8421ff93e2c5c1565c0609b49b39a3352b..e258636eed6cfce43ea4b630fd134a62f1a9acf4 100755 (executable)
@@ -33,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
 
@@ -49,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")