mIRC Home    About    Download    Register    News    Help

Print Thread
#129987 11/09/05 10:32 PM
Joined: Apr 2005
Posts: 64
V
Vinniej Offline OP
Babel fish
OP Offline
Babel fish
V
Joined: Apr 2005
Posts: 64
How to do this. I dont want joinflooding in my chan, so i want to block it. Even i need on part and on quit. smile

#129988 11/09/05 11:10 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
oh i c you want to limit users...

on *:JOIN:#: {
%users = $nick(#,0)
inc %users 3
if ($me isop #) { timer 1 20 //mode # +l %users }
}
;when someone joins the channel it reads how many nicks are in ;channel then increments it by 3 more and sets a timer only if your op
;so that within 20 seconds if 3 nicks or less joins then they are safe
;but that fourth nick will have to wait.

now on to remove the limit when users part or quit
we use the same kinda method here almost

on *:PART:#: {
%users = $nick(#,0)
dec %users
if ($me isop #) { timer 1 20 //mode # +l %users }
}
;this removes 1 user from chan wink limit

same thing for quit
on *:QUIT:#: {
%users = $nick(#,0)
dec %users
if ($me isop #) { timer 1 20 //mode # +l %users }
}


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
#129989 12/09/05 01:47 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
No dude it isn't the same thing the QUIT event takes no channel parameters. You would need to loop through the channels with $comchan().

-Andy

#129990 12/09/05 03:07 AM
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
No need to loop through comchan if the limit is running on just one channel, you can use an if statement to check if the quitter was on the channel. Note: since this is the simple version for just one channel, #chan can not be dynamic (ie $chan or #)

Code:
on ^*:quit: {
  if ($nick ison #chan) {
    %users = $nick(#chan,0)
    dec %users
    if ($me isop #chan) { timer 1 20 //mode #chan +l %users }
  }
}


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
#129991 12/09/05 03:13 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Well yes but I was adapting from Lpfix5's code where it would trigger on all channels, but you are right there is a way for just one channel.. smile

-Andy


Link Copied to Clipboard