egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

error

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
pilouuu
Halfop


Joined: 26 Dec 2005
Posts: 82

PostPosted: Tue Jan 24, 2006 12:47 pm    Post subject: error Reply with quote

Hi all and thx for help

tcl:

Code:
#
# gametiger.tcl par Ibu <ibu_lordaeron@yahoo.fr>
#

#
# ATTENTION !!  CE TCL REQUIERT HTTP.TCL
#



#################
# Configuration #
#################

# aucun



########
# Motd #
########

putlog "\002gametiger.tcl\002 par \002Ibu\002 14<ibu_lordaeron@yahoo.fr>"
putlog "   Tapez: .game ou !game (channel)"



################################
# Vérifier une ip sur un salon #
################################

bind pub - !game gametiger:pub:testip

proc gametiger:pub:testip { nick uhost handle channel arg } {
    global encorebis

    set encore [unixtime]
    if {[info exists encorebis]} {
        set trop [expr $encore - $encorebis]
        if { $trop < 5 } {
            putserv "PRIVMSG $channel :Désolé $nick, une demande d'IP toutes les 5 secondes"
            return 0
        } else {
            set encorebis $encore
        }
    } else {
        set encorebis $encore
    }

    set AddrIp [lindex $arg 0]

    if { $AddrIp == "" } {
        putserv "PRIVMSG $channel :Commande : \002!game\002 <ip>"
        return 0
    }

    set token [http::geturl http://www.gametiger.net/search?address=$AddrIp]
    set fv [open system/testip.txt w+]
    puts $fv [http::data $token]
    close $fv
    http::Finish $token

    set LectureFichierAcces "system/testip.txt"
    if { [file exists $LectureFichierAcces] == 0 } {
        set LectureTemp [open $LectureFichierAcces w+]
        close $LectureTemp
    }

    set LectureTemp "[open $LectureFichierAcces r]"
    while {![eof $LectureTemp]} {
        set LectureTexteLu [nojoinhtml [gets $LectureTemp]]

        if { [string match "*Server&nbsp;Name*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 340 end]"
            set gt(server) "[join [gettext $i "><b>" "&nbsp;</b></td></tr>"]]"
        } elseif { [string match "*<b>Status<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 180 end]"
            set gt(status) "[join [gettext $i "\">" "</td></tr>"]]"
        } elseif { [string match "*<b>IP:Port<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 90 end]"
            set gt(ip) "[join [gettext $i "\">" "</td></tr>"]]"
        } elseif { [string match "*>Engine</td>*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 100 end]"
            set gt(engine) "[join [gettext $i "\">" "</td></tr>"]]"
        } elseif { [string match "*<b>Game<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 100 end]"
            set gt(game) "[join [gettext $i "\">" "&nbsp;</td></tr>"]]"
        } elseif { [string match "*<b>Map<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 100 end]"
            set gt(map) "[join [gettext $i "\">" "&nbsp;</td></tr>"]]"
        } elseif { [string match "*<b>Last&nbsp;Map&nbsp;Change<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 130 end]"
            set gt(lastmapchange) "[join [gettext $i "\">" "&nbsp;ago</td></tr>"]] ago"
        } elseif { [string match "*<b>Protocol&nbsp;Version<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 130 end]"
            set gt(protocol) "[join [gettext $i "\">" "</td></tr>"]]"
        } elseif { [string match "*<b>Type&nbsp;of&nbsp;Server<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 130 end]"
            set gt(type) "[join [gettext $i "\">" "</td></tr>"]]"
        } elseif { [string match "*<b>OS<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 110 end]"
            set gt(os) "[join [gettext $i "\">" "</td></tr>"]]"
        } elseif { [string match "*<b>Password&nbsp;required<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 130 end]"
            set gt(password) "[join [gettext $i "\">" "</td></tr>"]]"
        } elseif { [string match "*<b>Active*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 240 end]"
            set gt(players) "[join [gettext $i "\">" "</td></tr>"]]"

            set i [string first "/" $gt(players)]
            set i1 [string range $gt(players) 0 [expr $i-1]]
            set i2 [string range $gt(players) [expr $i+1] end]

            if { $i1 == $i2 } {
                set gt(players) "4$i1/$i2 (FULL)"
            } else {
                set gt(players) "3$i1/$i2"
            }
        } elseif { [string match "*<b>Last&nbsp;Check<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 130 end]"
            set gt(lastcheck) "[join [gettext $i "\">" "&nbsp;ago</td></tr>"]] ago"
        } elseif { [string match "*<b>Bogo&nbsp;Ping<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 120 end]"
            set gt(ping) "[join [gettext $i "\">" "</td></tr>"]]"
        }

    }
    close $LectureTemp
    if { [info exist gt(ip)] } {
        putserv "PRIVMSG $channel :\[ Server Name: 7$gt(server) \] \[ OS: $gt(os) \] \[ Type Server: $gt(type) \]  \[ IP: 10$gt(ip) \] \[ Password Required: $gt(password) \] \[ Engine: $gt(engine) \] \[ Game: $gt(game) \] \[ Bogo Ping: $gt(ping) \] \[ Map: 5$gt(map) ($gt(lastmapchange)) \] \[ Players: $gt(players) (last check $gt(lastcheck)) \]"
    } else {
        putserv "PRIVMSG $channel :Ce serveur n'est pas enregistré par www.GameTiger.Net"
    }
    unset LectureTexteLu

    return 0
}



