mIRC Homepage
Posted By: Debug New option (very good idea) - 08/08/04 11:46 PM
Hello,

I have one idea for a new feature in mIRC.
Something like this to hide some things on the #channel:

HIDE [on|off] #channel [+ - | jpkmq]
j - joins
p - parts
q - quits
m - modes
k - kicks

A lot of friends ask for this.
Sure there is this in the IRC Window but this can make very very easy.

What do you guys think about this?
Posted By: greeny Re: New option (very good idea) - 08/08/04 11:57 PM
A command and its respective identifier for all of the options in the "Events..." menu would be very nice indeed.
This would make life much easier for theme engines which only have the ability of reading these settings from mirc.ini (which is either slow or unreliable) until now.
Posted By: Zyzzyx26 Re: New option (very good idea) - 09/08/04 12:12 AM
It's a good idea, even though you can already do that, but you have to go to mIRC options. I (try to :P) aid in a help channel and it would be much easier to tell people to type /hide -jp than to lead them to the Hiding events window. smile

Edit: It just occured to me that would be useful on flooding cases, where hiding Joins & Parts come in handy smile
Posted By: Iori Re: New option (very good idea) - 09/08/04 12:14 AM
A command and its respective identifier for all of the options period. grin
Posted By: landonsandor Re: New option (very good idea) - 09/08/04 12:17 AM
sounds good to me and I might even use it sometime! smile
Posted By: Zyzzyx26 Re: New option (very good idea) - 09/08/04 01:10 AM
Code:
; Usage:
; [color:green]/hide < - [r] [jpkmq] > <#channel>[/color]
; j = Joins p = Parts q = Quits m = Modes k = Kicks
;
; [color:red]r[/color] removes (shows) the other events specified in the switches.
; If no events are chosen, when using the -r switch, the script removes (shows) them all.

