I'm working with a old addon for auto identify and having issues.

From my Menubar popup when I click on:
.List stored nicknames:{ auto.ident -l }

a @window opens and I get the following error:
* /filter: unable to open file 'C:\Users\USERNAME\AppData\Roaming\mIRC\script\data\remotes\script\data\files\autoident.ini' (line 21, script2.tps)

Line 21 is as follows:
filter -fLg $ai.ini @auto-ident /^\[[^\[\]]++\]$/

Now, the path should be the following:
$scriptdirscript\data\files\autoident.ini

I believe the error has to do with the /^\[[^\[\]]++\]$/ code in Line 21 but I have no idea what any of that means and/or does. Any assistance with this is greatly appreciated.

Full code is below:

on *:load:{ writeini $ai.ini options nick enable }

alias -l ai.ini { return $qt($scriptdirscript\data\files\autoident.ini) }

alias auto.ident {
if ($1 == -a) {
if (($2) && ($3) && ($4)) { writeini $ai.ini $2 $3 $4 }
else { echo -a Please use in the format: /auto.ident -a server nickname password }
}
if ($1 == -ru) {
if (($2) && ($3)) { remini $ai.ini $2 $3 }
else { echo -a Please use in the format: /auto.ident -ru server nickname }
}
if ($1 == -rs) {
if (($2)) { remini $ai.ini $2 }
else { echo -a Please use in the format: /auto.ident -rs server }
}
if ($1 == -l) {
window -adl20k0S @auto-ident
titlebar @auto-ident $ai.ini
filter -fLg $ai.ini @auto-ident /^\[[^\[\]]++\]$/
}
if ($1 == -n) {
$iif($readini($ai.ini,options,nick) == enable,writeini $ai.ini options nick disable,writeini $ai.ini options nick enable)
}
if ($1 !isin -a -rs -ru -l -n) {
echo -a Please use in the form auto.ident [-a/-ru/-rs/-l]
echo -a -a = Add auto ident. Eg: /auto.ident -a server.com mynick password
echo -a -ru = Remove auto ident nickname. Eg: /auto.ident -ru server.com nickname
echo -a -rs = Remove auto ident server. Eg: /auto.ident -rs server.com
echo -a -l = List currently stored servers and Passwords. Used as: /audio.ident -l
echo -a -n = This will disable the auto nickname change when connecting to a server with a stored auto-identification. Used as: /auto.ident -n
echo -a You can use -n again to Re-enable the auto nickname change.
}
}

on *:connect:{
if ($ini($ai.ini,$server)) {
if ($readini($ai.ini,$server,$me) { msg nickserv identify $readini($ai.ini,$server,$me) | goto end }
else {
if ($readini($ai.ini,options,nick) == enable) {
nick $ini($ai.ini,$server,1)
msg nickserv identify $readini($ai.ini,$server,$me)
goto end
}
else { echo -a You have chosen not to change your nickname | goto end }
}
}
var %n = 1
while (%n <= $ini($ai.ini,0)) {
if ($gettok($server,2-,46) isin $ini($ai.ini,%n)) {
if ($readini($ai.ini,$ini($ai.ini,%n),$me)) { msg nickserv identify $readini($ai.ini,$ini($ai.ini,%n),$me) | goto end }
if ($ini($ai.ini,%n,0) == 0) { goto message1 }
else {
if ($readini($ai.ini,options,nick) == enable) {
nick $ini($ai.ini,%n,1) | msg nickserv identify $readini($ai.ini,$ini($ai.ini,%n),$ini($ai.ini,%n,1)) | goto end }
}
else { echo -a You have chosen not to change your nickname | goto end }
}
else { inc %n }
}
:message2
echo -a This server is not set to auto-identify any nicknames.
goto end
:message1
echo -a There are no nicknames stored for this server.
:end
}

menu @auto-ident {
dclick:{
loadbuf -rt $+ $remove($sline($active,1),[,]) $active $ai.ini
if (!$line($active,0)) aline $active * This item has no data.
}
}