Warn/Black list

By Aile on Oct 20, 2009

Been like two years since I last used this site, and didnt think my account still was on this xD well i just wanted to post a script, I made it for a clan but well they died so it has no use ^_^

--- 5 warns = Auto Kick when set and on join ---

--- NOTE: must type "/add (NickName)", those added will be only ones allowed to use, BUT you can change that too if you like, just replace "

if ($readini(addclan.ini,allowed,$address($nick,2)))

" with a different IF statement =) ---

-Following user must be on channel... To lazy to change it xD if you can feel free too idc :P
!addwarn "NickName"
!checkwarn "NickName"
!delwarn "NickName"

!addkick "Nick"
!delkick "Nick"
!checkkick "Nick"

""If your new to .ini's, they are simple, the script, once you use it will auto create the file, and to personally view, type

/run warn.ini
;;;;;;;;;;;;;;;;;;;;;; CREATED BY AILE ;;;;;;;;;;;;;;;;;;;;;;
  ;;;;;;;;;;;;;;;;;;;;   SwiftIRC    ;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;; Channel: #Aile  ;;;;;;;;;;;;;;;;;;;;;; 

on *:text:!acmbs:#:{
  if ($readini(addclan.ini,allowed,$address($nick,2))) {
    notice $nick 14Following commands are;12 !addkick NickName14,12 !checkkick NickName14,12 !delkick NickName
    notice $nick 14Following commands are;12 !addwarn NickName14,12 !checkwarn NickName14,12 !delwarn NickName
    notice nick For the "Warn" user must be in channel.
  }
}
on *:text:!addkick*:#:{
  if ($readini(addclan.ini,allowed,$address($nick,2))) {
    if ($readini(warn.ini,Kick,$address($2,3)) {
      notice $nick 12 $+ $2 Is already Blacklisted.
    }
    else {
      writeini warn.ini kick $2 $address($2,3)
      notice $nick 12 $+ $2 14Has been added to Blacklist.
    }
  }
}
on *:text:!delkick*:#:{
  if ($readini(addclan.ini,allowed,$address($nick,2))) {
    if ($readini(warn.ini,Kick,$address($2,3)) {
      remini warn.ini Kick $nick
      notice $nick 12 $+ $2 Is now removed Blacklist.
    }
    else {
      notice $nick 12 $+ $2 14Was not found on Blacklist.
    }
  }
}
on $*:text:/^[!@]checkkick/Si:#:{
  if ($nick isop $chan) {
    if ($readini(warn.ini,kick,$address($2,3))) {
      $iif($left($1,1) == @, msg $chan, .notice $nick) 4 $+ $2 14Address:12 $Readini(warn.ini,kick,$address($2,3)
    }
    else {
      $iif($left($1,1) == @, msg $chan, .notice $nick) 4 $+ $2 14was not found on Blacklist.
    }
  }
}
on *:text:!warn *:#:{
  if ($readini(addclan.ini,allowed,$address($nick,2))) {
    if ($readini(warn.ini,warned,$address($2,3))) {
      writeini warn.ini Warned $address($2,3) $iif($3-,$v1,No reason.)   
      writeini warn.ini level $address($2,3) $calc($Readini(warn.ini,level,$address($2,3)) + 1)) 
      msg $chan 4 $+ $2 $+ 's 14Current Warning Level:4 $Readini(warn.ini,level,$address($2,3)) $+ /5
    }
    else {
      writeini warn.ini Warned $address($2,3) $iif($3-,$v1,No reason.) 
      writeini warn.ini Level $address($2,3) 1
      msg $chan 4 $+ $2 14has been warned, Reason:4 $readini(warn.ini,warned,$address($2,3))
    }
    if ($readini(warn.ini,level,$address($2,3)) == 5) {
      ban -ku $chan $2 Too many warnings. Ask a Leader about being removed from Warning list.
    }
  }
}
alias warn {
  if ($readini(addclan.ini,allowed,$address($me,2))) {
    if ($readini(warn.ini,warned,$address($1,3))) {
      writeini warn.ini Warned $address($1,3) $iif($2-,$v1,No reason.)   
      writeini warn.ini level $address($1,3) $calc($Readini(warn.ini,level,$address($1,3)) + 1)) 
      msg $chan 4 $+ $1 $+ 's 14Current Warning Level:4 $Readini(warn.ini,level,$address($1,3)) $+ /5
    }
    else {
      writeini warn.ini Warned $address($1,3) $iif($2-,$v1,No reason.) 
      writeini warn.ini Level $address($1,3) 1
      msg $chan 4 $+ $1 14has been warned, Reason:4 $readini(warn.ini,warned,$address($1,3))
    }
    if ($readini(warn.ini,level,$address($1,3)) == 5) {
      ban -ku $chan $1 Too many warnings. Ask a Leader about being removed from Warning list.
    }
  }
}
on $*:text:/^[!@]checkwarn/Si:#:{
  if ($nick isop $chan) {
    if ($readini(warn.ini,warned,$address($2,3))) {
      $iif($left($1,1) == @, msg $chan, .notice $nick) 4 $+ $2 14has been warned for:4 $readini(warn.ini,warned,$address($2,3)) 14and has:4 $Readini(warn.ini,level,$address($2,3)) $+ /5 14warnings.
    }
    else {
      $iif($left($1,1) == @, msg $chan, .notice $nick) 4 $+ $2 14does not exsist Yet.
    }
  }
}
on *:text:!delwarn*:#:{
  if ($readini(addclan.ini,allowed,$address($nick,2))) {
    if ($readini(warn.ini,warned,$address($2,3))) {
      remini warn.ini Warned $address($2,3)
      remini warn.ini Level $address($2,3)
      msg $chan 4 $+ $2 14has been taken off warnning list.
    }
    else {
      notice $nick 4 $+ $2 Doesnt have any warnings.
    }
  }
}

on *:join:#:{
  if ($chan == #Yourchan) {
    if ($readini(warn.ini,level,$address($nick,3)) == 5) {
      ban -ku $chan $nick Too many warnings. Ask a Leader about being removed from Warning list.
    }
    elseif ($readini(Warn.ini,kick,$address($nick,3))) {
      ban -ku $chan $nick Blacklisted user detected.
    }
    else {
      halt
    }
  }
}
alias add {
  writeini addclan.ini allowed $address($1,2) $1
  notice $me $1 now added.
  notice $1 You have been Granted permission to use my "!addwarn" and "!addkick" commands, Please type /query $me to find out more, or simple type !acmbs.
}

Comments

Sign in to comment.
Aile   -  Oct 21, 2009

I just perfer .inis and ITs easier for me o.O

 Respond  
Ghost-writer   -  Oct 21, 2009

inis are easy.. writeini

 Respond  
SomeMessyScripter   -  Oct 20, 2009

I should learn how to use inis and hash tables n stuf :x

 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.