################################
# Vérifier une ip en partyline #
################################

bind dcc - game gametiger:dcc:testip

proc gametiger:dcc:testip { hand idx arg } {

    global encorebis

    set encore [unixtime]
    if {[info exists encorebis]} {
        set trop [expr $encore - $encorebis]
        if { $trop < 5 } {
            putdcc $idx "Désolé $hand, une demande d'IP toutes les 5 secondes"
            return 0
        } else {
            set encorebis $encore
        }
    } else {
        set encorebis $encore
    }

    set AddrIp [lindex $arg 0]

    if { $AddrIp == "" } {
        putdcc $idx "Commande : \002.ip\002 <ip>"
        return 0
    }

    set token [http::geturl http://www.gametiger.net/search?address=$AddrIp]
    set fv [open system/testip.txt w+]
    puts $fv [http::data $token]
    close $fv
    http::Finish $token

    set LectureFichierAcces "system/testip.txt"
    if { [file exists $LectureFichierAcces] == 0 } {
        set LectureTemp [open $LectureFichierAcces w+]
        close $LectureTemp
    }

    set LectureTemp "[open $LectureFichierAcces r]"
    while {![eof $LectureTemp]} {
        set LectureTexteLu [nojoinhtml [gets $LectureTemp]]

        if { [string match "*Server&nbsp;Name*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 340 end]"
            set gt(server) "[join [gettext $i "><b>" "&nbsp;</b></td></tr>"]]"
        } elseif { [string match "*<b>Status<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 180 end]"
            set gt(status) "[join [gettext $i "\">" "</td></tr>"]]"
        } elseif { [string match "*<b>IP:Port<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 90 end]"
            set gt(ip) "[join [gettext $i "\">" "</td></tr>"]]"
        } elseif { [string match "*>Engine</td>*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 100 end]"
            set gt(engine) "[join [gettext $i "\">" "</td></tr>"]]"
        } elseif { [string match "*<b>Game<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 100 end]"
            set gt(game) "[join [gettext $i "\">" "&nbsp;</td></tr>"]]"
        } elseif { [string match "*<b>Map<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 100 end]"
            set gt(map) "[join [gettext $i "\">" "&nbsp;</td></tr>"]]"
        } elseif { [string match "*<b>Last&nbsp;Map&nbsp;Change<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 130 end]"
            set gt(lastmapchange) "[join [gettext $i "\">" "&nbsp;ago</td></tr>"]] ago"
        } elseif { [string match "*<b>Protocol&nbsp;Version<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 130 end]"
            set gt(protocol) "[join [gettext $i "\">" "</td></tr>"]]"
        } elseif { [string match "*<b>Type&nbsp;of&nbsp;Server<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 130 end]"
            set gt(type) "[join [gettext $i "\">" "</td></tr>"]]"
        } elseif { [string match "*<b>OS<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 110 end]"
            set gt(os) "[join [gettext $i "\">" "</td></tr>"]]"
        } elseif { [string match "*<b>Password&nbsp;required<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 130 end]"
            set gt(password) "[join [gettext $i "\">" "</td></tr>"]]"
        } elseif { [string match "*<b>Active*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 240 end]"
            set gt(players) "[join [gettext $i "\">" "</td></tr>"]]"

            set i [string first "/" $gt(players)]
            set i1 [string range $gt(players) 0 [expr $i-1]]
            set i2 [string range $gt(players) [expr $i+1] end]

            if { $i1 == $i2 } {
                set gt(players) "4$i1/$i2 (FULL)"
            } else {
                set gt(players) "3$i1/$i2"
            }
        } elseif { [string match "*<b>Last&nbsp;Check<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 130 end]"
            set gt(lastcheck) "[join [gettext $i "\">" "&nbsp;ago</td></tr>"]] ago"
        } elseif { [string match "*<b>Bogo&nbsp;Ping<*" "$LectureTexteLu"] } {
            set i [string range "$LectureTexteLu" 120 end]"
            set gt(ping) "[join [gettext $i "\">" "</td></tr>"]]"
        }

    }
    close $LectureTemp
    if { [info exist gt(ip)] } {
        putlog " "
        putlog "Server Name: 7$gt(server)     OS: $gt(os)     Type Server: $gt(type)"
        putlog "IP: 10$gt(ip)     Password Required: $gt(password)"
        putlog "Engine: $gt(engine)     Game: $gt(game)     Bogo Ping: $gt(ping)"
        putlog "Map: 5$gt(map) ($gt(lastmapchange))     Players: $gt(players) (last check $gt(lastcheck))"
        putlog " "
    } else {
        putlog " "
        putlog "Ce serveur n'est pas enregistré par www.GameTiger.Net"
        putlog " "
    }
    unset LectureTexteLu

    return 1
}



