mIRC Home    About    Download    Register    News    Help

Print Thread
#99999 09/10/04 02:45 AM
Joined: Sep 2004
Posts: 200
I
IR_n00b Offline OP
Fjord artisan
OP Offline
Fjord artisan
I
Joined: Sep 2004
Posts: 200
on *:join:*: {
if ($chan == #blah) {
<people who are allowed to join:
if ($nick == blah) { halt }
/names $chan
/mode $chan +b $address
/kick $chan $nick 2You are not allowed to be on this channel.
/timer 1 10 /mode $chan -b $address
}
}
how would i make it so &s can do !alow <nick here>
so they are added so they wont get kicked until one of them does !disallow <nick here>
and ops can do !tallow <nick here> whitch would allow them to join for a hour
and !clearallow wold reset the temporary ones
does anyone know how to do this?
confused


#100000 09/10/04 03:13 AM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
Code:
on *!:join:#:{
  if (!$hget(allow,$nick)) &amp;&amp; (!$hget(tallow,$nick)) { 
    names $chan
    ban -ku10 $chan $nick You are not allowed to be on this channel. 
  }
}
on *:text:!*allow &amp;:#:{
  if ($1 == !allow) &amp;&amp; ($left($nick($chan,$nick).pnick,1) == &amp;) { hadd -m allow $2 $true }
  elseif ($1 == !disallow) &amp;&amp; ($left($nick($chan,$nick).pnick,1) == &amp;) &amp;&amp; ($hget(allow,$2)) { 
    hdel allow $2 
    if ($2 ison $chan) &amp;&amp; ($istok(~ . * &amp; ! @ %,$left($nick($chan,$me).pnick,1),32)) { ban -ku10 $chan $nick You are not allowed to be on this channel. }
  }
  elseif ($1 == !tallow) &amp;&amp; ($istok(@ &amp;,$left($nick($chan,$nick).pnick,1),32)) &amp;&amp; (!$hget(tallow,$2)) { 
    hadd -mu86400 tallow $2 $true 
    .timertallow $+ $cid $+ $chan $+ $2 1 86400 $iif($2 ison $chan,ban -ku10 $chan $2 You are not allowed to be on this channel.)
  }
  elseif ($1 == !clearallow) &amp;&amp; ($istok(@ &amp;,$left($nick($chan,$nick).pnick,1),32)) &amp;&amp; ($hget(tallow,$2)) { 
    hdel tallow $2 
    .timertallow $+ $cid $+ $chan $+ $2 off
    if ($2 ison $chan) &amp;&amp; ($istok(~ . * &amp; ! @ %,$left($nick($chan,$me).pnick,1),32)) { ban -ku10 $chan $nick You are not allowed to be on this channel. }
  }
}

#100001 09/10/04 04:04 AM
Joined: Sep 2004
Posts: 200
I
IR_n00b Offline OP
Fjord artisan
OP Offline
Fjord artisan
I
Joined: Sep 2004
Posts: 200
w00t it worked laugh

Last edited by IR_n00b; 09/10/04 04:12 AM.
#100002 09/10/04 08:54 PM
Joined: Sep 2004
Posts: 200
I
IR_n00b Offline OP
Fjord artisan
OP Offline
Fjord artisan
I
Joined: Sep 2004
Posts: 200
the !allow comnd dosent seem to work :S the !disallow dosent work eather nor does the !clearallow only the !tallow works but it says "* /timer: timer tallow1#<chan><nick> not active"

#100003 09/10/04 09:02 PM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
None of them will work if you type them yourself.
!allow and !disallow will only work for &s.
!tallow and !clearallow will only work for &s and @s.

As for the timer thing, change .timertallow $+ $cid $+ $chan $+ $2 off to if ($timer(tallow $+ $cid $+ $chan $+ $2)) { .timertallow $+ $cid $+ $chan $+ $2 off }

#100004 09/10/04 11:55 PM
Joined: Sep 2004
Posts: 200
I
IR_n00b Offline OP
Fjord artisan
OP Offline
Fjord artisan
I
Joined: Sep 2004
Posts: 200
:\ i tried with a frend, with another irc client (not using script)
it still didnt work and the timer still gives a error message saying * /timer: timer tallow1<chan><nick> not active
:\


Link Copied to Clipboard