All pastes #258 Raw Edit

fixed.

public text v1 · immutable
#258 ·published 2004-07-06 03:51 UTC
rendered paste body
bind join - * fa_add
bind part - * fa_del
bind sign - * fa_del

proc fa_put { host } {
  putcmdlog "allowing $host."
  set sockfd [open /home/tek/eggdrop/tmp/socket "WRONLY NONBLOCK"]
  puts $sockfd "a$host"
  close $sockfd
}

proc fa_add {unick uhost hand chan {msg ""}} {
        global nick

        if {$nick == $unick} {
                putcmdlog "flushing hosts."
                set sockfd [open /home/tek/eggdrop/tmp/socket "WRONLY NONBLOCK"]
                puts $sockfd "f"
                close $sockfd

                foreach nickname [chanlist $chan] {
                        set host [getchanhost $nickname $chan]
                        utimer "10" [list fa_put $host]
                }
        } else {
                putcmdlog "allowing $uhost."
                set sockfd [open /home/tek/eggdrop/tmp/socket "WRONLY NONBLOCK"]
                puts $sockfd "a$uhost"
                close $sockfd
        }
}

proc fa_del {unick uhost hand chan {msg ""}} {
        putcmdlog "disallowing $uhost."
        set sockfd [open /home/tek/eggdrop/tmp/socket "WRONLY NONBLOCK"]
        puts $sockfd "d$uhost"
        close $sockfd
}