Manual:$wgBadUserAgents

Details
User agent/range blocking Blocks all users using a particular user agent, possibly restricted to a set of IP ranges. Note: you can't block all user agents by leaving $wgBadUserAgents blank. That would block nothing.

This setting holds an array of user agents that should be automatically blocked.

e.g. array( 'OfflineExplorer/1.0' )