Skip to content

Commit fc39fd0

Browse files
LupulScIT-Raphael
authored andcommitted
Fix off-by-one error when unassigning users from ips
1 parent 2505645 commit fc39fd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

func/ip.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ decrease_ip_value() {
119119

120120
new_web=$((current_web - 1))
121121
check_ip=$(grep $sip $USER_DATA/web.conf |wc -l)
122-
if [ "$check_ip" -lt 2 ]; then
122+
if [[ $check_ip = 0 ]]; then
123123
new_usr=$(echo "$current_usr" |\
124124
sed "s/,/\n/g"|\
125125
sed "s/^$user$//g"|\

0 commit comments

Comments
 (0)