mIRC Homepage

Add/Remove Favorites by /command

Posted By: Raccoon

Add/Remove Favorites by /command - 02/01/21 01:57 AM

There is no command to add or remove Favorite channels by hand or automation.

Eg, To automatically add a channel to one's Favorites after joining and being in a channel for more than an hour. Or right-click popup menu functions for Favoriting channels.
I'd be more apt to use the Favorites feature if I didn't have to manually fuss with them.

Favoriting the current channel on the current server to automatically join next time you reconnect, should be very simple to type in.

/favorite -a -r -j -n -l [#channel [#channel...]] [network [network...]] [-p password] [-f folder] [-d description]

-a add
-r remove
-j join on connect
-n minimize
-l list
#channel(s) -- optional. uses current channel if omitted. allow multiple channels (identified per channel prefix), either space or comma delimited.
network(s) -- optional. uses current network if omitted. allow multiple networks (identified by having no channel prefix), space or comma delimited.
-p password -- channel(s) key.
-f folder -- keep favorite channel(s) tidy in folders.
-d description -- description of channel(s) being added.


/favorite -ajn

* #mIRC added to Favorites (networks: EFNet) (autojoin) (minimized)
Posted By: maroon

Re: Add/Remove Favorites by /command - 17/01/21 08:10 PM

Some things which would make the favorites list more useful:

Have the Alt+J window look more like the Alt+E window. Channels being grouped by network is more useful than an alphabetical list which ignores the network. It's more useful for the network groups to be an expanded display, so people don't need to double-click on the network name to see their channels.

Have the default be to require a network, as most people aren't in the business of opening a specific channel name at each network they join.

Have a 3rd checkbox in the Alt+J window to choose whether or not to keep sorting the channel list alphabetically. If I want ##mirc to be $chan(1) but it's the next to last of that network's channels in alphabetic order, that means the favorites list can't be used at that network.

Just like the delay before joining channels to ensure nickserv sees your password before you try to join a +R channel, people joining a large number of channels would want a delay between channels to lessen the chance of flooding due to the NAMES keyword and the "/who #channel" replies.

Just has /ignore has $ignore() to return info about the ignore list, /favorites should have $favorites() to return info about that list.

It would need to be clarified whether -a should be used to edit an existing channel, or whether there should be a -e switch. For example, if the only thing that's needed is to change the channel key for an existing entry, without adding the channel if it's not already in the list.
Posted By: danielboom

Re: Add/Remove Favorites by /command - 04/04/21 11:01 AM

how can i add the channels on remote ?

raw 322:*: { writeini mirc.ini }?
Posted By: maroon

Re: Add/Remove Favorites by /command - 04/04/21 12:05 PM

Here's a quick hack that's nowhere near acceptable for the long term. All it does is:

(1) /hload the chanfolder section of mirc.ini into a hashtable
(2) create a new item for the active channel at the active network, with the setting for autojoin-on-connect being checkboxed
(3) /hsave the hashtable back to mirc.ini as a replacement chanfolder section

It doesn't check to see if you already have it there, so if you end up with duplicates you'll need to kill the extras. Even though the items are saved in random order, the Alt+J window always shows them in alphabetical order

To create this,
((AA)) save a backup copy of mirc.ini in case you mess things up. If it doesn't have a new timestamp you found the wrong one. It will be the one you see in this command: //echo -a $mircini
(A) press Alt+P to open the popups that control the right-click menu
(B) If it's not already there, use the 'view' dropdown menu for the popups editor to show the menu for things to do when you right-click in channel. If you've done nothing to it yet, the default popup should already have a line like: Channel Modes:/channel
(C) CopyPaste the new commands onto blank lines below the existing line(s)

Add 2 Favs:{
  hfree -w foobar
  hload -im foobar $qt($mircini) chanfolder
  hadd foobar new $+($chan,$chr(44),$chr(44),$chr(44),$qt($network),$chr(44),1)
  hsave -sin foobar $qt($mircini) chanfolder
  echo -a open alt+J window and see $chan @ $network added to your Fav List even if it already exists

(D) When you right-click in any channel, you'll now see a new menu item named "Add 2 Favs"
© 2021 mIRC Discussion Forums