Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias LineCount {
- if (!%LineCount) { set %LineCount 0 }
- if (!%LineTimer) { set %LineTimer $uptime }
- inc %LineCount
- echo -a %LineCount lines in $calc($uptime - %LineTimer) seconds
- if ($calc($uptime - %LineTimer) < 20 ) && (%LineCount >= 15) {
- echo -a Limit reached
- unset %Line*
- set %LineLimit On
- .timer 1 8 set %LineLimit Off
- }
- elseif ($calc($uptime - %LineTimer) > 20 ) && (%LineCount < 15) {
- echo -a Limit not reached, resetting counter
- set %LineCount 1
- set %LineTimer $uptime
- }
- elseif ($calc($uptime - %LineTimer) > 20 ) && (%LineCount >= 15) {
- echo -a Limit not reached, resetting counter
- set %LineCount 1
- set %LineTimer $uptime
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement