mIRC Home    About    Download    Register    News    Help

Active Threads | Unanswered Past 24 hours | Past 48 hours | Past Week | Past Month | Past Year
Scripts & Popups Jump to new posts
Re: $longip() with IPV6 DooMaster 1 hour ago

What about this code? founded some examples in https://lite.ip2location.com/faqs

#include <arpa/inet.h>
#include <inttypes.h>

typedef unsigned __int128 uint128_t;

uint128_t Dot2LongIP(const char* ipv6) {
	struct sockaddr_in6 sa;
	inet_pton(AF_INET6, ipv6, &(sa.sin6_addr));
	uint128_t ipnum = 0;
	uint128_t octet = 0;
	int i;
	for (i = 0; i < (sizeof(sa.sin6_addr.s6_addr) / sizeof(sa.sin6_addr.s6_addr[0])); i++) {
		octet = ((uint128_t)sa.sin6_addr.s6_addr[i] << ((uint128_t)(15 - i) * 8));
		ipnum = ipnum + octet;
	return ipnum;
4 38 Read More
Scripts & Popups Jump to new posts
Re: Why I can't get this to work? colt45 2 hours ago
Ahhhhhh gotcha!! laugh
I'll be sure to make note of it for the future.
Many thanks
4 22 Read More
Connection Issues Jump to new posts
Re: SSL connection error tweek 11 hours ago
Thanks for looking into this for me. I have asked them several times about this but never get an answer. Guess I just wont worry about it there.
2 56 Read More