delivered the opinion of the court:
Quasi-public corporations are required to serve the inhabitants of the territory in which they operate, in the capacity for which they are organized, and in which they have secured a franchise, but have the right to prescribe for their convenience and security and the protection of the public such rules and regulations, with which their patrons must comply, as are reasonable and just. The reason for this rule is, that although gmsi-public corporations operating in cities, under a franchise obtained from municipal authorities, are organized for private gain, the consideration for permitting them to occupy the streets of towns and cities to carry on their business is, that thereby the inhabitants of such municipalities may be furnished with conveniences and necessaries; hence, it follows that in return for the right to install appliances in the public streets, they assume the duty to furnish the commodities conducted through such appliances, to the inhabitants of the city granting such right, without discrimination, and without denial except for good and sufficient cause. The Seaton Company is a corporation organized for the purpose of manufacturing and selling electric light and steam or water heat; has a' franchise from the city of Idaho Springs to carry on that business within its corporate limits; has installed pipes and other appliances in and under the streets through which to conduct the steam or water intended for heating purposes, and must, therefore, supply such of the inhabitants of that municipality with its products as comply with such rules and regulations of the company as it may lawfully impose; but such regulations must be reasonable, just and lawful; not capricious, arbitrary, *127oppressive or unreasonable; neither can they be discriminatory.— Watauga Water Co. v. Wolfe, 99 Tenn. 429; Shiras v. Ewing, 48 Kan. 170; Shepherd v. Milwaukee Gas Light Co., 6 Wis. 526; 20 Cyc. 1160-1162-1163; 2 Beach on Corporations, § 835; Portland Natural Gas Co. v. State, 135 Ind. 54; Haugen v. Albina Light & Water Co., 21 Ore. 411; Owensboro Gas L. Co. v. Hildebrand, 42 S. W. (Ky.) 351.
The first important question, then, to determine, is whether or not the condition imposed by the notice which the defendants served upon plaintiffs is reasonable. It is clear from its own reading that it is not. Plaintiffs are required to take electric current for lighting purposes as a condition precedent to being- furnished with steam for heat. This is simply coercion, and an attempt on the part of the defendants to compel the- plaintiffs to purchase electric current which they may not want or need. If they can be permitted to do this, then they can also say to plaintiffs, “We will not furnish you with electric current unless you also take steam.” It is their privilege to determine whether they desire one or both of the commodities which the Seaton Company manufactures and sells, and a condition which imposes an obligation to take both or neither, is not only unreasonable, but capricious, arbitrary, oppressive and discriminatory.
Counsel for defendants contend that generating electricity for light and power purposes, as stated in the answer, is the principal business of the Seaton Company, and that the exhaust steam which is used for supplying heat is a by-product produced by the generation ■ of electric current for light and power; that if the steam-heating proposition were to be run independently, it could not be operated at a profit, and that these circumstances and conditions must be considered in determining the reasonableness of *128the condition imposed by the notice, and that the defendants should not be compelled to furnish a by-product of the electric light plant, unless it is furnished in conjunction with the principal product, namely, electricity. While it is true that the Seaton Company is engaged in manufacturing and selling electric current and utilizes the exhaust steam from the plant used in manufacturing the electric current for the purpose of furnishing heat, the business of the Seaton Company, so far as these two products are concerned, is separate and distinct. It did not secure a franchise from the city merely to furnish heat from a by-product or exhaust steam, but obtained the right to place and maintain underground lines of pipe under and through the streets “for the purpose of conducting, transmitting and distributing heat, either hot water or steam, for the purchase and use by said city and the residents and citizens thereof.” It cannot excuse its proposed action on the ground that furnishing steam alone will entail a loss which can be avoided if electric current is also taken by the consumer for lighting purposes; neither will it be permitted to impose the condition that a consumer must purchase both of its products in order that its profits may be increased, or loss prevented. The fallacy of the argument of counsel is at once apparent when we come to consider the conditions to which it would lead if upheld. If the Seaton Company, in manufacturing electric current, generated an excess of steam, it could require patrons, or those who proposed to become patrons, to purchase steam as a condition precedent to being supplied with electric current, although they might not require or have any use for steam heat whatever, should the contention of counsel for defendants be. upheld. The results which could follow if defendants were permitted to enforce the condition of their *129notice, at once stamps it as unreasonable and unjust. The consumer has the right to determine for himself which commodity he will take. It must be borne in mind that what has been said, in passing upon the condition which the defendants sought to impose by the notice under consideration, is limited to that condition, under the facts of this case, relative to that subject.
It is next urged that the court erred in making the injunction permanent without testimony. A plaintiff need not prove what is alleged in his complaint, and admitted by the answer. — Cowan v. Cowan, 16 Colo. 335; Michael v. Mills, 22 Colo. 439.
The answer- admitted the notice set up in the complaint, and in addition alleged that it was the intention of the defendants to enforce its terms. The sole question presented to the court under the pleadings was, whether the condition which the defendants sought to impose by the notice was reasonable. On its face it is not, and it was incumbent upon the defense to plead facts which would justify the "condition which they sought to impose- upon the plaintiffs. If the defendants pleaded any such facts they should have introduced evidence to establish them, for the reason that the burden of proving a fact rests upon the one who asserts the affirmative of an issue. — Little Pittsburgh Cons. Mining Co. v. Little Chief Cons. Mining Co., 11 Colo. 223; 1 Greenleaf on Evidence, § 774.
They sought to present this issue by pleading facts to the effect that the exhaust steam from the plant was but a by-product, and utilized for furnishing heat, and that they could -not afford to furnish the latter to a patron unless he also purchased electric current for lighting purposes from them. If this was a good defense, it was affirmative in its nature, was controverted by plaintiffs, and the *130burden rested with defendants to establish it, and as they declined to offer any testimony, there was nothing for the court to consider on the subject of the reasonableness of the condition imposed by defendants imposing it. We have determined, however, that this defense was not good; and this brings us to á consideration of the next proposition urged by counsel for the defendant, to the effect that- a judgment on the pleadings should not have prevailed when an issue of fact tendered by the answer was undisposed of.
A motion for judgment upon the pleadings should be sustained when, under the admitted facts, the moving party would be entitled to judgment on the merits, without regard to what the findings might be upon the facts upon which issue is joined. — Mills v. Hart, 24 Colo. 505; Harris v. Harris, 9 Col. App. 211.
This proposition rules the case at bar. From what we have already said, any finding of fact which the court might have made after hearing testimony on the issues tendered by the portion of the answer under consideration, would not have affected the rights of the parties to the action, or authorized any judgment different from that pronounced on the facts conclusively established by the pleadings of the respective parties. This is not a. case where the defense interposed was defective, either in form or substance, but one where the facts therein stated could not affect the rights of the parties, whatever-the finding of the court thereon might have been, had testimony been introduced and considered. Aside from this, as already stated, 'the court properly disregarded this defense, when the defendants declined to introduce testimony to establish it, its averments being controverted by plaintiffs.
*131It is next urged that mandamus was the proper remedy and that injunction is not. The Seaton Company was already furnishing steam for heating to the plaintiffs, hut had notified them that after a certain date steam would he cut off, unless a condition, which we have determined could not be enforced, was complied with. Mandamus is a common-law remedy to compel action; injunction an equitable remedy to prevent action, and maintain the parties in statu quo; so that a person desiring a-commodity manufactured and sold by a <pmsi-public corporation may resort to mandamus to compel a supply when the supply has not yet been commenced; and in equity, when the supply is being furnished, to enjoin its stoppage. — 13 Ency. Pl. & Pr. 500; 20 Cyc. 1164; Golden Canal Co. v. Bright, 8 Colo. 144; Sickles v. Manhattan Gas Light Co., 66 How. Pr. 314.
The final question urged upon our attention is, that the court erred in sustaining the demurrer to the last defense. The weight of authority supports the rule that a champertous contract for the prosecution of a cause of action cannot be interposed as a defense, but can only be set up between the parties when the champertous agreement itself is sought to be enforced. — 6 Cyc. 881; 5 Ency. 830 et seq.; Hammon on Contracts, § 239 et seq., p. 429; Penn Co. v. Lombardo, 49 O. St. 1; Burns v. Scott, 117 U. S. 582; Forbes v. Mohr, 69 Kan. 342; Gage v. Downey, 79 Cal. 140; Currency M. Co. v. Bentley, 10 Col. App. 271.
There are, perhaps, some exceptions to this rule, but the case at bar does' not fall within any of them.
The judgment of the district court is affirmed.
Affirmed.
Chief Justice Campbell and Mr. Justice, Hill concur.