Hiding Channels

By Stealth on Apr 26, 2005

I know this may be badly scripted but i only done it quickly, there is a single error which i have found. Once you unhide a channel using /window -w #chan it still says its hidden untill the next time you use check. Just click in a channel to hide it and type /check to see the channels you've hidden. Sorry for the messy scripting :P

Alias Window {
  if (h isin $1) {
    window -h $2
    set %hidden $addtok(%hidden,$2,44)
  }
  var %x = 1
  while ($gettok(%hidden,%x,44)) {
    echo -a -------- $+ %x $+ --------
    echo -a Hidden Chan: $v1
    inc %x
  }
  if (w isin $1) && ($2 isin %hidden) {
    window -w $2
    set %hidden $deltok(%hidden,$findtok(%hidden,$2,44),44)
  }
  while ($gettok(%hidden,%x,44)) {
    echo -a -------- $+ %x $+ --------
    echo -a Hidden Chan: $v1
    inc %x
  }
  Else {
    window $1-
    Halt
  }
}
Alias Check {
  var %x = 1
  while ($gettok(%hidden,%x,44)) {
    echo -a -------- $+ %x $+ --------
    echo -a Hidden Chan: $v1
    inc %x
  }
}
Menu Channel {
  Hide $active:$iif($active isin %hidden,Halt,window -h $active)
}

Comments

Sign in to comment.
Stealth   -  Apr 28, 2005

i told you it wasnt very good :P, i can\'t help not being very good at scripting

 Respond  
enexif   -  Apr 28, 2005

alias switchstate { if ($window($1).state == hidden) { window -w $1 } | else { window -h $1 } }

 Respond  
Relinsquish   -  Apr 26, 2005

You should never use /halt in an alias, especially one that is of an mIRC default command. Use /return instead. As for /check, I believe you can use $window(#channel).state to check if it is hidden.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.