mIRC Home    About    Download    Register    News    Help

Print Thread
#139195 12/01/06 05:59 AM
Joined: Feb 2005
Posts: 4
S
saulob Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Feb 2005
Posts: 4
hello,
is there any command, or method to check if there´s an old log created for the user i'm talking on a private ?

like my me (saulob) open one private window with (benigno)
and i type something like /checklog and it will tell me if i already talked with that nick.. something like this

i just tought about the log files, they are created automatic for each user, so... i can check if theres one already (i always open the options, log, and view logs to check it)

thanks laugh

Edit: ahahhaahahha, .. really.. it´s true! .. shocked
okokok, so how can i check if i talked with that nick or not before ? ... any script thing ?

- thanks.

Last edited by saulob; 12/01/06 06:29 AM.
#139196 12/01/06 06:18 AM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
Edit: Actually, I just realized the file check is going to be true everytime.

#139197 12/01/06 06:35 AM
Joined: Feb 2005
Posts: 4
S
saulob Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Feb 2005
Posts: 4
humm maybe something that can show the creation date of a file...

any command ? wink

#139198 12/01/06 06:39 AM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
This should work.

Code:
on 1:OPEN:?:*:{
  var %nick = $replace($nick,$chr(124),$chr(95),$chr(92),$chr(95))
  var %ctime = $calc($ctime - $file($+($logdir,%nick,.,$network,.log)).ctime)
  echo -a $iif(%ctime < 5,Log created for $nick,Log exists for $nick)
}

#139199 12/01/06 06:40 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
$file(filename).ctime

/help $file

#139200 12/01/06 07:15 AM
Joined: Feb 2005
Posts: 4
S
saulob Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Feb 2005
Posts: 4
schaefer31 thanks, perfect.

.. but its not the user that opens the window.. it´s me..
so.. what i use.. instead of OPEN ?

thank you smile

#139201 12/01/06 08:02 AM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
I don't think there's a way to detect if you opened the window. Mainly because if you opened it manually, then you know you did it. So the event is unnecessary. Someone correct me if I'm wrong.

I think you will have to change the on open event to an alias and manually check when you open the window.

Code:
alias cl {
  var %nick = $replace($active,$chr(124),$chr(95),$chr(92),$chr(95))
  var %ctime = $calc($ctime - $file($+($logdir,%nick,.,$network,.log)).ctime)
  echo -a $iif(%ctime < 5,Log created for $active, Log exists for $active)
}


To use, open a query window and type /cl

Since you must do this manually, you have to issue the command within about 4 seconds of opening the window if you want it to say the file was created (only if it didn't already exist). Otherwise it will say it already exists if 5 seconds have elapsed.

#139202 12/01/06 08:07 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
From the help file
Quote:
on 1:OPEN:?:*:/echo -s Just opened $target query window

The above example triggers just after a query window is opened.


#139203 12/01/06 08:08 AM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
That doesn't do anything if you manually open a query window. It will only trigger if someone queries you.

BTW, I had already used that for the first bit of code I gave him. wink

#139204 12/01/06 05:12 PM
Joined: Feb 2005
Posts: 4
S
saulob Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Feb 2005
Posts: 4
thank you schaefer31, thank you guys.

yep, only when someone open the query window with me.

i just created one popup command to check for the file.

now i know how to use the commands.. thank you smile


Link Copied to Clipboard