Jump to content

DiZuM

Members
  • Posts

    10
  • Joined

  • Last visited

DiZuM's Achievements

Member

Member (5/54)

0

Reputation

  1. Ok, I have just finished my !lookup script (You can run this one with Lil Toady's trace script!) what shows City & Country. That may be usefull, i dont know, but however it works I spent lot of my time to do it working, and it works now... Quite fast too. Ok, there it is: on *:SIGNAL:mta.command:{ var %a = $iif((!$4),$2,$iif($mta.getid($1,* $+ $4 $+ *),$v1,$2)) if ($3 == !lookup) do.lookup $1 %a } alias do.lookup { set %do.lookup $1 $2 if (!$sock(do.lookup $+ $mta.ip($1,$2))) sockopen do.lookup $+ $mta.ip($1,$2) api.hostip.info 80 } on *:SOCKOPEN:do.lookup*:{ tokenize 32 %do.lookup if ($sockerr > 0) { sockclose $sockname mta.text $1 Trace: An error has occured. } else { sockwrite -n $sockname GET /get_html.php?ip= $+ $mta.ip($1,$2) $+ &display=whois HTTP/1.1 sockwrite -n $sockname User-Agent: MSIE 6.0 sockwrite -n $sockname Host: api.hostip.info sockwrite $sockname $crlf } } on *:SOCKCLOSE:do.lookup*:{ unset %tr.* } on *:SOCKREAD:do.lookup*:{ var %t sockread %t if (Country isin %t) { tokenize 32 %do.lookup mta.text $1 $mta.nick($1,$2) 's Country: $gettok(%t,2-,58)} } elseif (City isin %t) { tokenize 32 %do.lookup mta.text $1 $mta.nick($1,$2) 's City: $gettok(%t,2-,58)} sockclose $sockname } } on *:SIGNAL:mta.command: { if ($3 == !sanzor) { mta.text $1 SanZoR pWnZ 24/7 !!! mta.pm $1 $2 Im sure you know that! } If you want, you can remove that !sanzor script, but i hope you not Btw, that database what this script use, is not very big. It wont shows everyone's City/Country alltime. Sometimes you got unknown city / country. But usually it shows them both right. Thats why i make it working with Lil Toadys !trace script, cause its better to show country. Well... I hope you like it - SanZoR a.k.a DiZuM
  2. First, That http://www.hostip.info/api/ works too. I try use all of them, and it just wont works. Btw, if you found some php, cgi, htm script somewhere, i can host it into my HTTP server, and host own IP lookup place. So, please give me link, if you found good one what shows city too.
  3. Ok, there it is: on *:SIGNAL:mta.command:{ var %a = $iif((!$4),$2,$iif($mta.getid($1,* $+ $4 $+ *),$v1,$2)) if ($3 == !trace) { if (%a == -1) mta.pm $1 $2 Error - Absent ID else my.trace $1 %a } } alias my.trace { set %my.trace $1 $2 if (!$sock(my.trace $+ $mta.ip($1,$2))) sockopen my.trace $+ $mta.ip($1,$2) www.hostip.info 80 } on *:SOCKOPEN:my.trace*:{ tokenize 32 %my.trace if ($sockerr > 0) { sockclose $sockname mta.text $1 Trace: An error has occured. (socket error) } else { sockwrite -n $sockname GET api/get_html.php?ip= $+ $mta.ip($1,$2) $+ &display=whois HTTP/1.1 sockwrite -n $sockname Host: www.hostip.info sockwrite -n $sockname Connection: keep-alive sockwrite $sockname $crlf } } on *:SOCKCLOSE:my.trace*:{ unset %my.trace tokenize 32 %my.trace mta.text $1 $mta.nick($1,$2) - Country: $gettok(%my.trace.r,1,32) $+ , City: $gettok(%my.trace.r,2,32) } on *:SOCKREAD:my.trace*:{ var %t sockread %t if (Country isin %t) { set %my.trace.r $iif(Unknown isin %t,Unknown,$gettok(%t,2-,32)) } elseif (City isin %t) { set %my.trace.r %my.trace.r $iif(Unknown isin %t,Unknown,$gettok(%t,2-,32)) sockclose $sockname } } What is problem? Everything looks good, but still wont works. If you know solution, post here working one. ty.
  4. on *:SIGNAL:mta.startrace:{ ;Parameters: ;$1 = Server ;$2 = Race ID ;$3 = 0/1/2 (success,failed,no players) var %a = !writeini -n " $+ $scriptdir $+ mta.stats.ini" times $calc(times+1),%b = $readini($scriptdir $+ mta.stats.ini,ALL,$ini($scriptdir $+ mta.stats.ini,ALL,%b))) if ($mta.race($1) == Unknown) mta.pm $1 $2 Error - Unknown Race else { mta.text $1 Current Map: $mta.race($1) mta.text $1 /me Moderated by: $readini($scriptdir $+ instructions.ini,MOD,$replace($mta.races($1,$2),$chr(32),)) } Not tested, but should works fine.
  5. ($findtok(name name name name name,$4,1,32)) {
  6. Ty so much i love you
  7. This works; http://api.hostip.info/get_html.php?ip=84.249.8.112 whit www. it wont works, i dont know why... But can you tell me solution how get it working? ty.
  8. Ok... This is what i wrote. I know what is wrong, so can u tell me what is missed socket? Ok this is it: I know this is wrong: Country: $gettok(%t,2-,58) - City: $gettok(%t,2-,58) so can u tell me what is right word there? Plz, help me =)
  9. Hey everyone; I try make own version about Lil Toady's trace script, and it wont works. If you found what is problem, please tell me solution! Ok, this is it; on *:SIGNAL:mta.command:{ var %a = $iif($4,$iif($mta.name($1,$4) != Unknown,$4,$mta.getid($1,$4)),$2) if ($3 == !trace) { if (%a == -1) mta.msg $1 $2 Error - Absent ID else my.trace $1 %a } } alias my.trace { set %my.trace $1 $2 if (!$sock(my.trace $+ $mta.ip($1,$2))) sockopen my.trace $+ $mta.ip($1,$2) www.dnsstuff.com 80 } on *:SOCKOPEN:my.trace*:{ tokenize 32 %my.trace if ($sockerr > 0) { sockclose $sockname mta.say $1 Trace: An error has occured. (socket error) } else { sockwrite -n $sockname GET tools/ptr.ch?ip= $+ $mta.ip($1,$2) $+ &display=whois HTTP/1.1 sockwrite -n $sockname User-Agent: MSIE 6.0 sockwrite -n $sockname Host: www.dnsstuff.com sockwrite $sockname $crlf } } on *:SOCKCLOSE:my.trace*:{ unset %my.trace } on *:SOCKREAD:my.trace*:{ var %t sockread %t if (country-rirdata isin %t) { tokenize 32 %my.trace mta.say $1 $+($mta.name($1,$2),$chr(40),$mta.ip($1,$2),$chr(41)) - Location: $gettok(%t,2-,58) sockclose $sockname } } I try make it found Location & City using dnsstuff. Look here: http://www.dnsstuff.com/tools/ptr.ch?ip=yourip example: http://www.dnsstuff.com/tools/ptr.ch?ip=80.186.127.15 Please, help me! ty.
×
×
  • Create New...