Former Massachusetts Sen. Scott Brown (R) may be opposed to signing a "people's pledge" against outside electoral spending now that he's preparing to run in New Hampshire, but he was singing the praises of that pledge as recently as last month, and even patted himself on the back for coming up with it.

Brown hatched the idea for the pledge and persuaded then-Democratic challenger Elizabeth Warren to sign on in their 2012 Senate contest. Once each had promised to take a financial hit if a third party ran a supporting ad, spending from outside groups in their race plummeted.

Though Brown lost that election, he's been talking up the pledge ever since. In February, he told students at Cornell University how successful it was, according to a video clip of the event provided to HuffPost. (Watch the video above.)

"The people's pledge was something where she and I agreed -- I came up with the idea actually in the last election," Brown said at a lecture on polarization in politics. "We didn't need another 30 to 40 million dollars coming in to distort our records and positions on things, so ... what we came up with was the people's pledge," he said.

Brown explained how the pledge had worked. "Let's say you're with the Cornell Agricultural Society, and you want to run an ad for me and against her," the former senator said. "Well, you could run that -- let's say you ran that ad for $100,000, and it was on Internet, TV or radio. Guess what? I would have to pay out of my campaign account as a penalty to a charity of her choice. And it worked," he said.

"There were two or three groups that did some ads against her or for me totaling up about $100,000," Brown added. "I ended up paying $50,000 into an autism group. And that was one way we're able to curtail the outside spending."

Last year, in a discussion at Amherst College, Brown said that his agreement with Warren had been "historic" and that he had long been "disturbed" by outside groups trying to take over election contests. He even singled out the billionaire Koch brothers, whose group Americans for Prosperity is already the biggest spender in New Hampshire targeting incumbent Sen. Jeanne Shaheen (D).

“I and [Warren] were very disgusted and deeply concerned about the groups that would come in and distort our records and positions on things -- those third-party super PACs in particular," Brown said. "We signed an agreement. It’s historic -- it’s the only one in the country -- that said that they can come in -- for example, the Koch brothers or a progressive group or the teachers' union or firefighters -- they could come in and play. But if they in fact benefit one candidate over the other, then the person who is [helped] by that ad has to pay half of the ad buy and put it towards a charity of the other person’s choice."

"It actually worked," Brown said. "So we spent $42 million -- I think my opponent spent a little more -- and can you imagine if we had another $50 million in negative ads out there?”

So far, Americans for Prosperity has spent some $700,000 in New Hampshire targeting Shaheen.