I found no problem with the script, worked as intended. My only tiff (if you could call it that) would be if multiple people joined the server at once, the late-comer would get less time, and would 'bail' the previous joiner out. I.e. if player1 joined the channel and received the notice to enter the password, then player2 joined and received the same notice, player1 would no longer be the victim of a kick for an inappropriate password, and player2 would only have x seconds (where x is 10 - the time between player1 and player2's joins).

Anyways, I tried my hand at it, did a little improving, and this is what I got. If you have any questions, or would like to know why I chose the methods I did, just ask. I'll be happy to answer any questions.

*tested*
Code:
on @*:JOIN:#fukliam: {
  var %timer = $+($chan,$chr(44),$nick)
  .timer [ $+ [ %timer ] ] 1 10 /password_kick $chan $address($nick,5)
  /msg $chan Welcome $nick $+ , This is a private channel. Please enter the password or you will be kicked (10 seconds)
}

on @*:TEXT:password *:#: {
  var %pass = liam

  if ($2- == %pass) {
    var %timer = $+($chan,$chr(44),$nick)
    if ($timer(%timer)) .timer [ $+ [ %timer ] ] off
    /notice $nick Password accepted.
  }
}

on *:NICK: {
  var %chan = #fukliam, %timer = $+(%chan,$chr(44),$nick), %kick = $false
  if ($timer(%timer) && ($newnick ison %chan)) {
    ; if you want to kcik on a namechange, that's fine, or you can carry the timer over.
    if (%kick) { | ; kick on name change (change the %kick above to disable)
      .notice $newnick Mahahahahahaha trying to evade!
      /password_kick %chan $newnick
    }
    else {   | ; timer carry over
      var %newtimer = $+(%chan,$chr(44),$newnick)
      .timer [ $+ [ %newtimer ] ] 1 $timer(%timer).secs $replace($timer(%timer).com,$nick,$newnick)
      .timer [ $+ [ %timer ] ] off
      .notice $newnick Your name change has no effect on the privacy of this channel.
    }
  }
}

alias password_kick {
  var %chan = $1, %address = $2, %nick = $gettok(%address,1,33), %timer = $+(%chan,$chr(44),%nick)

  if ($timer(%timer)) .timer [ $+ [ %timer ] ] off

  /ban -ku3 %chan %nick 2 Removed.
}

Last edited by KingTomato; 18/07/06 08:50 PM.

-KingTomato