lol, ok, different question, since i solved my last one, lets say i have this bot in two different channels, how could i make it ONLY talk in #chat, and not in #trivia?, is there a thing like mirc where if ( $chan == #chat )? if so let me know, and if not help me out please
set pubchan "#mychan"
proc PublicMSG {nick uhost hand chan rest} {
global botnick commandpath initfile pubchan
if {[string tolower $nick] == [string tolower $botnick]} {return 0}
elseif ($chan == $chan(one) {
regsub -all {\"} $rest {} rest
set f [open "|$commandpath -i $initfile -s name $nick -u $nick \"$rest\"" "r"]
putchan $pubchan $nick [gets $f]
while {[eof $f] != 1} { putchan $pubchan [gets $f] }
}
close $f
}
I didn't test the code for syntax or error, but using some basic structure rules in your procedures helps alot. If you haven't read this tclguide yet, you're missin out
Mark wrote:lol, ok, different question, since i solved my last one, lets say i have this bot in two different channels, how could i make it ONLY talk in #chat, and not in #trivia?, is there a thing like mirc where if ( $chan == #chat )? if so let me know, and if not help me out please
It can be:
if {([string equal -nocase "#chat" $chan])} { # do stuff }
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee) PS: Guys, I don't accept script helps or requests personally anymore.
==================================