mIRC Home    About    Download    Register    News    Help

Topic Options
#231511 - 21/04/11 04:26 AM events condition based on number of channel users
Jan86 Offline
Self-satisified door

Registered: 09/04/08
Posts: 3
events condition based on number of channel users

the default options for events should include one that can be chosen for "large" channels, also, definable by the mIRC user.

i.e.: you could automatically hide join/parts for big channels by default

Top
#231512 - 21/04/11 04:41 AM Re: events condition based on number of channel users [Re: Jan86]
jaytea Offline
Fjord artisan

Registered: 23/02/06
Posts: 546
this is precisely why we have a scripts editor in the client
_________________________
"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde

Top
#231521 - 21/04/11 03:12 PM Re: events condition based on number of channel users [Re: Jan86]
FroggieDaFrog Offline
Hoopy frood

Registered: 16/04/10
Posts: 910
Loc: USA
Just an example to hide JOIN PART and MODE's for channels with atleast 100 users. Am sure you could look in the helpfile for more info

Code:
alias largechannel return 100
on ^*:JOIN:#:{ if ($Nick($chan,0) >= $largechannel) { halt } }
on ^*:PART:#:{ if ($nick($chan,0) >= $largechannel) { halt } }
on ^*:RAWMODE:#:{ if ($nick($chan,0) >= $largechannel) { halt } }


Edited by FroggieDaFrog (21/04/11 03:13 PM)
_________________________
I am SReject
My Stuff

Top
#231523 - 21/04/11 04:36 PM Re: events condition based on number of channel users [Re: FroggieDaFrog]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
I think you'll need HALTDEF on those.
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#231524 - 21/04/11 04:55 PM Re: events condition based on number of channel users [Re: Riamus2]
drum Offline
Fjord artisan

Registered: 08/12/02
Posts: 339
Originally Posted By: Riamus2
I think you'll need HALTDEF on those.


No, halt works.

Top
#231558 - 23/04/11 03:17 PM Re: events condition based on number of channel users [Re: Riamus2]
Tomao Offline
Hoopy frood

Registered: 07/07/07
Posts: 1129
Loc: United States
I've seen halt and haltdef used interchangeably for custom events. They both seem to be acceptable. frown
Though according to the help file:
Quote:
If you only want to halt the default text without /halting the entire script, you can use the /haltdef command.

Top
#231587 - 25/04/11 02:15 AM Re: events condition based on number of channel users [Re: Tomao]
drum Offline
Fjord artisan

Registered: 08/12/02
Posts: 339
Both /halt and /haltdef stop the default output, while /halt also stops the script execution. /halt implies /haltdef.

Top
#231594 - 25/04/11 03:35 AM Re: events condition based on number of channel users [Re: drum]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
Yeah. I've been in the habit of using HALTDEF to halt default text because most of the time, I have something else happening and HALT would not work. It's more of a personal preference, I guess. I'd rather use HALTDEF so that I don't forget and put a HALT where it shouldn't be. It's the same reason I use RETURN instead of HALT in places where either could be used. There are times when you can't interchange them. Of course, as long as you know when they can be interchanged, you can use either and you'll be fine. I just haven't used HALT to halt default text in awhile and forgot that they could be changed in this specific case. smile
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#231599 - 25/04/11 08:02 AM Re: events condition based on number of channel users [Re: Riamus2]
FroggieDaFrog Offline
Hoopy frood

Registered: 16/04/10
Posts: 910
Loc: USA
normally I use HALTDEF and RETURN aswell, but that was a quick example I threw together out of laziness blush
_________________________
I am SReject
My Stuff

Top