on ^*:BAN:#: if ($nick == botnick) haltdef
This will block ALL the bans made by the bot. If you want only your specific masks not to show up, then you have several options:
1. if there aren't too many, just add them all in a variable, separated by a space:
on ^*:BAN:#: if ($istok($1,%masks,32)) haltdef
2. save them in a hashtable
on ^*:BAN:#: if ($hget(tablename,$1)) haltdef
I would stay away from textfiles/inifiles.
If the bot bans more than one address in a go, you'd have to test if this still works or if you need the on rawmode event.