If you used the query one, like you said, then either open a query window to the bot and type !botoff, or else in the channel, type /msg botnick !botoff
I don't use Quakenet, so I have no idea if they have Chanserv. Do they? Or is it something else? If you're not sure, ask in #help on there. It sounds like they don't.
So, in that case, when the !boton trigger is done, the bot should authorize itself with L and then ask L to op it using the appropriate commands for both.