botlending forum  

Go Back   botlending forum > Eggdrop & TCL > Tcl scripting

Tcl scripting Tcl scripting related questions

Reply
 
LinkBack Thread Tools Display Modes
Old 19-09-2007, 20:09   #11 (permalink)
TCB & Ratings projects Member, #Mythic representative
 
arcade's Avatar
 
Join Date: Jun 2004
Location: In fatza calculatorului!!
Age: 19
Posts: 221
Rep Power: 37
arcade is on a distinguished road
Send a message via Yahoo to arcade
Default

scrie in dcc daca ai comanda .tcl activa: .tcl [source pathtoscript/csc.tcl]; set $errorInfo

si posteaza reply te rog. (La mine a mers de fiecare data)
__________________
Fuck oFF!
arcade is offline   Reply With Quote
Old 20-09-2007, 21:43   #12 (permalink)
#a&a representative
 
Erised's Avatar
 
Join Date: Jun 2004
Location: 127.0.0.1
Age: 20
Posts: 169
Rep Power: 0
Erised is an unknown quantity at this point
Send a message via MSN to Erised Send a message via Yahoo to Erised
Default

In timp ce ma uita pe net (egghelp.org) dupa alte diferite scripturi am downloadat un script ce avea separat un tcl numit http.tcl.
M-am uitat putin prin el si mi-am dat seama ca acela este cel ce face disponibil pachetul http, acela care voi (si csc.tcl de pe eggehelp.org) cereti in startul scriptului.
Zic ca aici cel mai mult a fost greseala voastra, nu numai ca ar fi trebuit sa postati si asemenea script, macar de puneati undeva langa aceea cerere ce si cum cereti si de unde poate fi luat.
Well, de ce aveam nevoie? Probabil pentru simplu fapt ca eu am windrop
Tcl-ul este mai jos. Cred ca e mai bine sa-l puneti inaintea lui csc.tcl, eu asa am, nu stiu si nici nu am incercat invers. Dar nu e o mare diferenta pentru user, asa ca puneti inainte

P.S.: Am ales sa folosesc tcl-ul de pe egghelp.org. Nu am incercat pe al tau arcade, dar am observat ca si tu ceri in tcl pachetul http. Deci acest post vrea sa fie mai mult un supliment, o corectura la al tau script
Attached Files
File Type: zip http.tcl.zip (7.1 KB, 39 views)
__________________
Best regards,
Erised

Last edited by Erised; 20-09-2007 at 21:45. Reason: Added P.S.
Erised is offline   Reply With Quote
Old 20-09-2007, 23:45   #13 (permalink)
Junior Member
 
Ionut's Avatar
 
Join Date: Aug 2006
Location: Craiova
Age: 22
Posts: 11
Rep Power: 0
Ionut is an unknown quantity at this point
Send a message via AIM to Ionut Send a message via MSN to Ionut Send a message via Yahoo to Ionut Send a message via Skype™ to Ionut
Default

http.tcl este in windrop trebuie doar incarcat
Code:
source lib/tcl8.4/http2.5/http.tcl
__________________
Quote:
Originally Posted by MyMiniCity.net
To improve Pelendava City, you only have to give the following links to your friends or post them in your blog. Each different click will improve PelendavaCity!
Ionut is offline   Reply With Quote
Old 20-09-2007, 23:59   #14 (permalink)
#a&a representative
 
Erised's Avatar
 
Join Date: Jun 2004
Location: 127.0.0.1
Age: 20
Posts: 169
Rep Power: 0
Erised is an unknown quantity at this point
Send a message via MSN to Erised Send a message via Yahoo to Erised
Default

Exact, dar nu toti stiu asta
Inteligent a fost acela care stia ca are nevoie de acel pachet in script lui si l-a pus acolo. Astfel l-am gasit si eu
__________________
Best regards,
Erised
Erised is offline   Reply With Quote
Old 22-09-2007, 14:14   #15 (permalink)
TCB & Ratings projects Member, #Mythic representative
 
arcade's Avatar
 
Join Date: Jun 2004
Location: In fatza calculatorului!!
Age: 19
Posts: 221
Rep Power: 37
arcade is on a distinguished road
Send a message via Yahoo to arcade
Default

nu am luat in calcul si varianta ca utilizatorul ar folosi windrop, al carui parser tcl nu are by default pachetul http, dar totusi scriptul verifica la loading daca pachetul http este incarcat, iar daca nu este, scriptul nu va fi incarcat.
__________________
Fuck oFF!
arcade is offline   Reply With Quote
Old 22-09-2007, 22:32   #16 (permalink)
#a&a representative
 
Erised's Avatar
 
Join Date: Jun 2004
Location: 127.0.0.1
Age: 20
Posts: 169
Rep Power: 0
Erised is an unknown quantity at this point
Send a message via MSN to Erised Send a message via Yahoo to Erised
Default

Ai fi putut macar pune o verificare, daca nu il incarca macar sa dea o eroare ceva, sa stie userul ce e wrong si de ce nu-l incarca. Asa va sta si se va uita la eggdrop si nimic nu se va intampla.
__________________
Best regards,
Erised
Erised is offline   Reply With Quote
Old 19-08-2008, 23:15   #17 (permalink)
Junior Member
 
