def parseWebchatIP(hexip): """Parse webchat hex-format ip to decimal ip""" ip = [] for i in range(2,len(hexip)+2,2): try: dec = int(hexip[i-2:i], 16) except ValueError: return None ip.append(str(dec)) return ".".join(ip)