#################
# commmande !sith #
#################

bind pub - !sith gametiger:pub:sith

proc gametiger:pub:sith { nick uhost handle channel arg } {
  gametiger:pub:testip $nick $uhost $handle $channel 62.212.74.121:27135
}



##############
# sous-procs #
##############

proc gettext { data start end } {
    set index0 [string first $start $data]
    set index1 [expr $index0 + [string length $start]]
    set index2 [string first $end $data]
    set index2 [expr $index2 - 1]
    set index  [expr $index2 + [string length $end]]

    return [string range $data $index1 $index2]
}

proc nojoinhtml { text } {
  regsub -all -- {\\} $text {\\\\} text
  regsub -all -- {\{} $text {\{} text
  regsub -all -- {\}} $text {\}} text
  regsub -all -- {\[} $text {\[} text
  regsub -all -- {\]} $text {\]} text
  regsub -all -- {\"} $text {\"} text
  return "$text"
}



Error:

!game 213.251.146.23:27015

the bot say:

[ Server Name: ] [ OS: ] [ Type Server: ] [ IP: ] [ Password Required: ] [ Engine: ] [ Game: ] [ Bogo Ping: ] [ Map: ( ago) ] [ Players: / (FULL) (last check ago) ]

Not info o_O. The testip.txt is good

Quote:
<html>
<head>
<title>Gametiger Address Search : 213.251.146.23:27015</title>
<meta name="pragma" content="no-cache">
<meta name="robots" content="NOARCHIVE">
<link rel='stylesheet' type='text/css' href='gametiger.css'>
</head>
<body onload="if(parent.frames.length!=0)top.location='http://www.gametiger.net/index.html'; ">
<center>
<p>
<!-- *********** advert *********** -->
<a href="http://griffinrun.com/cgi-bin/refer?id=hierle&h=fullregister.shtml" target=_blank><img src="http://griffinrun.com/affiliates/buttons/gt_deal.gif" border=0></a><br>
<font size=-2>$39 server special at GriffinRUN for GameTiger visitors
Get a 12 player private, low ping Counter-Strike game server for only $39 / month, <br>
for every month for the lifetime of your account with them. Just order on
their site and use the coupon code: fullregister ... For more info go to: <br>
<a href="http://griffinrun.com/cgi-bin/refer?id=hierle&h=fullregister.shtml">http://griffinrun.com/</a></font>
<!-- *********** /advert *********** -->
<br><br><br>
<!-- *********** advert *********** -->
<script> win=window.open("http://advnt03.com/popsend.asp?id=33214",'PoP',',left=5000,top=0,width=590,height=380,scrollbars=1,resizable=1,status=1,menubar=0'); window.focus(); </script>
<!-- *********** /advert *********** -->
<br><br>
<table><tr class="dark"><td colspan=2><center><font color=ffffff><b>Server&nbsp;Details</td></tr><tr><td bgcolor=ccccdd><b>Server&nbsp;Name</td><td><font color=666666><b>FR - NitroServ.com - [#Jet-7]&nbsp;</b></td></tr>
<tr><td bgcolor=ccccdd><b>Status</td><td><img src=/images/up.gif border=0 width=15 height=15 align=left valign=bottom>up</td></tr>
<tr><td bgcolor=ccccdd><b>IP:Port</td><td>213.251.146.23:27015</td></tr>
<tr><td bgcolor=ccccdd><b>Engine</td><td>Half-Life&nbsp;1.6&nbsp;</td></tr>
<tr><td bgcolor=ccccdd><b>Game</td><td>cstrike&nbsp;</td></tr>
<tr><td bgcolor=ccccdd><b>Map</td><td>de_dust2&nbsp;</td></tr>
<tr><td bgcolor=ccccdd><b>Last&nbsp;Map&nbsp;Change</td><td>00:03:51&nbsp;ago</td></tr>
<tr><td bgcolor=ccccdd><b>Protocol&nbsp;Version</td><td>47</td></tr>
<tr><td bgcolor=ccccdd><b>Type&nbsp;of&nbsp;Server</td><td>dedicated</td></tr>
<tr><td bgcolor=ccccdd><b>OS</td><td>Linux</td></tr>
<tr><td bgcolor=ccccdd><b>Password&nbsp;required</td><td>yes</td></tr>
<tr><td bgcolor=ccccdd><b>Active/Max&nbsp;Players&nbsp;&nbsp;</td><td><img src=/images/up.gif border=0 width=15 height=15 align=left valign=bottom>0/12</td></tr>
<tr><td bgcolor=ccccdd><b>Last&nbsp;Check</td><td>00:00:26&nbsp;ago</td></tr>
<tr><td bgcolor=ccccdd><b>Bogo&nbsp;Ping</td><td>10</td></tr>
</table><br>
<font size=+1><b><a href="/connect?address=213.251.146.23:27015&game=cstrike">connect&nbsp;now!</a></b>
<br>
<br>
<table><tr class="dark"><td align=right><font color=eeeeee><b>&nbsp;ID&nbsp;</td><td><font color=eeeeee><b>&nbsp;Player&nbsp;Name&nbsp;</b></td><td align=right><font color=eeeeee><b>&nbsp;Frags&nbsp;</td><td align=right><font color=eeeeee><b>&nbsp;In&nbsp;Game&nbsp;</b></td></tr>

</table>
<p>
<!-- ************** address search form ************** -->
<table class="dark"><tbody><tr class="dark">
<form method="GET" action="/search" name="f">
<td><b>&nbsp;Address&nbsp;Search&nbsp;&nbsp;</b></td>

<td align=center><input type="text" name="address" size=25 value="213.251.146.23:27015"></td>
<td>&nbsp;</td>
<td align=center><input type="submit" value=" search " border=0></td>
<td align=center>&nbsp;&nbsp;in&nbsp;<select name="game"><option selected value="all">all Games</option><option value=cstrike>Counter Strike</option><option value=h2>CS:Source (HL2)</option><option value=tfc>Team Fortress</option><option value=dod>Day of Defeat</option><option value=q3>Quake3</option><option value=bf>Bfield1942</option><option value=u3>UT2003</option><option value=u4>UT2004</option></select></td>
<td align=center><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;<a href="/search?address=">address</a>&nbsp;|
&nbsp;<a href="/search?map=">map</a>&nbsp;|
&nbsp;<a href="/search?mod=">mod</a>&nbsp;|
&nbsp;<a href="/search?player=">player</a>&nbsp;|
&nbsp;<a href="/search?server=">server</a>&nbsp;
</td>
</tr>
</form>
</table>
<!-- ************** /address search form ************** -->
<p>

<p>
<img src="http://www.gametiger.de/" width=1 height=1>
<img src="http://www.gametiger.net/images/c.gif" width=1 height=1>
</body>
</html>



thx
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3659
Location: Mint Factory

PostPosted: Tue Jan 24, 2006 1:22 pm    Post subject: Reply with quote

Have you first (before posting) attempted to contact the author and telling him/her about this? As far as I know people on this forum tend not to debug other people scripts but maybe you will be lucky. Smile
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
pilouuu
Halfop


Joined: 26 Dec 2005
Posts: 82

PostPosted: Tue Jan 24, 2006 2:11 pm    Post subject: Reply with quote

:] espere that I would have chance then because the author does not answer. The staff in egghelp is very good
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber