Anti guest nicks

By no_body21 on Mar 20, 2007

Put it on your remotes and set it to enabled mode
It'll kick nicks that has guest on it's front and 5 numbers after that when they join your channel. Since, servers auto change nick when it's registered to other users to something like

Guest67892

so other nicks like
loveguest,imaguest won't be kick.

Comments

Sign in to comment.
Zarsen   -  Dec 11, 2009

Thank you Jethro_. Much appreciated.

 Respond  
Master-Of-Death   -  Dec 11, 2009

o.O? Jethro_ pls explain lol i'm a nub

 Respond  
Jethro   -  Dec 11, 2009

How about a timed kick if they don't change their nick after a minute or 2?This should do the trick (untested):

on *:KICK:#:.hdel guest $nick
on @*:JOIN:#: {
  if (%aguest) && ($regex($nick,/\A(guest\d{5})/i)) && (!$hget(time,$nick)) { 
    hadd -mz guest $nick 120
    .msg $chan $nick $+ , you have about 2 minutes to change your nick!
    .timercheck 1 120 kickguest
  }
  else { ban -ku300 $chan $nick 5 Change your nick before returning! }
}
alias -l kickguest {
  var %x = 1
  while ($hget(guest,%x).item) {
    if ($v1 ison $chan) {
      ban -ku300 $chan $v1 5 Failed to change nick!
    }
    inc %x
  }
}
menu menubar,channel {
  $iif(%aguest != $false,[On],[Off]) Anti Guests:{
    set %aguest $iif(%aguest == $false,$true,$false)
    echo -a  4Anti Guests kick is now $iif(%aguest == $true,Enabled,Disabled)
  }
}
 Respond  
Zarsen   -  Dec 10, 2009

How about a timed kick if they don't change their nick after a minute or 2?

 Respond  
Master-Of-Death   -  Nov 27, 2009

I never understand $regex i get confused by the parameters....

 Respond  
Jethro   -  Nov 25, 2009

This script can further be improved a bit from this:

on :join:#:{
if (%aguest) && (Guest
iswm $nick) && ($right($nick,5) isnum) {
if $me isop # {
ban -ku300 # $nick 5 Autokick Guest Nicks
}
}
}To this:

on @*:JOIN:#: {
  if (%aguest) && ($regex($nick,/\A(guest\d{5})/iS)) {
    ban -ku300 # $nick 5 Autokick Guest Nicks
  }
}

Where @ means $me isop # and by using regex, it's shorter than using iswm operator and $right() identifier.

 Respond  
termz   -  Nov 25, 2009

it works for me.

 Respond  
3nigmat1c   -  Nov 25, 2009

Have anyof you actually tried this? It doesnt work for me

 Respond  
Lindrian   -  Jul 14, 2007

The regex is not needed.
$iif($group(#guest) == on,.disable,.enable) #guest

 Respond  
Len   -  Jul 14, 2007

$iif($2 .. should be $1 same with the echo my bad

 Respond  
Len   -  Jul 14, 2007

guest off

on @*:join:#:{
if ($regex($nick,/^guest\d+/i)) { ban -k $chan $nick 3 No guests? }
}

guest end

alias guest {
if ($regex($1,/^(?:on|off)$/)) { $iif($2 == on,.enable,.disable) #guest | echo -ag Guest is now $2 $+ . }
}
or you could just ban guest* pointless script

 Respond  
no_body21   -  Mar 20, 2007

don\'t use groups too much `coz i dont want to many groups when all my snippets are on one script.

 Respond  
no_body21   -  Mar 20, 2007

On @*:JOIN:#:{

thought of this before i posted this snippet i\'m just used to use $me isop # hehehe maybe the else isn`t needed after all going to remove that.

about the menu i\'ll try that.

Thanks for your suggestions.

 Respond  
xDaeMoN   -  Mar 20, 2007

Some suggestions:

  1. No need for the \"else return\"
  2. Instead of
$me isop #

you can just use \"@\" in the ON Join event so it would look like this

On @*:JOIN:#:{

.

  1. You can also use Groups so you don\'t need the variables to enable/disable the event.
 Respond  
no_body21   -  Mar 20, 2007

Thanks for the fast scoring

 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.