In 1893 the plaintiff began the use of electricity for lighting his store upon the ground floor, and such use was continued until January 13,1903, when it was stopped until May 13, 1903, when it was renewed under the contract of that date. In May, 1902, the plaintiff made an extension of his wiring into the cellar of his store. A wire was attached to the inside wiring belonging to the plaintiff, near a door leading into the cellar, and was extended, in the form of a flexible cord about fifteen feet long, into the cellar. At the end of the cord was a lamp consisting of a socket and bulb. When not in use the cord was kept suspended over a hook. There was no fuse in any part of this extension, nor between it and the other wiring inside the plaintiff’s store. There was a switch near the top of the cellar stairs, which could be turned so as to light the lamp, and in using the lamp it was customary to turn on the light by means of this switch, take the flexible cord down from the hook and carry the lamp wherever needed in the cellar within the limit of the length of the cord. In making this extension the plaintiff did not ask leave of or notify the defendant. The inside wiring of the store, excepting fuses, was installed by the plaintiff, and all the wires, lamps and other paraphernalia inside the store excepting the fuses, fuse-box and meter were his. *497It was in dispute whether the defendant knew of the cellar lamp.
Under these circumstances, the contract of May 18,1903, was made. By its terms the defendant was to connect its electric system to the plaintiff’s store and furnish electric current for eight incandescent lamps, each of sixteen candle power, and was authorized by the plaintiff to set up in- convenient and suitable places on the premises the necessary transformers, meters and appliances; and it was further agreed that “ no change or alteration” should “ be made in the number of horse power of the motors, the number or candle power of the lamps, or the. wiring of the . . . premises, without first obtaining the written consent of the ” defendant. All lamps, meters, wires, and other appliances furnished by the company were to remain its property. It was further agreed “ that all wires upon the premises of the customer to which the company’s service will be connected, shall be so installed that the company may carry out this contract, and shall be kept in proper condition by the customer.” Then follows the provision that “ the customer will give, or obtain all necessary permission, to enable the agents of the company to carry out this contract and to enter the premises at all reasonable times, so long as any of the company’s property remains therein, for the purpose of keeping in repair or removing its property or inspecting its own or the customer’s wires or apparatus.”
We are of opinion that under this contract the defendant did not owe to the plaintiff the duty of inspecting the wires and apparatus belonging to him. The duty of beeping such wires and apparatus in proper condition rested upon him by the express language of the contract, and by necessary implication there was imposed upon him the obligation to use due care in its performance. It is plain that such care would involve proper inspection. The right reserved to the defendant to inspect the property of the plaintiff was not inserted for his protection but for that of the defendant. The provision gave to the defendant a right to be exercised in its own interest, and did not impose upon it a duty to be performed in the interest of the plaintiff. The fourteenth ruling requested by the defendant should therefore have been given. The question of the construction of the *498contract was for the court, and that portion of the charge which submitted to the jury the question whether the plaintiff had a right to assume that the defendant undertook under the contract the inspection of the premises, and which described the degree of care which would be required under that assumption was erroneous in law, and was prejudicial to the defendant upon a material point in its case.
In view of the conclusion to which we have come upon this branch of the case, it becomes unnecessary to consider at length the questions arising upon the other grounds of defence, inasmuch as it cannot now be foreseen what shape they may take at another trial. It may be stated however that the extension made in May, 1902, was in plain violation of the ordinance, since it was made without the written permission of the inspector of wires. § 9. The plaintiff thereby violated the ordinance within the meaning of § 14, which provides a penalty to be inflicted upon “ whoever violates ” any of its provisions. The case is clearly distinguishable from the class of cases of which Perry v. Bangs, 161 Mass. 35, upon which the plaintiff relies, is a type. It is further to be observed that while the violation of law by a defendant, although evidence of his negligence, is not conclusive even when the illegal act contributes to the injury, (Hanlon v. South Boston Horse Railroad, 129 Mass. 310, and cases there cited,) yet such violation on the part of the plaintiff, which contributes directly and proximately to the injury received by him, is in general a bar to his recovery. “ He is precluded from recovering, on the ground that the court will not lend its aid to one whose violation of law is the foundation of his claim.” Knowlton, J. in Newcomb v. Boston Protective Department, 146 Mass. 596, 602. See also cases cited in that case. Whether the plaintiff’s violation of law contributed to the accident, and whether there is or could be anything in the knowledge of the defendant which would estop it from setting up that defence, it is not profitable now to consider.
Exceptions sustained.