mIRC Home    About    Download    Register    News    Help

Print Thread
Showing history in query #138584 03/01/06 10:00 AM
Joined: Jan 2006
Posts: 2
M
mch Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
M
Joined: Jan 2006
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.

Re: Showing history in query #138585 03/01/06 10:36 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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
    }
  }
}
 

Re: Showing history in query #138586 03/01/06 10:36 AM
Joined: Nov 2005
Posts: 24
K
kamicollo Offline
Ameglian cow
Offline
Ameglian cow
K
Joined: Nov 2005
Posts: 24
Code:
on *:open:?:*:loadbuf 10 $nick $+(",$logdir,$nick,.log,")


hopefully, it will work wink

Last edited by kamicollo; 03/01/06 10:38 AM.
Re: Showing history in query #138587 03/01/06 08:53 PM
Joined: Jan 2003
Posts: 56
E
Ecronika Offline
Babel fish
Offline
Babel fish
E
Joined: Jan 2003
Posts: 56
Why not use the "Reload Logs" Feature mIRC offers?

mIRC Options > IRC > Logging > Reload Logs


Ecronika
My mIRC Addons
Re: Showing history in query #138588 04/01/06 12:02 PM
Joined: Jan 2006
Posts: 2
M
mch Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
M
Joined: Jan 2006
Posts: 2
Probally because a random check box named "reload logs" isn't very intuitive =/