mIRC Home    About    Download    Register    News    Help

Print Thread
Is there a quicker way to add favorite channels? #266785 03/02/20 10:46 AM
Joined: Feb 2020
Posts: 1
N
Nickonzo Offline OP
Mostly harmless
OP Offline
Mostly harmless
N
Joined: Feb 2020
Posts: 1
I'm currently just click Favorites,Add Favorite, Typing out the name, selecting the 2 boxes to auto connect and then minimize. Is there a better way to do this? Thank you for reading and good day!

Re: Is there a quicker way to add favorite channels? [Re: Nickonzo] #266786 03/02/20 06:33 PM
Joined: Feb 2015
Posts: 76
K
kap Offline
Babel fish
Offline
Babel fish
K
Joined: Feb 2015
Posts: 76
This writes to the chanfolder location in $mircini. You really shouldn't write to $mircini directly, people WILL yell at you for doing so, but here's an example that may work...

Code
; /addfav -jm +c #channelname [ +p <Password> ] [ +n <*>|<network> ] [ +f <Foldername> ] [ +d <This is the description> ]
; Examples:
; /addfav -jm +c ##mirc +n Freenode +f mIRC_related +d Unoffical mIRC support channel
; /addfav -jm +c #mircscripting +n SwiftIRC +f mIRC_related +d Ouims' super chill hangout place
; /addfav -j +c #peace&protection +n EFNet +f mIRC_related +d Offical support channel for PnP
alias addfav {
  var %description, %folder, %network, %password, %channel, %join_on_connect, %minimize_on_join
  var %ini n $+ $iif($ini($mircini,chanfolder,0),$v1,0)
  if ($findtok($1-,+d,32) && ($gettok($1-,$+($calc($v1 + 1),-),32))) var -n %description $v1
  if ($findtok($1-,+f,32) && ($gettok($1-,$calc($v1 + 1),32))) var -n %folder $v1
  if ($findtok($1-,+n,32) && ($gettok($1-,$calc($v1 + 1),32))) var -n %network $v1
  if ($findtok($1-,+p,32) && ($gettok($1-,$calc($v1 + 1),32))) var -n %password $v1
  if ($findtok($1-,+c,32) && ($gettok($1-,$calc($v1 + 1),32))) var -n %channel $v1

  if (-* iswm $1) { 
    if (j isin $1) var %join_on_connect 1
    if (m isin $1) var %minimize_on_join 1
  }
  if (%network == *) var %network
  if ($left(%channel,1) == $chr(35)) { 
    writeini $qt($mircini) chanfolder %ini %channel $+ , $+ %description $+ , $+ %password $+ , $+ %network $+ , $+ %join_on_connect $+ , $+ %minimize_on_join $+ , $+ %folder | flushini $qt($mircini)
  }
  else { 
    echo -ag Sorry, %channel is not a valid channel name!
  } 
}


Code
alias t1 {
  addfav -j +c #peace&protection +n EFNet +f mIRC_related +d Offical support channel for PnP
  addfav -jm +c ##mirc +n Freenode +f mIRC_related +d Unoffical mIRC support channel
  addfav -jm +c #mircscripting +n SwiftIRC +f mIRC_related +d Ouims' super chill hangout place
}


pastebin: https://www.irccloud.com/pastebin/raw/YkqxcWsw

Note: Don't use this. People will yell at you. I've warned you twice now.


Last edited by kap; 03/02/20 06:36 PM. Reason: Added pastebin link

irc://irc.mircscripts.net:+6697/chat