View Single Post
Old 02-08-2004, 12:28   #4 (permalink)
d0oM
Junior Member
 
Join Date: Aug 2004
Location: Planeta Moldova
Age: 22
Posts: 9
Rep Power: 0
d0oM is an unknown quantity at this point
Default

Quote:
Originally Posted by Kurupt
da am invatzat sa pun mai multe semne sau nici un semn acum explica mie cum sa fac sa asculte de nick la bot am incercat cu $botnick no restult alta idee nu am
nu kiar am inteles ce ai in vedere, adica sa reactioneze la comenzi conform nickname-ul botului?

eu folosesc:

if {![string compare -nocase "$botnick" [lindex [split $text] 0]]} {
set text "$cmd(prefix)[join [lrange [split $text] 1 end]]"
}

$cmd(prefix) - specifici smenul tau de conducere

poti folosi acest exemplu la event-ul bind pubm, un exemplu arata cam asa:

bind pubm - * my_pub

proc mypub {nick uhost hand chan text} { global botnick; variable conf

if {![string compare -nocase "=$botnick" [lindex [split $text] 0]]} {
set text "![join [lrange [split $text] 1 end]]"
}

__________________
empty
d0oM is offline   Reply With Quote