Trying to join

By ChanZin on Apr 07, 2010

I created this script because +J mode from inspircd.

"J [sec]
m_kicknorejoin
Disallows a user from joining [sec] seconds after being /KICK'd"

This script keep trying to join a channel after you get kicked (all 5 seconds during 100 seconds). If it can't join, it will stop trying to join.

If you want to stop manually, type: /part #channel

on *:kick:#: {
  if ($knick == $me) {
    .set %kick. [ $+ [ $chan ] ] x
    .timer $+ $chan 10 5 .join $chan
  }
}
on me:*:join:#: {
  if (kick. [ $+ [ $chan ] ]) {
    .unset %kick. [ $+ [ $chan ] ] x
    .timer $+ $chan off
  }
}

alias /part {
  if (($$1 ischan) && (%kick. [ $+ [ $1 ] ])) {
    .unset %kick. [ $+ [ $1 ] ]
    .timer $+ $active off
  }
  else {
    .unset %kick. [ $+ [ $active ] ]
    .timer $+ $active off
  }
}

Comments

Sign in to comment.
ChanZin   -  Apr 07, 2010

Edited.

Thanks again. :-)

 Respond  
Jethro   -  Apr 07, 2010

You have to make it like this to work: > on me:*:join:#: {, or else it won't work.

 Respond  
ChanZin   -  Apr 07, 2010

Thanks Jethro_. I changed the code :-)

 Respond  
Jethro   -  Apr 07, 2010

I think the join event should have been:

on me:*:join:#: {

As you want it to trigger on yourself. And this:

  if (($$1 ischan) && (%kick. [ $+ [ $1 ] ])) {
    .unset %kick. [ $+ [ $1 ] ]
    .timer $+ $active off
  }
  else {
    .unset %kick. [ $+ [ $active ] ]
    .timer $+ $active off
  }
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.