hi,
How to make
if ($text = *.id) { echo x } else { echo z }; in tcl ?
everyting they do !whois domain.id go to first x and else goto z
thanks
Code: Select all
if {test} {
code if test is TRUE
} {
code if test is FALSE
}
Code: Select all
string match "*.id" $text
Code: Select all
if {[string match "*.id" $text]} {
...
} {
...
}
Code: Select all
if {[string match "*.id" $text]} {
puthelp "PRIVMSG #Somechannel :The string \"${text}\" matches!"
} {
putlog "The string \"${text}\" does not match the test!"
}
Code: Select all
bind pub !whois - pubWhois
proc pubWhois {nick host handle channel text} {
if {[string match "*.id" $text]} {
puthelp "PRIVMSG #Somechannel :The string \"${text}\" matches!"
} {
putlog "The string \"${text}\" does not match the test!"
}
}