mIRC Home    About    Download    Register    News    Help

Print Thread
Importing favorites #265259 24/03/19 01:35 AM
Joined: Mar 2019
Posts: 1
L
Livesongs Offline OP
Mostly harmless
OP Offline
Mostly harmless
L
Joined: Mar 2019
Posts: 1
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

Re: Importing favorites [Re: Livesongs] #265271 25/03/19 04:12 AM
Joined: Jan 2004
Posts: 1,187
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,187
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