mIRC Home    About    Download    Register    News    Help

Print Thread
#44219 26/08/03 02:38 PM
Joined: Jan 2003
Posts: 4
W
WinZ Offline OP
Self-satisified door
OP Offline
Self-satisified door
W
Joined: Jan 2003
Posts: 4
Hi !

I need a good line that works with this request:

I want my IRC Client to look up a file called test.msg every 30th second and post the info on a channel called #test123 if something is beeing/has been added in the test.msg file.

If someone knows a great line that can fix this or can make such a line. Would be great. Good addons can also be accepted.

#44220 26/08/03 03:16 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Code:
on *:CONNECT: {
  .timertestmsg 0 30 /test.msg
}

on *:DISCONNECT: {
  .timertestmsg off
}

alias test.msg {
  ; ------- Edit Below
  var %filename = $shortfn([color:red]C:\path\to\filename\test.msg[/color]) | ; File name
  var %channel = [color:red]#mychan[/color]                                 | ; channel to print it to
  var %delay = [color:red]1[/color]                                         | ; delay per line
  ; ------- Edit Above

  var %d = 0,%l = 1
  while ($read($filename, %l)) {
    .timer 1 %d /msg %channel $ifmatch
    /inc %d %delay
    /inc %l
  }
}


Edit postiones between the ;---- dividers


-KingTomato
#44221 26/08/03 06:22 PM
Joined: May 2003
Posts: 161
A
Vogon poet
Offline
Vogon poet
A
Joined: May 2003
Posts: 161
That plays it regardless of whether it's changed since last time or not

#44222 26/08/03 08:23 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
add crc or $file .mtime check


Code:
//if ( khaled isgod ) echo yes | else echo no

Link Copied to Clipboard