diff -urN MoinMoin/user.py b/MoinMoin/user.py --- a/MoinMoin/user.py 2008-07-14 21:11:24.000000000 +0200 +++ b/MoinMoin/user.py 2009-10-11 01:11:52.000000000 +0200 @@ -27,7 +27,9 @@ from MoinMoin import config, caching, wikiutil, i18n, events from MoinMoin.util import timefuncs, filesys, random_string from MoinMoin.wikiutil import url_quote_plus - +### HACK SAUVAGE 1/2 +import socket +### FIN HACK 1/2 def getUserList(request): """ Get a list of all (numerical) user IDs. @@ -1023,7 +1025,16 @@ if self.name: return self.wikiHomeLink() else: - return self.host() + ### HACK SAUVAGE 2/2 + # return self.host() + try: + hostname = socket.gethostbyaddr(self.host())[0] + except socket.herror: + hostname = self.host() + if (hostname+'.').split('.', 1)[1] in ['crans.org.', 'wifi.crans.org.']: + hostname = hostname.split('.',1)[0] + return hostname + ### FIN HACK 2/2 def generate_recovery_token(self): key = random_string(64, "abcdefghijklmnopqrstuvwxyz0123456789")