#PBC Official Forum  #PBC Official Forum
Noi Iti Protejam Chanu De LAMERI
#PBC Official Forum
FAQFAQ  CautareCautare  InregistrareInregistrare  ProfilProfil  MembriMembri  GrupuriGrupuri  Mesaje privateMesaje private  AutentificareAutentificare 

whois.tcl

 
Raspunde la subiect    Pagina de start a forumului #PBC Official Forum -> TCL Scripts
Subiectul anterior :: Subiectul urmator  
Autor Mesaj
TrAsNeT
Junior 2
Junior 2
TrAsNeT

Data inscrierii: 12/Mai/2008
Mesaje: 44
Localitate: Sighet

MesajTrimis: 14/05/2008 00:08    Titlul subiectului: whois.tcl Raspunde cu citat (quote)

# Config:
# What is the minimum access someone needs to perform a who with the bot?
# o = global op, m = global master, n = global owner
# |o = channel op, |m = channel master, |n = channel owner
set who(acc) "o"
# End of Config

bind pub $who(acc) "!who" who:nick

proc who:nick { nickname hostname handle channel arguments } {
global who
set target [lindex [split $arguments] 0]
if {$target == ""} {
putquick "PRIVMSG $channel :Please choose a target first."
return 0
}
putquick "WHOIS $target $target"
set ::whochannel $channel
set ::whotarget $target
bind RAW - 401 who:nosuch
bind RAW - 311 who:info
bind RAW - 319 who:channels
bind RAW - 301 who:away
bind RAW - 313 who:ircop
bind RAW - 330 who:auth
bind RAW - 317 who:idle
}

proc who:putmsg { channel arguments } {
putquick "PRIVMSG $channel :$arguments"
}

proc who:info { from keyword arguments } {
set channel $::whochannel
set nickname [lindex [split $arguments] 1]
set ident [lindex [split $arguments] 2]
set host [lindex [split $arguments] 3]
set realname [string range [join [lrange $arguments 5 end]] 1 end]
who:putmsg $channel "$nickname - $ident@$host * $realname"
unbind RAW - 311 who:info
}

proc who:ircop { from keyword arguments } {
set channel $::whochannel
set target $::whotarget
who:putmsg $channel "$target is an IRC Operator"
unbind RAW - 313 who:ircop
}

proc who:away { from keyword arguments } {
set channel $::whochannel
set target $::whotarget
set awaymessage [string range [join [lrange $arguments 2 end]] 1 end]
who:putmsg $channel "$target is away: $awaymessage"
unbind RAW - 301 who:away
}

proc who:channels { from keyword arguments } {
set channel $::whochannel
set channels [string range [join [lrange $arguments 2 end]] 1 end]
set target $::whotarget
who:putmsg $channel "$target on $channels"
unbind RAW - 319 who:channels
}

proc who:auth { from keyword arguments } {
set channel $::whochannel
set target $::whotarget
set authname [lindex [split $arguments] 2]
who:putmsg $channel "$target is authed as $authname"
unbind RAW - 330 who:auth
}

proc who:nosuch { from keyword arguments } {
set channel $::whochannel
set target $::whotarget
who:putmsg $channel """
unbind RAW - 401 who:nosuch
}

proc who:idle { from keyword arguments } {
set channel $::whochannel
set target $::whotarget
set idletime [lindex [split $arguments] 2]
set signon [lindex [split $arguments] 3]
who:putmsg $channel "$target has been idle for [duration $idletime]. signon time [ctime $signon]"
unbind RAW - 317 who:idle
}
Sus
Vezi profilul utilizatorului Trimite mesaj privat
Afiseaza mesajele pentru a le previzualiza:   
Raspunde la subiect    Pagina de start a forumului #PBC Official Forum -> TCL Scripts Ora este GMT + 2 ore
Pagina 1 din 1

 
Mergi direct la:  
Nu puteti crea un subiect nou in acest forum
Nu puteti raspunde in subiectele acestui forum
Nu puteti modifica mesajele proprii din acest forum
Nu puteti sterge mesajele proprii din acest forum
Nu puteti vota in chestionarele din acest forum
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro