X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fbrisk.phh;h=f221518bd8d83a54ab7d267f59792cdf8a4e663a;hb=860fbd36c87a6da4a71ef5e42d661c555bb3b3d6;hp=6c18990b4c052e95fe16d8fca08f8d64fc6c6877;hpb=5f3e18722e863a3caa27ddcbb2380440da5d1d61;p=brisk.git diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 6c18990..f221518 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -345,6 +345,20 @@ $G_PG_cons_n = 345; /* printf("\n"); */ /* } */ +function ip2int($s) +{ + $v = ip2long($s); + if (PHP_INT_SIZE == 4) + return ($v); + + return ( ($v & 0x80000000 ? 0xffffffff00000000 : 0x00) | $v ); +} + +function int2ip($i) +{ + return long2ip($i & 0xffffffff); +} + function nickserv_msg($dt, $msg) { return sprintf('chatt_sub("%s",[0x040003,"%s"],"%s");', $dt, NICKSERV, $msg); }