How can I use on text $date on mirc?
I am trying to do something like this.
on *:text:$(* %date *):#: {
var %date = $date(yy-mm-dd)
if ($nick == user) {
do something
}
}
You can encapsulate the text to listen to in $()
to evaluate it before matching it to the incoming message:
on *:TEXT:$($date(yy-mm-dd)):#:{
msg $chan That's today!
}
i recommend this
on *:text:$($iif($+(*,$date(yy-mm-dd),*) iswm $strip($1-),$1-)):#:{
if ($nick == user) { do something }
}
the on text will strip the color codes at $1- and return all the text colors stripped. by the way, it will match the date at any position of the line, not just at the beginning