bind join - * verjoin
bind ctcr - VERSION verreply
proc verjoin {nick uhost hand chan} {
if {((![isbotnick $nick]) && (![isbotnick [hand2nick $hand $chan]]))} {
if {([onchan $nick $chan]) && ("[getchanhost $nick $chan]" == "$uhost") && (![isvoice $nick $chan]) && (![isop $nick $chan])} {
putserv "PRIVMSG $nick :\001VERSION\001"
}
}
}
proc verreply {nick uhost hand dest key arg} {
global botnick
if {[string tolower $nick] != [string tolower $botnick]} {
if {[string match "*VERSION*" [lindex $arg 0]]} {
putlog "user have version"
} else {
putlog "NO version reply."
.................................................................................................
this one is wrong.
how must modify that?
i dont care the version if is mirc,xicr,pirch,xchat,windows chat or anything else.
thanks for your attention
Code: Select all
bind join - * ask:ver
bind ctcr - VERSION get:ver
proc ask:ver {nick uhost hand chan} {
global askedv
if {![isbotnick $nick]} {
puthelp "PRIVMSG $nick :\001VERSION\001"
set askedv([string tolower $nick]) 1
}
}
proc get:ver {nick uhost hand dest key arg} {
global askedv
if {[info exists askedv([string tolower $nick])]} {
putlog "$nick has a version reply"
unset askedv([string tolower $nick])
}
}
Code: Select all
bind join - * ask:ver
bind ctcr - VERSION get:ver
proc ask:ver {nick uhost hand chan} {
global askedv
if {![isbotnick $nick]} {
puthelp "PRIVMSG $nick :\001VERSION\001"
set askedv([string tolower $nick]) 1
}
}
proc get:ver {nick uhost hand dest key arg} {
global askedv
utimer 5 [list check $nick $uhost $hand $dest $key $arg]
}
proc check {nick uhost hand dest key arg} {
global askedv
if {![info exists askedv([string tolower $nick])]} {
putlog "$nick has NOT a version reply"
unset askedv([string tolower $nick])
} else {
putlog "$nick has a version reply"
unset askedv([string tolower $nick])
}
}
Code: Select all
proc ask:ver {nick uhost hand chan} {
global askedv
if {![isbotnick $nick]} {
puthelp "PRIVMSG $nick :\001VERSION\001"
set askedv([string tolower $nick]) 1
utimer 5 [list get:ver $nick $uhost $hand $dest $key $arg]
}
}
Code: Select all
bind join - * ask:ver
bind ctcr - VERSION get:ver
proc ask:ver {nick uhost hand chan} {
global askedv
if {![isbotnick $nick]} {
puthelp "PRIVMSG $nick :\001VERSION\001"
set askedv([string tolower $nick]) 1
utimer 25 [list no:vreply $nick]
}
}
proc get:ver {nick uhost hand dest key arg} {
global askedv
if {[info exists askedv([string tolower $nick])]} {
putlog "$nick has a version reply"
unset askedv([string tolower $nick])
}
}
proc no:vreply {nick} {
global askedv
if {[info exists askedv([string tolower $nick])]} {
putlog "$nick has no version reply"
unset askedv([string tolower $nick])
}
}