Nick Check

By UTUCS.com-Admin on Feb 07, 2004

This is basically a nick checker that will check nicks who enter a channel. You can set an allowed person with "/SETALLOWED." It is useful when you want your friends to join a channel without a key (+k).

; Edited to fix mistakes on March 16, 2004
;
; |\     | **************************************
; |  \   |  *    :: Development Box ::                           *
; |   \  |  * Code Example Taken From Hawkee.com     *
; |    \ |  * Forum                                                      *
; |     \|  * VERSION: 1.0                                           *
;  Nick    **************************************
;  Check
;
; Nick Check was to demonstrate the mIRC variable system
; and the $+ to remove the space. The code example has been
; taken from the Hawkee.com forum, but has, however, been
; modified for things
;
;************************************************
;* Edit the text variables below at your own    *
;* needs. You can remove the powered by.        *
;************************************************
; NOTE: Use $+ to remove the space.
ON !*:JOIN:#: {
  %INFO.VERSION = 1.0
  %INFO.NC = Nick Check
  %TEXT.WELCOME = Welcome to $chan $+ ! (Powered by %INFO.NC $+ )
  %TEXT.NONPERMIT = You are not permitted to be on this channel. (Powered by %INFO.NC $+ )
  ; Do not edit the rest of this.
  if ($istok(%allowed,$nick,32)) {
    msg $nick %TEXT.WELCOME
  }
  else {
    mode $chan +b $address($nick,3)
    kick $chan $nick %TEXT.NONPERMIT
  }
}
; Documentation: Use /SETALLOWED to set an allowed person to be on a channel.

alias setallowed {
  %allowed = %allowed $1
}

Comments

Sign in to comment.
Stewie1k94   -  Sep 08, 2012

I was thinking "That's a bit stupid", lol. You're welcome.

 Respond  
Jethro   -  Sep 08, 2012

Thanks. I wasn't aware of that. It's been revised.

 Respond  
Stewie1k94   -  Sep 08, 2012

Jethro, it looks like they're being kicked for being permitted on the channel

kick # $nick You're permitted to be on this channel.
 Respond  
Jethro   -  Sep 08, 2012

SupahNL, I don't suppose the author of this snippet is "alive" these days...probably gone for good. He was last seen active 7 years ago.

Anyway, here is the modification I made according to your request:

alias setallowed {
  var %file = file.txt
  if (!$read(%file,nw,$nick)) {
    write %file $nick
  }
  else echo 4 -at The nickname already exists!
}
on @*:join:#:{
  if ($read(file.txt,nw,$nick)) {
    msg $nick Welcome to # $+ !
    halt
  }
  inc $+(%,wk,$network,#,$site)
  if ($($+(%,wk,$network,#,$site),2) > 3) {
    ban -k # $nick 2
    unset $+(%,wk,$network,#,$site)
  }
  elseif ($($+(%,wk,$network,#,$site),2) == 3) {
    kick # $nick You're not permitted on this channel. $&
      This is your last warning!
  }
  elseif ($($+(%,wk,$network,#,$site),2) == 2) {
    kick # $nick You're not permitted on this channel.
  }
  else {
    kick # $nick You're not permitted on this channel.
  } 
}

It's the same command as the original snippet here, enter /setallowed . Now, make sure you change "file.txt" in the code to the one of your choice. Place all the allowed nicknames in the chosen text file one after another vertically.

 Respond  
SupahNL   -  Sep 08, 2012

hi,

i like this script, but is it possible to let it checkup names from a .txt file ?
and can the ban be after 3 kicks ? (or within certain time?)

 Respond  
UTUCS.com-Admin   -  Mar 16, 2004

Mistake fixed, please disregard the previous message.

 Respond  
UTUCS.com-Admin   -  Feb 07, 2004

That \"You are not permitted to be on this channel\" should be %TEXT.NONPERMIT -- Hawkee, please change it

 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.