mIRC Home    About    Download    Register    News    Help

Topic Options
#99116 - 29/09/04 01:37 AM removing join,parts and quits
infamy Offline
Nutrimatic drinks dispenser

Registered: 29/09/04
Posts: 5
hey
i dont want joins, parts and quits to show up on specific channels (not all of them, only the ones i choose)
I figured out how to get rid of the join and parts..but the QUITS has been giving me problems..i tried many ways..but nothing perfect

here's what i have for the join and part

on ^1:JOIN:#channel:haltdef
on ^1:PART:#cahnnel:haltdef

on ^1:quit.... does not work that well, i still see some quits in the channel, and in the server window i see some error msg.

help is appreciated

infamy


Top
#99117 - 29/09/04 01:54 AM Re: removing join,parts and quits
Zyzzyx26 Offline
Hoopy frood

Registered: 15/02/04
Posts: 714
Loc: Brasil
on ^*:quit: haltdef will not show any quits in any channels. For specific channel(s), try this:
Code:
on ^*:quit: {
 var %x = $comchan($nick,0)
 while ($comchan($nick,%x)) {
  var %a = $v1
   if ($istok(%quit.chans,%a,44)) { haltdef }
  dec %x
 }
}
This should hide the quits on the channels that are in the %quit.chans variable. This var should be separated by commas (,) --> #home,#office,#bar

Hope this helps smile
Zyzzyx.
_________________________
"All we are saying is give peace a chance" -- John Lennon

Top
#99118 - 29/09/04 02:20 AM Re: removing join,parts and quits
infamy Offline
Nutrimatic drinks dispenser

Registered: 29/09/04
Posts: 5
Thanks for the code, it works but i'm confused bout something.

this line,
if ($istok(%quit.chans,%a,44)) { haltdef }

it works if i take out the %quit.chans and replace it with for example, #bar, #mirc, #channel, %a, 44

but what did u mean by

"This should hide the quits on the channels that are in the %quit.chans variable. This var should be separated by commas (,) --> #home,#office,#bar"

how would i put them in the %quit.chans variable?
(sorry for noob questions, its been a looooong time since i did any mirc scripting..i can follow it pretty easily, but not code as easily)



Top
#99119 - 29/09/04 02:37 AM Re: removing join,parts and quits
Zyzzyx26 Offline
Hoopy frood

Registered: 15/02/04
Posts: 714
Loc: Brasil
A %variable is a kind of "shortcut" to a value. It holds texts, numbers or whatever you need that, as the name suggest, can vary from time to time. Variables can be easier to use because, instead of writing the whole value, you just put the var's name there smile

The variable %quit.chans, in this case, would hold the channels you want to hide the Quits from. Having the %quit.chans variable there or simply puting #bar,#mirc,#channel is the same thing, as long as you separate the channel name with a comma (,).

To create a variable you use the command /set. Here's what the help file says about it:

/set [-snzuN] <%var> [value]
This sets the value of %var to the specified value.

If you specify the -uN switch, %var is unset after N seconds, assuming it is not set again by another script. If you specify a zero for N, the variable is unset when the script finishes.

The -z switch decreases %var until it reaches zero and then unsets it.
The -n switch makes it treat value as plain text.


So, the set the variable %quit.chans you can use: /set %quit.chans #channel1,#channel2,#channel3 and so on.. You can modify the var by either doing a new /set command or going to the Variables editor (Alt + R and clicking on the tab Variables).

There are also temporary variables which exist only while the script which set them is running. Those are made with the command /var (Syntax is: /var %var_name = <value>)

In the script above you can either put #home,#office,#bar or create the %quit.chans variable with that value. It will work either way as long as they are separated by a comma.

For further help you can type, in your mIRC, /help variables.

I hope this could help smile
Zyzzyx.
_________________________
"All we are saying is give peace a chance" -- John Lennon

Top
#99120 - 29/09/04 02:43 AM Re: removing join,parts and quits
infamy Offline
Nutrimatic drinks dispenser

Registered: 29/09/04
Posts: 5
ahh, thanks
thats what i needed to know smile
but you really didn't need to explain what a variable is smile

Top
#99121 - 29/09/04 02:45 AM Re: removing join,parts and quits
Zyzzyx26 Offline
Hoopy frood

Registered: 15/02/04
Posts: 714
Loc: Brasil
yw wink

Sorry, I guess I was inspired of something :P
_________________________
"All we are saying is give peace a chance" -- John Lennon

Top