We consider a variation of the M/G/1 queue in which, when the system contains more than k customers, it switches from its initial general service distribution to a different general service distribution until the server is cleared, whereupon it switches back to the original service distribution. Using a technique due to Baccelli and Makowski we define a martingale with respect to an embedded process and from this arrive at a relationship between the process and a modified Markov renewal process. Using this an analysis of the stationary behaviour of the queue is possible.