mIRC Homepage

Importing favorites

Posted By: Livesongs

Importing favorites - 24/03/19 01:35 AM

Hello I was wondering if there was a way to import multiple channels into the favorite section on mirc im trying to make a auto lurk bot for twitch but dont want to add the channels manually because I have so many
Posted By: maroon

Re: Importing favorites - 25/03/19 04:12 AM

The favorites are in the [chanfolder] section of mirc.ini. I don't recommend writing to it with a script, best to backup mirc.ini to somewhere safe, then paste from elsewhere using notepad. From playing round with it, it looks like each line is formatted where the #channelname is either by itself or followed by several optional fields like:

#channelname,"description",password,"NetworkGroupname1,NetworkGroupname2",1,1

... where the last 2 fields being 1 are:

1 if join-on-connect, otherwise blank
1 if minimize-on-join, otherwise blank

If the optional fields aren't set, they're blank rather than have a series of commas.

You can browse thru the favorites like:

//hfree -w favorites | hload -m1i favorites $mircini chanfolder

This shows the items being loaded in reverse alphabetical order:

//var %i 1 | while ($hget(favorites,%i).item) { echo -a $v1 $hget(favorites,$v1) | inc %i }

and that's the way they would save to disk:

/hsave -ins favorites favs.txt chanfolder
© 2019 mIRC Discussion Forums