============================================================================================================================
Modification Title: Flood Control Override v1.0

Author: John Briggs

Last Updated: 4-09-10

Description:
This modification will allow staff members to be exempt by the flood control time settings.

Supported Version: XMB 1.9.5 SP1

Installation Note: Before adding this modification to your forum, you should back up all files related to this modification.

License Note: This modification is released under the GPL License. A copy is provided with this software package

Author Note:
For security purposes, Please Check: http://www.xmbgarage.com for the latest version of this modification.
Downloading this modification from other sites could cause malicious code to enter into your XMB Forum software.
As such, XMBGarage.com will not offer support for modifications not offered at our site.

Mod History:
3-13-05 - Version 1.0
- Initial commit.
3-31-06 - Version 1.0
- Updated for 1.9.5

============================================================================================================================
=======
Step 1:
=======
===============
Edit File: post.php
===============
==========
Find Code:
==========

        $query = $db->query("SELECT lastpost, type, fup FROM $table_forums WHERE fid='$fid'");
        $for = $db->fetch_array($query);

        if ( $for['lastpost'] != "") {
            $lastpost = explode("|", $for['lastpost']);
            $rightnow = time() - $floodctrl;

            if ( $rightnow <= $lastpost[0] && $username == $lastpost[1]) {
                error($lang['floodprotect'].' '.$floodlink.' '.$lang['tocont']);
            }
        }
        
================
Replace Code With:
================

        // Flood Control Override Mod Begin
        if (!X_STAFF) {
            $query = $db->query("SELECT lastpost, type, fup FROM $table_forums WHERE fid = '$fid'");
            $for = $db->fetch_array($query);

            if (!empty($for['lastpost'])) {
                $lastpost = explode("|", $for['lastpost']);
                $rightnow = time() - $floodctrl;

                if ($rightnow <= $lastpost['0'] && $username == $lastpost['1']) {
                    error($lang['floodprotect'].' '.$floodlink.' '.$lang['tocont']);
                }
            }
        }
        // Flood Control Override Mod End

==========
Find Code:
==========

        $query = $db->query("SELECT lastpost, type, fup FROM $table_forums WHERE fid='$fid'");
        $for = $db->fetch_array($query);
        $last = $for['lastpost'];

        if ( $last != "") {
            $lastpost = explode("|", $last);
            $rightnow = time() - $floodctrl;

            if ( $rightnow <= $lastpost[0] && $username == $lastpost[1]) {
                $floodlink = "<a href=\"viewthread.php?fid=$fid&tid=$tid\">Click here</a>";
                error($lang['floodprotect'].' '.$floodlink.' '.$lang['tocont']);
            }
        }

================
Replace Code With:
================

        // Flood Control Override Mod Begin
        if (!X_STAFF) {
            $query = $db->query("SELECT lastpost, type, fup FROM $table_forums WHERE fid = '$fid'");
            $for = $db->fetch_array($query);
            $last = $for['lastpost'];

            if (!empty($last)) {
            $lastpost = explode("|", $last);
            $rightnow = time() - $floodctrl;

                if ($rightnow <= $lastpost['0'] && $username == $lastpost['1']) {
                    $floodlink = "<a href=\"viewthread.php?fid=$fid&tid=$tid\">Click here</a>";
                    error($lang['floodprotect'].' '.$floodlink.' '.$lang['tocont']);
                }
            }
        }
        // Flood Control Override Mod End

============================================================================================================================
Enjoy!