It's from "The Empire of Ants" by H.G. Wells.
Here is the paragraph it's in:
Captain Gerilleau, who was Holroyd's sole distraction from these physical distresses, developed into a formidable bore, telling the simple story of his heart's affections day by day, a string of anonymous women, as if he was telling beads. Sometimes he suggested sport, and they shot at alligators, and at rare intervals they came to human aggregations in the waste of trees, and stayed for a day or so, and drank and sat about, and, one night, danced with Creole girls, who found Holroyd's poor elements of Spanish, without either past tense or future, amply sufficient for their purposes. But these were mere luminous chinks in the long grey passage of the streaming river, up which the throbbing engines beat. A certain liberal heathen deity, in the shape of a demi-john, held seductive court aft, and, it is probable, forward.
I especially didn't understand the second part of the sentence:
held seductive court aft, and, it is probable, forward.
But if anyone can simplify the whole sentence for me, it'll be much appreciated.