Join Date: Aug 2008
Location: in Quebec canada.
Age: 23
Posts: 1
Rep Power: 0
xplorer is an unknown quantity at this point
Send a message via MSN to xplorer Send a message via Yahoo to xplorer
Default .csc tcl

This is a TCL used on a lot of help channel, its giving a really good info on the channel state.

Here is an exemple.

(15:27) <@[Michaud]> .csc #IRC-Freak
(15:27) <@IRC-Freak> | CService Application ||| #Canal: #IRC-Freak | Pending | Username: Em3r1c4 | Date: Jul 13 2008 04:21:13 CSST | Objecions: 0 | Coments: n/a | URL: CService |

install the script in the /scripts directory and add this line in eggdrop.conf

source scripts/FILENAME.tcl

then rehash your bot twice.

Code:
package require http
 
bind pub -|- .csc checkcsc
 
proc checkcsc {nick host hand chan arg} {
 
        set valchan [join [lindex [split $arg] 0]]
        if { $valchan == "" } { return 0 }
        set token [http::config -useragent "lynx"]
        set dachan [wt:filter $valchan]
        set token [http::geturl "http://194.109.147.174/live/check_app.php?name=$dachan"]
        set html [http::data $token]
 
  if {[string match "*No applications*" $html]} {
                puthelp "PRIVMSG $chan :$valchan: Is not in any kind of registration process, Try again."
        return 0
        }
 
        if {[string match "*DB is currently being maintained*" $html]} {
                puthelp "PRIVMSG $chan :$valchan: The CService Database in unavailable At The moment. Please Try again later."
        return 0
        }
 
        upvar #0 $token state
 
        foreach {name value} $state(meta) {
 
                if {[regexp -nocase ^location$ $name]} {
 
                        set regurl "http://cservice.undernet.org/live/$value"
                        set token [http::geturl $regurl]
                        set html [http::data $token]
                        set html [split $html "\n"]
                        set regobj 0
      set regcomment ""
                        foreach line $html {
                                 if {[string match "*by user :*" $line]} {
                                        regexp {(.*)<b>(.*)</b>(.*)} $line match blah reguser blah
                                 }
 
 
                                 if {[string match "*Posted on :*" $line]} {
                                        regexp {(.*)<b>(.*)</b>(.*)} $line match blah regdate blah
                                 }
 
                                if {[string match "*Current status :*" $line]} {
                             regexp {(.*)<b>(.*)</b>(.*)} $line match blah regstatus blah
          regsub -all {<[^>]*>} $regstatus {} regstatus
                                }
 
                                if {[string match "*Decision comment :*" $line]} {
            regexp {(.*)<b>(.*)</b>(.*)} $line match blah regcomment blah
          regsub -all {<[^>]*>} $regcomment {} regcomment2
                                }
 
                                if {[string match "*Comment :*" $line]} {
                                        incr regobj 1
                                }
                                if {![info exists regcomment2]} {
                                        set regcomment2 "n/a"
                                }
                        }
    }
        }
        set regstatus2 [string tolower $regstatus]
        if {$regstatus2 == "pending"} {
    set regstatus "\00312$regstatus"
        } elseif {$regstatus2 == "incoming"} {
          set regstatus "\00308$regstatus"
        } elseif {$regstatus2 == "rejeced"} {
    set regstatus "\00304$regstatus"
  } elseif {$regstatus2 == "accepted"} {
    set regstatus "\00309$regstatus"
        } elseif {$regstatus2 == "ready for review"} {
    set regstatus "\00306$regstatus"
        } elseif {$regstatus2 == "cancelled by the applicant"} {
    set regstatus "\00314$regstatus"
        }
 
      putserv "PRIVMSG $chan :\0031\002\00302|\0031\002 \0038\002CService Application\0031\002 \0031\002\00302|\0031\002\0031\002\00302|\0031\002\0031\002\00302|\0031\002 \0037\002#Canal:\0039\002 $valchan \0031\002\00302|\0031\002 \0034\002 \002$regstatus\002 \0031\002\00302|\0031\002 \0037\002Username:\0039\002 $reguser \0031\002\00302|\0031\002 \0037\002Date:\0034\002 $regdate \0031\002\00302|\0031\002 \0037\002Objecions:\0034\002 $regobj \0031\002\00302|\0031\002 \0037\002Coments:\0034\002 $regcomment2 \0031\002\00302|\0031\002 \0033\002URL:\00311\002 $regurl \0031\002\00302|\0031\002"
        return 0
}
 
proc wt:filter {x {y ""} } {
 
        for {set i 0} {$i < [string length $x]} {incr i} {
                switch -- [string index $x $i] {
                        "é" {append y "%E9"}
                        "è" {append y "%E8"}
                        "î" {append y "%CE"}
                        "É" {append y "%E9"}
                        "È" {append y "%E8"}
                        "Î" {append y "%CE"}
                        "&" {append y "%26"}
                        "#" {append y "%23"}
                        " " {append y "+"}
                        default {append y [string index $x $i]}
                }
        }
        return $y
}
 
 
#################################################################################
 
 
putlog "Check CService Channel Aplication check, Translated and colorified By Xplorer@Live.ca"
xplorer is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +3. The time now is 10:32.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.