Every forum and every public site nowadays is under attack of spammers, so the only important thing you need to do, is to constantly watch your forums, delete improper posts and lock improper users. You can react only after that somebody has posted an improper content. Like Marsbar mentioned, if you would like to react before, install Premoderation add-on for certain users and new accounts.
In general, until URL is posted in clear text, it doesn't have spammers effect. They look only for hyperlinks (mostly). In miniBB, there is a setting called $allowHyperlinks (under setup_options.php). It defines the amount of messages user must post before he can post hyperlinks (and before posted URLs will be auto-converted to hyperlinks). In most cases setting this option is enough. On our forums, most of the spammers seeing they can't post hyperlinks, do not post quite often.