mIRC Home    About    Download    Register    News    Help

Topic Options
#138584 - 03/01/06 10:00 AM Showing history in query
mch Offline
Bowl of petunias

Registered: 03/01/06
Posts: 2
Like most people, I chat on IM apps like MSN or aim, and am used to having the recent history of a conversation showing up in IM windows so I know the context of the conversation/who I am talking to.

I talk alot to people in queries on IRC, and have started getting annoyed that I couldn't get the log history to show up in new queries.

So I started writing a little script to do it for me. I'm having some trouble getting it to work though.


Here's what I have:
Code:
on 1:OPEN:?:*:{
  var %fname = $logdir $+ $nick $+ .log
  //echo %fname

  if (isFile(%fname) == $true) {
    var %lns = $lines(%fname)
    var %cur = %lns - 5
    while ((%cur <= %lns) && (%cur != 0)) {
      //echo $read (%fname, %cur)
      %cur = %cur + 1
    }
  }
}


It doesn't seem to be working right now, so any ideas as to why not would be helpful.

This is my first time scripting with mIRC, but I have alot of C/C++/Java exp.

TIA.

Top
#138585 - 03/01/06 10:36 AM Re: Showing history in query
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
Give this a try...I would test it, but there's no one that I know online for me to test it with
Code:
 on *:open:?:{
  var %log = $+($logdir,$nick,.log)
  if $exists(%log) {
    var %lines = $lines(%log), %line = $iif($lines(%log) > 5,$calc($v1 - 5),1)
    while %line <= %lines {
      echo -gt $nick $read(%log,nt,%line)
      inc %line
    }
  }
}
 

Top
#138586 - 03/01/06 10:36 AM Re: Showing history in query
kamicollo Offline
Ameglian cow

Registered: 20/11/05
Posts: 24
Loc: Lithuania
Code:
on *:open:?:*:loadbuf 10 $nick $+(",$logdir,$nick,.log,")


hopefully, it will work wink


Edited by kamicollo (03/01/06 10:38 AM)

Top
#138587 - 03/01/06 08:53 PM Re: Showing history in query
Ecronika Offline
Babel fish

Registered: 03/01/03
Posts: 56
Why not use the "Reload Logs" Feature mIRC offers?

mIRC Options > IRC > Logging > Reload Logs
_________________________
Ecronika
My mIRC Addons

Top
#138588 - 04/01/06 12:02 PM Re: Showing history in query
mch Offline
Bowl of petunias

Registered: 03/01/06
Posts: 2
Probally because a random check box named "reload logs" isn't very intuitive =/

Top