def find_ip(self, ip):
		users = []
		if ':' in ip: # IPv6 - needs to account for ::: vs 00, ambiguous notation
			return ['IPv6 not implemented']
		else: # IPv4
			ip = ip.split('.', 3)
			for user in self.accounts.values():
				user_ip = user.last_ip.split('.', 3)
				for i in xrange(len(ip)):
					if ip[i] != '*' and not ip[i] == user_ip[i]:
						break
				else:
					users.append(user)
		return users
dataset/ETHPy150Open lunixbochs/uberserver/tasserver/LegacyUsers.py/UsersHandler.find_ip/original