Warning script

By xelent on Jul 22, 2008

Copy/Paste in remote (ALT+R)

Use !warn (reason)

on *:text:!warn *:#YourChannel: {
  if (!$2) {
    .notice $nick ERROR! use like this: !warn <nick> (reason)
  }
  else {
    if (%warn. [ $+ [ $address($nick,1) ] ] == 3) {
      mode $chan +b $2 1 1,15[2G1,15] Warning $chr(35) $+ 4 $3- 1,15[2W1,15] $2 Permban 1,15[2W1,15] 4/4 1,15[2W1,15]
      unset %warn. [ $+ [ $address($nick,1) ] ]
    }
    elseif (%warn. [ $+ [ $address($nick,1) ] ] == 2) {
      mode $chan +b $2 1 1,15[2W1,15] Warning $chr(35) $+ 3 $3- 1,15[2W1,15] $2 Ban 30 MIN 1,15[2W1,15] 3/4 1,15[2W1,15]
      inc %warn. [ $+ [ $address($2,1) ] ]        
    }
    elseif (%warn. [ $+ [ $address($2,1) ] ] == 1) {
      mode $chan +b $2 1 1,15[2G1,15] Warning $chr(35) $+ 2 $3- 1,15[2W1,15] $2 Ban 5 MIN1,15[2W1,15] 2/4 1,15[2W1,15]
      inc %warn. [ $+ [ $address($2,1) ] ]        
    }
    elseif (%warn. [ $+ [ $address($2,1) ] ] == $null) {
      set %warn. [ $+ [ $address($2,1) ] ] 1
      .msg $chan 1,15[2G1,15] Advarsel $chr(35) $+ 1 $3- 1,15[2W1,15] $2 None $3- 1,15[2G1,15] 1/4 1,15[2W1,15]
    }
  }
}

Comments

Sign in to comment.
Typo   -  Jul 22, 2008

This needs a little work, for instance, what is unsetting the bans? Also you could combine a lot of that and I noticed you left one line not in english.

Heres the idea to combine the lines but you can add your own timers to unset the bans.

on *:text:!warn *:#YourChannel: {
  if (!$2) { .notice $nick ERROR! use like this: !warn <nick> (reason) }
  else {
    var %warng = 1,15[2G1,15], %warnw = 1,15[2W1,15]
    var %warnm = Ban 5 MIN%warnw 2/4 %warnw^Ban 30 MIN %warnw 3/4 %warnw^Permban %warnw 4/4 %warnw
    if (%warn. [ $+ [ $address($nick,1) ] ] isnum 1-3) {
      mode $chan +b $2 1 %warng Warning $chr(35) $+ $calc($v2 + 1) $3- %warnw $2 $gettok(%warnm,$v2,94) 
      if ($v2 == 3,unset,$iif($v2 isnum 1-2, inc)) %warn. [ $+ [ $address($nick,1) ] ] }
    }
    elseif (%warn. [ $+ [ $address($2,1) ] ] == $null) {
      set %warn. [ $+ [ $address($2,1) ] ] 1
      .msg $chan %warng Warning $chr(35) $+ 1 $3- %warnw $2 None $3- %warng 1/4 %warnw
    }
  }
}

Thats 15 lines @ 749 bytes compared to 23 lines @ 1,108 bytes.
Don\'t forget you have nothing unsetting the bans so you need to address that before this script is even complete.

Good luck.

 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.