Support both nicks and channels

This is pretty much just what @eskil did in 2011 but with an option so that it is compatible with the previous interface.