mIRC Home    About    Download    Register    News    Help

Print Thread
#182610 11/08/07 08:22 PM
Joined: Mar 2007
Posts: 218
V
vexed2 Offline OP
Fjord artisan
OP Offline
Fjord artisan
V
Joined: Mar 2007
Posts: 218
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.

Last edited by vexed2; 11/08/07 08:30 PM.
vexed2 #182611 11/08/07 08:31 PM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
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


Link Copied to Clipboard