He asking for a scripting help. I.e. he want to do it with plugin. Also non-permanent bans isn't written into that files so in general file reading will not work for all bans.
I'd say that this is possible but not that simple / not that reliable.
Method #1 (not that reliable but comparatively simple)
You have to send listid/listip command to a server using RCon protocol and sockets module and then parse/check recieved data.
Here are links that could be helpful to learn more about that.
RCon protocol details:
http://collective.valve-erc.com/inde...46620-20111500
Simple sockets tutorial:
http://forums.alliedmods.net/showthread.php?t=41913
HLTV RCon protocol/socket use code snippet:
http://forums.alliedmods.net/showpos...5&postcount=28
Method #2 (reliable but more complicated)
Alternatively you can parse memory or hook server console output "virtually" and parse it on listid/listip command execution but this is require more deep knowledge and separate amxx module/metamod plugin.