mIRC Homepage
Posted By: Backfire help plz - 17/04/11 06:53 AM
this one

//set %JPHOLD On

ignore for any join in channel

Example : * Joins: mIRC (mirc@188.21.35.84)


i need ignore part and quit
Posted By: Jeroi Re: help plz - 17/04/11 12:24 PM
on events /help

on join
on part
on quit

Ie:

on ^*:JOIN|PART|QUIT: halt

^ trigger before message is shown and * makes for everykind of access user so ^ and halt causes messages not to show in the channel.
Posted By: 5618 Re: help plz - 18/04/11 05:57 AM
If you want to set this on a per-channel level then you can always use the right-click menu for channel buttons/names and go to Events...
Posted By: Backfire Re: help plz - 18/04/11 07:36 PM
this my addon
pro for mass join flood

===
on ^*:join:#:{
if ($me !isop #) { Return }
if (*.dal.net*.dal.net* iswm %NetSplitAddresses. [ $+ [ $wildsite ] ]) { Return }
inc -u2 %JoinFlood. [ $+ [ $chan ] ]
if (%JoinFlood. [ $+ [ $chan ] ] == 3 ) {
.ignore -cnu20 *
inc -u10 %MRrepeat. [ $+ [ $chan ] ]
if (%MRrepeat. [ $+ [ $chan ] ] == 1) { mode $chan +MR | .timerMR 1 60 mode $chan -MR | set %JPHOLD On | .timerJPHOLD 1 45 set %JPHOLD OFF }
}
if (%JPHOLD == ON) { halt }
}


I want to hide msg for join and part and quit for 60 seconds
Posted By: Riamus2 Re: help plz - 18/04/11 07:43 PM
First, you can put an @ in the on JOIN line so that you don't need the check to see if you're an op.

Code:
on ^@*:join:#: {


Second, please use the CODE tags around code so that it's spaced out and easier to read.

As to your question, set your variable for 60 seconds and put a check in each event... if the variable is set, then haltdef the event.

Example:

Code:
on ^@*:join:#: {
  if (%JPHOLD) { haltdef }
  ; Put the rest of your script here.
}


Do the same for part and quit events as well.

You can use this to set the variable rather than using a timer:

Code:
set -u60 %JPHOLD On
Posted By: Backfire Re: help plz - 18/04/11 08:18 PM
sir
Can you write all addon blush
Posted By: Riamus2 Re: help plz - 18/04/11 08:42 PM
You already wrote it. Insert what you have into where I put the comment saying where your code goes.
Posted By: Tomao Re: help plz - 18/04/11 08:58 PM
There's no channel for the quit event, and that's a tricky one. He can put the #chan directly in the code; but judging from the code he's provided, he wants it to work in all common channels. I'm afraid he's clueless, hence he's asking for a finished script.
Posted By: RusselB Re: help plz - 18/04/11 10:40 PM
While there's no direct channel referenced in the ON QUIT event, using $comchan($nick,X) will return the Xth common channel of the nick that has quit. I thought you were aware of this.
Posted By: Riamus2 Re: help plz - 18/04/11 10:47 PM
Halting it all the time when that variable is set doesn't require a channel to be specified, unless you only want it halted in a specific channel. It will simply halt all quit messages. It's only important if you want to single out specific channels.

If there isn't a real need to see quit messages in some and not others, I'd just let it halt all quit messages as it's a lot simpler script. If you want to halt only in specific channels, then you need $comchan and that only helps to a point. If a nick is on two channels and you only want quit halted in one, it's going to halt for that nick in both or neither. Because of that problem, it will look more normal if it just halts all quit messages everywhere when the variable is set.
Posted By: Tomao Re: help plz - 19/04/11 12:54 AM
Thanks you two for the reminder.
© mIRC Discussion Forums