This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Help for those learning Tcl or writing their own scripts.
FcLan
Halfop
Posts: 64 Joined: Fri Sep 30, 2005 10:46 am
Location: Poland
Post
by FcLan » Wed Dec 21, 2005 4:02 pm
It`s a script which downloads some informations from user profile and if someone type !any_id for example !582 it will change address and read info for this profile, but this don`t works...
Code: Select all
bind pub - "% !*" checkid;
proc checkid {n u h c t} {
set id [string range $t 1 end];
if {[string is digit -stict $id]} {get_projects2 $c $id} {putcmdlog "$id isnt a valid id"}
}
set url "www.sensiblesoccer.de"
proc get_projects2 {channel id} {
global url
set sock [socket $url 80]
fconfigure $sock -buffering line -buffersize 1000
puts $sock "GET /index.php?site=online_segastatpers&uid=$id HTTP/1.0"
puts $sock "Host: www.sensiblesoccer.de"
puts $sock ""
puts $sock "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
flush $sock
while {![eof $sock]} {
gets $sock body
regexp -all {<td width="65%" class="medium">(.*?)</td><td} $body _ served
}
if {[eof $sock]} { close $sock }
regsub -all {(<.+?>)} $served "" served
puthelp "PRIVMSG $channel :[lindex $served]"
}
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Wed Dec 21, 2005 5:18 pm
For starters, -stict should be -strict .
FcLan
Halfop
Posts: 64 Joined: Fri Sep 30, 2005 10:46 am
Location: Poland
Post
by FcLan » Thu Dec 22, 2005 5:52 am
When i rehashs bot he goes from irc
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Thu Dec 22, 2005 5:59 pm
FcLan wrote: When i rehashs bot he goes from irc
The I would suggest you
READ the logs and figure out what caused it to "crash".
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM