Small Protection

By sukhbira on May 05, 2014

small protection from join flood notice flood and query flood

on @*:JOIN:#: {
  VAR %id = *!~*@* , %fa = $fulladdress
  IF (%fa iswm %id) {
    IF (%id. [ $+ [ $wildsite ] ] == $null) {
      SET -u10 %id. [ $+ [ $wildsite ] ] 1
      RETURN
    }
    ELSE { INC %id. [ $+ [ $wildsite ] ] }
    IF ((%id. [ $+ [ $wildsite ] ] > 3) && (%id-check == $null)) {
      SET -u8 %id-check 1
      raw -q mode # +bMR *!~*@* $wildsite
      .notice # Bans and modes auto set due to possible floods, please be patient. Thank you.
      .timer_id-flood 1 30 raw -q mode # -bMR *!~*@*
    }
  }
}

ON *:NOTICE:*:*: {
  ; Listens for any notices
  IF (%notice. [ $+ [ $wildsite ] ] == $null) {
    ; Checks if user has records of noticing you...
    SET -u8 %notice. [ $+ [ $wildsite ] ] 1
    RETURN
    ; If the user has no record, mIRC creates a variable for the user
  }
  ELSE { INC %notice. [ $+ [ $wildsite ] ] }
  ; If the user has a record, mIRC increases the variable by 1
  IF (%notice. [ $+ [ $wildsite ] ] > 13 && %notice.check == $null) {
    ; Checks if user has 3 or more notices recorded
    ; Also checks if %notice.check is set, used to prevent from flooding yourself
    ; You may change 3 to something that fits your needs, dont set it too low
    SET -u6 %notice.check 1
    .ignore -nu15 $wildsite
    echo -s *** Notice flood from $wildsite - Ignoring notices for 45secs...
    ; Ignore's user's host for 45 seconds...
    ; You may change 45 to anything you wish
  }
}
ON ^*:OPEN:?: {
  ; mIRC listens for new query windows with a message
  IF ($query(0) > 2) {
    ; Checks if you have more than 6 queries open
    ; You can change 5 to your liking, it shouldn't be set too low
    .ignore -pu45 *
    ; You can change 45 to fit your needs...
    silence + $+ $wildsite
    ; Not all networks support this, comment it out if you're unsure
    echo -a Query window flood detected, ignoring messages for 45 seconds...
    ; mIRC ignore's messages and silences the user's host
    close -m
    ; Closes all open query windows
    haltdef
    ; Stops this current query window from opening
  }
}

Comments

Sign in to comment.
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.