mIRC Home    About    Download    Register    News    Help

Print Thread
#140843 30/01/06 08:03 PM
Joined: Oct 2005
Posts: 75
C
Babel fish
OP Offline
Babel fish
C
Joined: Oct 2005
Posts: 75
this use to work before, but somehow it stopped working i don't know why, can anyone help?
Code:
On 187:text:$($me readlog*):#: {
  unset %playlog.cnt
  var %starting.position = 1
  var %starting.position = $4
  play -af $+ %starting.position playlog $chan $mircdirlogs\ $+ $3 900
}
alias playlog {
  inc %playlog.cnt
  msg $1-
  if (%playlog.cnt >= 20) { play stop | unset %playlog.cnt }
}


when i type MyBotNick readlog #logname.log <number of line to start from> it don't work but when i only type MyBotNick readlog #logname.log it works sometimes, sometimes don't

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
Quote:

Code:
On 187:text:$($me readlog*):#: {
  unset %playlog.cnt
  var %starting.position = 1
  var %starting.position = $4
  play -af $+ %starting.position playlog $chan $mircdirlogs\ $+ $3 900
}
alias playlog {
  inc %playlog.cnt
  msg $1-
  if (%playlog.cnt &gt;= 20) { play stop | unset %playlog.cnt }
}


I dont know why you had a value being put in %starting.position twice
my guess was you wanted a default value
":$($me readlog<space>*) I think you need that as a space unless the filename is directly appended to the text "readlog"

Code:
On 187:text:$($me readlog *):#: {
  unset %playlog.cnt
  var %starting.position = $4
  if (!%starting.position) { var %starting.position = 1 }
  play -af $+ %starting.position playlog $chan $mircdirlogs\ $+ $3 900
}

I dont know what this is, it isnt used in the rest of the code you posted, 
other than the var being unset
alias playlog {
  inc %playlog.cnt
  msg $1-
  if (%playlog.cnt &gt;= 20) { play stop | unset %playlog.cnt }

$logdir - Returns the Logs directory as specified in the Logging section of the Options dialog.


Link Copied to Clipboard