Simple Blacklist Script

By aWoL on Jun 24, 2008

Snippet does work, aslong as you set a variable for %staffchan.
A basic blacklist script, using the syntax:

[!@]blist add/del/check/reason #channel (reason)

And it also will part the channel if it is on it when the blist is added.

on $*:text:/^[!@]blist/Si:%staffchan: {
  set %out $iif($left($1,1) == @, msg $cha, notice $nick) {
   if ($2 == add) {
   set %blist [ $+ [ $3 ] ] true
   set %blistr [ $+ [ $3 ] ] $4- {
     if ($me !ison $3) { halt }
     elseif ($me ison $3) { msg $3 This Channel Has Been Blacklisted. | part $3 } }
    }
    elseif ($2 == del) {
   if (%blist [ $+ [ $3 ] ] == $null) { 
      %out This channel is not currently blacklisted. }
    elseif (%blist [ $+ [ $3 ] ] == true) {
      unset %blist [ $+ [ $3 ] ]
      %out You have Unblacklisted the channel: $3 $+ . }
     }
   elseif ($2 == check) {
    if (%blist [ $+ [ $3 ] ] == $null) { %out $3 is not currently blacklisted. }
    elseif (%blist [ $+ [ $3 ] ] == true) { %out $3 is currently blacklisted. }
  }
    elseif ($2 == reason) {
    if (%blist [ $+ [ $3 ] ] == $null) { %out this channel is not Blacklisted. | halt }
    if (%blist [ $+ [ $chan ] ] == true) {
       if (%blistr [ $+ [ $3 ] ] == $null) {
      %out Reason for the blacklist of $3 $+ : N/A 
         }
      elseif (%blistr [ $+ [ $3 ] ] != $null) {
     %out Reason for the blacklist of $3 $+ : %blistr [ $+ [ $3 ] ] }
     }
    }
   else {
    %out you specified an Invalid parameter.
    %out $2 must be either: add, delete, check or reason. | halt
  }
 }
}
on *:invite:#: { join $chan {
     if (%blist [ $+ [ $chan ] ] == $null) { halt }
    else{
      msg $chan This channel is blacklisted. | part $chan }
   }
}

Comments

Sign in to comment.
edward_cullen   -  Nov 20, 2008

when i used it it didnt do anything. i typed !blist add <#channameiwasblisting> then my reason and it did nothing.

 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.