mIRC Home    About    Download    Register    News    Help

Print Thread
#255763 20/11/15 12:03 AM
Joined: Mar 2012
Posts: 38
Twitch Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Mar 2012
Posts: 38
The help file states the following under /help $mknickfn:

Quote:
You can also use $mknickfn(nickname) to fix a nickname for use as a filename, and $mkfn(filename), which just removes invalid characters.


However, it would seem that it is backwards from the actual output:

Code:
//echo -ag $mklogfn(Tw|tch) :: $mknickfn(Tw|tch) :: $mkfn(Tw|tch)
-
DALnet\Tw_tch.20151119.log :: Twtch :: Tw_tch


As you can see $mkfn does the replacements, whereas $mknickfn removes invalid characters.

I'm not sure which way is supposed to be correct, but the help file does not dictate results in this case, so I figured I would make a post about it.


Lost in your digital reality.
#mIRC / #Helpdesk on DALnet.
Joined: Dec 2002
Posts: 5,421
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,421
Thanks for your post. The identifiers are working as they should. I will correct the description in the help file for the next version.

Update: In retrospect, $mknickfn() was probably not worth adding as an identifier. It calls a routine that is used in only a few places (by DCC events) to limit nickname characters to a very restricted range, for security reasons. Looking at the routine now, it might be best to change it so that it uses _ to replace invalid characters, like $mkfn(), instead of removing them.


Link Copied to Clipboard