mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#232074 17/05/11 07:39 PM
Joined: May 2011
Posts: 15
A
Pikka bird
OP Offline
Pikka bird
A
Joined: May 2011
Posts: 15
What I think is a useful development:
In the notify list: each time a notify nick is on-line and you get the msg in status or activ window, add date and time in the .ini-file. Then you can look throu the file now and then and see if there is some nick that you could remove that haven't been on-line in a while
Easy to keep it up to date then :-)

Last edited by afboymike; 17/05/11 07:44 PM.
afboymike #232075 17/05/11 08:39 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
While this might be a useful development, it's also easily scripted using the ON NOTIFY event.
Code:
on *:notify:*:{
  .writeini -n $logdirnotify.ini $network $nick $date $time
}

This is just an example. There are lots of different ways of organizing the file depending on just how you want it.

RusselB #232080 18/05/11 02:50 AM
Joined: Mar 2004
Posts: 526
Fjord artisan
Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
Originally Posted By: RusselB
While this might be a useful development, it's also easily scripted using the ON NOTIFY event.
Code:
on *:notify:*:{
  .writeini -n $logdirnotify.ini $network $nick $date $time
}

This is just an example. There are lots of different ways of organizing the file depending on just how you want it.


think your missing a space ie: $logdir notify.ini ... etc...

other than that, a great suggestion wink


Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!
HorseC #232081 18/05/11 05:44 AM
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Originally Posted By: HorseC
think your missing a space ie: $logdir notify.ini ... etc...

These location identifiers don't need spaces.
//echo -a $logdirtest

5618 #232086 18/05/11 10:21 AM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yeah, $logdir, $scriptdir, $mircdir etc don't need spaces... but it's not a bad idea to use spaces (or \'s) just in case that's ever changed. A space in that instance probably wouldn't work anyhow... a \ would be used instead. Haven't tested it though, so maybe mIRC can understand with a space.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #232087 18/05/11 10:58 AM
Joined: Dec 2002
Posts: 344
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 344
Using a slash doesn't change the fact that the syntax is inconsistent, and $*dir aliases have a slash on the end already.

The robust solution is $qt($+($logdir,notify.ini))

drum #232088 18/05/11 01:14 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I didn't say it wasn't inconsistent. I pointed out that it's better to be consistent by including a space/slash. And, yes, I do know that the \'s are part of the $*dir commands. They wouldn't work otherwise in the form of $*dirfile.ext . I was pointing out that you wouldn't be able to use a space there, but that you can use a \. Double \'s in a path are fine.

As to using $+() to combine the items... I'm not sure why you would bother doing that. It might prevent an issue later if the ability to type it out as $*dirfile.ext is removed, but that's not guaranteed. It would depend on how it's removed. If it's removed in a way that leaves the final \ on the $*dir command, then that would prevent an issue. If it's removed along with the final \ on the $*dir command, then it doesn't prevent the issue. Instead, including the \ will prevent the issue either way. It's also shorter and doesn't require the $+() command, which means it's faster (though probably by no more than a couple miliseconds). $qt() is always a good idea, of course.

In any case, at this time, it's just a preference. Some will write it one way and some will write it another. Unless mIRC changes this, and there is a really good change that it won't get changed because of the large number of scripts that use the $*dirfile.ext format, there isn't any reason you can't write it the way you want to. It's just a matter of deciding whether or not you want to try and avoid any potential issues down the road or if you want to either assume there won't ever be an issue or that you'll update when there is.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #232089 18/05/11 02:34 PM
Joined: Dec 2002
Posts: 344
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 344
Using a space doesn't work (even in identifiers or in quotes). Using a slash does work.

The primary reason I use $+ is for readability of code. Someone reading my code can tell how it would behave without any special knowledge of the quirky behavior of $*dir identifiers in mIRC. The fact that it also would not break if the quirky behavior was removed is just a bonus.

I don't see any reason why the ending slash would be removed from the response given by $*dir identifiers, so I don't really accommodate for that possibility.

drum #232090 18/05/11 04:56 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I did say that space isn't valid. smile

Anyhow, $logdir\logfile.txt is more readable imo. It looks like a path that most people are familiar with, whereas someone may not know what $+() means. Either way. wink


Invision Support
#Invision on irc.irchighway.net
afboymike #232471 06/06/11 04:46 AM
Joined: May 2011
Posts: 15
A
Pikka bird
OP Offline
Pikka bird
A
Joined: May 2011
Posts: 15
Thank u all for the ideas!
But since i'm not that familiar with irc in these ways, where do i type this stuff?

afboymike #232476 06/06/11 10:11 AM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Alt-R > File > New.


Invision Support
#Invision on irc.irchighway.net
afboymike #232480 06/06/11 12:29 PM
Joined: May 2011
Posts: 15
A
Pikka bird
OP Offline
Pikka bird
A
Joined: May 2011
Posts: 15
Thanks!

Did it and clicked ok. In the Staus window i now get "*:{ Unknown command".
So where excatly do i get those "stamps"?

afboymike #232482 06/06/11 12:53 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Make sure you paste all of what was shown so that it looks exactly the same. From that error message, you either copied starting at the "*:{" instead of starting at "on" or else you have an Enter in the middle of the line. Make sure it's the only thing in the file (File>New should give you a blank file).

Last edited by Riamus2; 06/06/11 12:54 PM.

Invision Support
#Invision on irc.irchighway.net
afboymike #232484 06/06/11 01:16 PM
Joined: Jul 2006
Posts: 4,144
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
RusselB made either a typo or an error, the on notify event doesnt take a parameter, use:

Code:
on *:notify:.writeini -n $logdirnotify.ini $network $nick $date $time


Edit: Riamus, no, he is simply executing the command named "*:{" laugh

Last edited by Wims; 06/06/11 01:17 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
afboymike #232485 06/06/11 01:38 PM
Joined: May 2011
Posts: 15
A
Pikka bird
OP Offline
Pikka bird
A
Joined: May 2011
Posts: 15
Thanks! No error msg now! U guys r the best
So where do i find this time stamps?

Wims #232487 06/06/11 02:15 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Didn't notice that extra parameter. Good catch.


Invision Support
#Invision on irc.irchighway.net
afboymike #232561 09/06/11 02:49 PM
Joined: May 2011
Posts: 15
A
Pikka bird
OP Offline
Pikka bird
A
Joined: May 2011
Posts: 15
Thamks again guys!

But were do I find those time stamps?

afboymike #232573 09/06/11 05:55 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
What time stamps? If you want to enable/disable time stamps, Alt-O > IRC > Messages.


Invision Support
#Invision on irc.irchighway.net
afboymike #232599 11/06/11 08:25 AM
Joined: May 2011
Posts: 15
A
Pikka bird
OP Offline
Pikka bird
A
Joined: May 2011
Posts: 15
OK sorry wrong words. I mean where do i find the notes when a nick on my notift list lasst was seen. I e what the scrpit is suppouse to do if i got it right....

afboymike #232600 11/06/11 12:58 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
//run $logdirnotify.ini


Invision Support
#Invision on irc.irchighway.net
Page 1 of 2 1 2

Link Copied to Clipboard