mIRC Home    About    Download    Register    News    Help

Print Thread
#175707 27/04/07 11:46 AM
Joined: Apr 2007
Posts: 4
S
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Apr 2007
Posts: 4
I created an alias but if any of you know how to tweak it a little bit I'd appreciate it.
Here's the current alias:
Code:
viestit {
  $iif($1,return,timermsga 1 2 msg $chan !first msg) {
    $iif($1,return,timermsgb 1 8 msg $chan !second msg) {
      $iif($1,return,timermsgc 1 14 msg $chan !third msg)
    }
  }
}

When I do /viestit it sends the three messages above based on the timers.
What I want to do is have a date after the messages like this:
Code:
!first msg 27-4-2007
!second msg 27-4-2007
!third msg 27-4-2007

Basically, how could I get the date correct every day?
What about getting the previous date?
For example, let's say today is the 1st of June. When I do /viestit it would output:
Code:
!first msg 31-5-2007
!second msg 31-5-2007
!third msg 31-5-2007


Thanks in advance.



Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Today's date would be something like $asctime($ctime,d-m-yyyy)

To get yesterday's date: $asctime($calc($ctime -86400),d-m-yyyy)

Joined: Apr 2007
Posts: 4
S
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Apr 2007
Posts: 4
Sweet thanks a lot.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Keep in mind that timers evaluate identifiers when started, not when triggered. So the date won't change every day.

Example:
//timer 3 1 echo -a $time

The time won't change.

However, if you do it like this:
//timer 3 1 echo -a $!time

Then, it will change.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard