Revision: 8045 Author: filnik Date: 2010-04-01 09:43:55 +0000 (Thu, 01 Apr 2010)
Log Message: ----------- Bugfix: now the users with a badname are reported correctly also if they are more than one
Modified Paths: -------------- trunk/pywikipedia/welcome.py
Modified: trunk/pywikipedia/welcome.py =================================================================== --- trunk/pywikipedia/welcome.py 2010-03-29 11:03:07 UTC (rev 8044) +++ trunk/pywikipedia/welcome.py 2010-04-01 09:43:55 UTC (rev 8045) @@ -171,7 +171,7 @@ # (C) Alfio, 2005 # (C) Kyle/Orgullomoore, 2006-2007 # (C) Siebrand Mazeland, 2006-2007 -# (C) Filnik, 2007 +# (C) Filnik, 2007-2010 # (C) Daniel Herding, 2007 # (C) Alex Shih-Han Lin, 2009 # @@ -479,6 +479,7 @@ def __init__(self): #Initial self.site = wikipedia.getSite() + self.bname = dict()
self._totallyCount = 0 self.welcomed_users = list() @@ -564,14 +565,14 @@ if wname.lower() in str(name).lower(): name = name.lower().replace(wname.lower(), '') for bname in self._blacklist: - self.bname = bname + self.bname[name] = bname return bname.lower() in name.lower() except UnicodeEncodeError: pass try: for bname in self._blacklist: if bname.lower() in str(name).lower(): #bad name positive - self.bname = bname + self.bname[name] = bname return True except UnicodeEncodeError: pass @@ -618,7 +619,7 @@ # Adding the log. rep_text += wikipedia.translate(self.site, report_text) % username if self.site.lang == 'it': - rep_text = "%s%s}}" % (rep_text, self.bname) + rep_text = "%s%s}}" % (rep_text, self.bname[username])
com = wikipedia.translate(self.site, comment) if rep_text != '':
pywikipedia-svn@lists.wikimedia.org