[TCL] Public Finger.tcl

Sabtu, 08 November 2014

[TCL] Public Finger.tcl

Iseng bikin puisi pendek :D puisi ini bila ditambahkan pada eggdrop bisa cek public finger user, default command nya .-!finger or just finger <nick> nanti kalau emang user set finger reply bakalan ada anu nya, hu uh itunya diliatin di channel... simpan...

# Name: finger.tcl
# Desc: This TCL will be FINGER user and pasted to public #chan
# Auth: goez (eggoez)
# Email: eg@goez.my.id
# Web: http://eg-goez.blogspot.com


set tekochan "NONE"
set targete "NONE"

bind pub - "-finger" proc:finger
bind pub - ".finger" proc:finger
bind pub - "finger" proc:finger
bind pub - "!finger" proc:finger

bind ctcr - FINGER ctcr:finger
bind notc - * notc:finger

putlog "loded finger.tcl"

proc proc:finger {nick uhost hand chan text} {
    global botnick tekochan targete
    if {[string tolower $nick] != [string tolower $botnick]} {
        set tekochan $chan
        set targete [lindex $text 0]
        putquick "PRIVMSG $targete :\001FINGER\001"
        return 1}}
proc notc:finger {nick uhost hand text {dest ""}} {
    global botnick tekochan targete 
    if {$dest == ""} { set dest $botnick }
    if {($tekochan != "NONE") && ($targete != "NONE")} {
        if {([string tolower $nick] == [string tolower $targete]) && ([string match "*finger*" [lindex [string tolower $text] 0]])} {
            putquick "PRIVMSG $tekochan :$nick FINGER :$arg "
            set tekochan "NONE"
            set targete "NONE"
            return 1
        }
    }
}
proc ctcr:finger {nick uhost hand dest key arg} {
    global botnick tekochan targete
    if {($tekochan == "NONE") || ($targete == "NONE")} {return 0}
    if {[string tolower $nick] != [string tolower $botnick]} {
        putquick "PRIVMSG $tekochan :$nick :  $arg "
        set tekochan "NONE"
        set targete "NONE"
        return 1
    }
}

putlog "g0eZ: Succes Loaded FINGER!"
Salam ;)

Tulisan yang banyak dilihat bulan ini