alias Hide {
  if ($1) && ($left($1,1) != -) { echo $color(info) -a * You need switches for this command. | return }
  if (!$2) { echo $color(info) -a * You must specify a channel. | return }
  if ($left($$2,1) !=  $chr(35)) { echo $color(info) -a * You must specify a channel. | return }
  if  ($1 == -r) { var %all = all, %switches = r }
  elseif ($1 != -r) { var %switches = $remove($1,-) }
  if (r !isin %switches) { goto add }
  elseif (r isin %switches) { goto remove }
 :add
  if (j isin %switches) || (%all) { .enable #Joins | hadd -m Hidden Joins $hget(Hidden,Joins) $$2 | var %do = $addtok(%do,Joins,32) }
  if (p isin %switches) || (%all) { .enable #Parts | hadd -m Hidden Parts $hget(Hidden,Parts) $$2 | var %do = $addtok(%do,Parts,32) }
  if (k isin %switches) || (%all) { .enable #Kicks | hadd -m Hidden Kicks $hget(Hidden,Kicks) $$2 | var %do = $addtok(%do,Kicks,32) }
  if (m isin %switches) || (%all) { .enable #Modes | hadd -m Hidden Modes $hget(Hidden,Modes) $$2 | var %do = $addtok(%do,Modes,32) }
  if (q isin %switches) || (%all) { .enable #Quits | hadd -m Hidden Quits $hget(Hidden,Quits) $$2 | var %do = $addtok(%do,Quits,32) }
  echo $color(info) * Now hiding on $$2 $+ : $iif(%all,All events,%do)
  halt
  :remove
  if (j isin %switches) || (%all) { .disable #Joins | hadd -m Hidden Joins $remtok($hget(Hidden,Joins),$$2,1,32) | var %do = $addtok(%do,Joins,32) }
  if (p isin %switches) || (%all) { .disable #Parts | hadd -m Hidden Parts $remtok($hget(Hidden,Parts),$$2,1,32) | var %do = $addtok(%do,Parts,32) }
  if (k isin %switches) || (%all) { .disable #Kicks | hadd -m Hidden Kicks $remtok($hget(Hidden,Kicks),$$2,1,32) | var %do = $addtok(%do,Kicks,32) }
  if (m isin %switches) || (%all) { .disable #Modes | hadd -m Hidden Modes $remtok($hget(Hidden,Modes),$$2,1,32) | var %do = $addtok(%do,Modes,32) }
  if (q isin %switches) || (%all) { .disable #Quits | hadd -m Hidden Quits $remtok($hget(Hidden,Quits),$$2,1,32) | var %do = $addtok(%do,Quits,32) }
  echo $color(info) * Now showing on $$2 $+ : $iif(%all,All events,%do)
  halt
}
#Joins off
on ^*:JOIN:#: if ($istok($hget(Hidden,Joins),$chan,32)) { haltdef }
#Joins end
#Parts off
on ^*:PART:#: if ($istok($hget(Hidden,Parts),$chan,32)) { haltdef }
#Parts end
#Kicks off
on ^*:KICK:#: if ($istok($hget(Hidden,Kicks),$chan,32)) { haltdef }
#Kicks end
#Modes off
on ^*:RAWMODE:#: if ($istok($hget(Hidden,Modes),$chan,32)) { haltdef }
#Modes end
#Quits off
on ^*:QUIT: {
  var %i = $comchan($nick,0)
  while (%i) {
    if ($istok($hget(Hidden,Quits),$comchan($nick,%i),32)) { haltdef }
    else { echo $color(quit) $comchan($nick,%i) * Quits: $nick $+($chr(40),$address,$chr(41)) ($1-) }
    dec %i
  }
}
#Quits end
I know this is very rusty, long and primitive, but I've tested here and it seems to work fine. If there is any bugs, please tell me smile

Usage:
/hide < - [r] [jpqkm] > <#channel>

A switch is always needed, so is the channel. Maybe later I work sth out to make it avaiable to all chans? :P

Like suggested:
j = Joins; p = Parts; q = Quits, m = Modes; k = Kicks

Eg: /hide -jp #home - will hide Joins and Parts in the channel #home

Eg2: /hide -rj #home - will show the events on #home

Eg3: /hide -r #home - will show all events in channel #home

I didn't add a multiple channel to it yet (Eg: /hide -j #home #work) because it's complicated to remove them (a simple $remtok wouldn't do it), but maybe later smile

Hope this helps (and works)
Zyzzyx smile

Posted By: greeny Re: New option (very good idea) - 09/08/04 02:02 PM
Problem with that is that it doesn't look at the mIRC options at all, which is bad if you release a script to the public.
Posted By: Mentality Re: New option (very good idea) - 09/08/04 02:14 PM
I like the idea, however, there needs to be a switch for 'Show in status', not just the 'Hide' option. And obviously the other events not previously mentioned, namely ctcps, nicks and topics.

Good suggestion smile

Regards,
Posted By: Zyzzyx26 Re: New option (very good idea) - 09/08/04 09:32 PM
Yes, it does not check the mIRC options regarding the hiding events (I dont know if you can do it, neither where to find that information), however, that was just a quick alias that kind of helps in the event hiding, as suggested. If you have mIRC showing all the events, the code would show or not those 5 events, according to what you want.

As Mentality said, CTCPs, notices, nick changes and such were not included (It actually didnt occurred to me last night :P)... same goes for the Show In Status option. But it is doable, I guess smile

Zyzzy.
Posted By: Debug Re: New option (very good idea) - 09/08/04 10:01 PM
I made this suggestion cause some channels the join/part/quit just flood a lot and we can rarely chat and if you have some "Interviews channel" this is very very helpful.

Maybe adding this options can be more useful:
s - status
h - hide
n - normal

/Hide [s h n] [j k m p q c] #chan
Posted By: PhantasyX Re: New option (very good idea) - 13/08/04 03:05 PM
I'm bring back this topic becuase, I found something in mIRC.
There is an /events command for mIRC, to turn events on or off.
But when I Right-Click on a Channel Window in the switchbar, there is an events options to SHOW/HIDE various events.
Maybe edit the /events command, as what this topics is about
So you could switch those event settings through a command, instead of right-clicking and Selecting.

I know, confusing, but here is an better explination
Posted By: Armada Re: New option (very good idea) - 25/08/04 03:53 AM
Yea but one thing is to be able to set per channel like the script does above
© mIRC Discussion Forums