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 

Can`t understand why don`t works..

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
FcLan
Halfop


Joined: 30 Sep 2005
Posts: 64
Location: Poland

PostPosted: Wed Dec 21, 2005 4:02 pm    Post subject: Can`t understand why don`t works.. Reply with quote

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:
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]"

}
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Dec 21, 2005 5:18 pm    Post subject: Reply with quote

For starters, -stict should be -strict.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
FcLan
Halfop


Joined: 30 Sep 2005
Posts: 64
Location: Poland

PostPosted: Thu Dec 22, 2005 5:52 am    Post subject: Reply with quote

When i rehashs bot he goes from irc
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu Dec 22, 2005 5:59 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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