diff --git a/inc/bans.php b/inc/bans.php
index cf24f097..d860c02c 100644
--- a/inc/bans.php
+++ b/inc/bans.php
@@ -253,7 +253,7 @@ class Bans {
modLog('Created a new ' .
($length > 0 ? preg_replace('/^(\d+) (\w+?)s?$/', '$1-$2', until($length)) : 'permanent') .
' ban on ' .
- ($board ? '/' . $board . '/' : 'all boards') .
+ ($ban_board ? '/' . $ban_board . '/' : 'all boards') .
' for ' .
(filter_var($mask, FILTER_VALIDATE_IP) !== false ? "$mask" : $mask) .
' (#' . $pdo->lastInsertId() . ')' .