mIRC Homepage
Posted By: vexed2 on *:INPUT:#: { - 11/08/07 08:22 PM
Code:
on *:INPUT:#: {
  if ($left($1,1) != /) {
    haltdef
    var %input = $strip($1-,urc)
    raw -q privmsg $active : $+ %input
    set %time2 %time
    set %time $timestamp
    if (%time == %time2) { echo -i21 # $+(<,$me,>) %input }
    if (%time != %time2) { echo -i21 # $timestamp $+(<,$me,>) %input }
  }
}


Is there a way i can cut that down, so i don't have to have 2 echo lines, and just have 1?

cheers.
Posted By: schaefer31 Re: on *:INPUT:#: { - 11/08/07 08:31 PM
I'm not sure if this is what you mean, but you can combine the 2 if statements (and their respective commands) into a single $iif like so...

echo -i21 # $iif(%time == %time2,$timestamp) $+(<,$me,>) %input

If you want an explanation, see the help file.

/help $iif
© mIRC Discussion Forums