Black_List

By Pwntage`Ninja on May 04, 2007

Easy to use black list script.

Kicks and bans users when:
-You join a channel
-Anyone joins a channel
-Anyone changes nicknames

But only if they match someone on your list.

The only thing different about this than most, is that it runs just on an access level.

I rarely look at other black list scripts, so I wouldn't know.

menu @Black_List {
  Delete:/Black_List.Del
  Add:/Black_List.Add
  Clear:/Black_List.Clear
  Enforce:/Black_List.Enforce
}
menu nicklist {
  -
  Add to Black_List:/.auser 69 $$1 | /Black_List.Enforce
  Delete from Black_List:/.ruser 69 $$1
  -
}
menu channel,nicklist {
  -
  Open Blacklist:/window -edolCk0 @Black_List -1 -1 200 200 | Black_List.Play
  -
}
alias -l Black_List.Play {
  renwin @Black_List @Black_List v1.0
  %i = 1
  While ($ulist(*,69,%i)) { aline @Black_List $ulist(*,69,%i) $iif($ulist(*,69,%i).info,$ulist(*,69,%i).info,.:No Reason:.) | inc %i }
}
alias -l Black_List.Del {
  If ($sline(@Black_List,1)) {
    %i = 1
    While ($sline(@Black_List,%i)) {
      .ruser 69 $gettok($sline(@Black_List,%i),1,32)
      inc %i
    }
    dline @Black_List $sline(@Black_List,1).ln $+ - $+ $sline(@Black_List,$sline(@Black_List,0)).ln
  }
}
alias -l Black_List.Add {
  set %y $$?="Enter nickname"
  If ($ulist(%y,69,1)) { unset %y | halt }
  set %m $$?="Reason? Optional"
  aline @Black_List %y $iif(%m,%m)
  .auser 69 %y $iif(%m,%m)
  unset %y %m
  Black_List.Enforce
}
alias -l Black_List.Clear {
  set %Y/N $input(Are you sure you wish to clear your Black_List? It will be lost forever.,yvgdw,@Black_List,Black_List)
  If (%Y/N = $no) { unset %Y/N | halt }
  If (%Y/N = $yes) {
    unset %Y/N
    .rlevel 69
    clear @Black_List
  }
}
alias -l Black_List.Enforce {
  %i = 1
  While ($chan(%i)) {
    %n = 1
    While ($ulist(*,69,%n)) {
      If ($ulist(*,69,%n) ison $chan(%i)) { mode $chan(%i) -Q | ban -k $chan(%i) $ulist(*,69,%n) 2 .:Black_Listed: $iif($ulist(*,69,%n).info,$ulist(*,69,%n).info $+ :.,:.) }
      inc %n
    }
    inc %i
  }
}
on 69:JOIN:#: { ban -k $chan $nick 2 .:Black_Listed:. }
on 69:NICK: { Black_List.Enforce }

Comments

Sign in to comment.
Joshuaxiong1   -  Oct 08, 2007

The list is not good and no reason can be added even thought in the box it say Reason:

 Respond  
Pass   -  May 04, 2007

er, minus the multiple good coding, as i added to that previous post during mid-thought. Also, if you were to change the black_list.add alias, don\'t forget to remove the local \"-l\" too.

 Respond  
Pass   -  May 04, 2007

Lindrian, one reason for the \'mode -Q\' would be to prevent any errors and have the script complete what it started. Otherwise what use is a script if it won\'t even kick because of a single mode? Not to mention the mode can be set, as well as unset by Ops, so why not use it? Good code.
Pwntage`Ninja, something that might help you, the scripter, would be changing the *.add alias from asking the user for their input to requiring a 1st parameter [ie /black_list.add ].
However, use your own discretion, and good code

 Respond  
Lindrian   -  May 04, 2007

you already know u dont need /\'s. Secondly, why do you /mode $chan(%i) -Q? That realy aint needed. I dont think you should change channel modes like that. (Even those its needed to be able to kick the user(s)).
Secondly, use var %var = value, instead of set.

IM also sure you would be able to make the menu a little mroe fancy, by using $iif etc.

Havent tested it, but it looks ok.

 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.