All pastes #905545 Raw Edit

Untitled

public text v1 · immutable
·published 2008-02-15 21:16 UTC
rendered paste body
## BINDS ##

bind join - "#CanalPrincipal" join:whois
bind raw - 319 checar:whois


## CONFIGS ##

set rivcanais "#testando #testando1"

## PROCS ##

proc join:whois {nick host hand chan} {
    putserv "WHOIS $nick"
}

proc checar:whois {from key arg} {
    global rivcanais
    set nick [lindex $arg 1]
    putlog "++ Verificando $nick"
    set canais [string range [lrange $arg 2 end] 1 end]
    putlog "++ Canais: $canais"
    foreach canal $rivcanais {
        putlog "++ Comparando $canal com $rivcanais (metodo string match)"
        if {[string match $canal $canais]} {
                putlog "++ Usuário encontrado em $canal"
                putserv "notice @#CanalPrincipal :(\037Wallops\037) $nick >> $canal"
        }
    }
}