Hey guys... i know this is a old topic but i got a question.
I tried to edit the trace script from sanzor, so just level 3 (or higher) admins can use it.
Also all messages are shown in a pm now. But i got a problem (i use a PRS.EDIT so i tried it with $prs.level... but now if you type !trace you just can see this message: mta.pm $1 $2 Tracing $mta.nick($1,%a) $+ , please wait...
Here is my "edit"
on *:SIGNAL:mta.connect: {
!.timer 1 2 mta.text $1 Sanzor´s (edited) !trace script connected
}
alias gusms.getid {
var %id = 0
while (%id < 32) {
if ($+(*,$2,*) iswm $mta.nick($1,%id)) !return %id
!inc %id
}
}
on *:SIGNAL:mta.command: {
if ($3 == !info) mta.text $1 SanZoR's (edited) !trace script V1.0
elseif ($3 == !trace) || ($3 == !lookup) || ($3 == !location) {
if ($prs.level($1,$2) >= 3) {
var %a = $iif((!$4),$2,$iif(($gusms.getid($1,$4) == $null),$2,$v1))
mta.pm $1 $2 Tracing $mta.nick($1,%a) $+ , please wait...
gusms.trace $1 %a
}
}
}
alias gusms.trace {
set %gusms.trace $1 $2
if (!$sock(gusms.trace $+ $mta.ip($1,$2))) sockopen gusms.trace $+ $mta.ip($1,$2) 2ip.ru 80
}
on *:SOCKOPEN:gusms.trace*:{
tokenize 32 %gusms.trace
if ($sockerr > 0) {
sockclose $sockname
mta.pm $1 $2 Trace: An error has occured.
}
else {
sockwrite -n $sockname GET /geoip/?ip= $+ $mta.ip($1,$2) HTTP/1.1
sockwrite -n $sockname User-Agent: MSIE 6.0
sockwrite -n $sockname Host: 2ip.ru
sockwrite $sockname $crlf
}
}
on *:SOCKCLOSE:gusms.trace*:{
unset %tr.*
}
on *:SOCKREAD:gusms.trace*:{
var %t
sockread %t
if (%go) {
unset %go
tokenize 32 %gusms.trace
mta.pm $1 $2 $mta.nick($1,$2) $+ 's Location: $gettok(%t,2-,32)
sockclose $sockname
}
if ([url=http://2ip.ru/flags/]http://2ip.ru/flags/[/url] isin %t) {
set %go 1
}
}
I hope somebody can help me!
It also would be cool if there is a cmd like !gtrace so its a $mta.text and all players can see it
Gr. Flemm