# History

There's a room on StackOverflow in Russian where you can see such an interesting discussion:

Just because there are not enough real discussing in that room, @Grundy "plays ping-pong" to keep it unfrozen.

Implement a bot for StackExchange that posts "ping!" to the 115624 room if the previous message was "pong!" **(and posted by another user) and "pong!" if the previous message was "ping!" (and posted by another user). If you need a login and a password for SE account, use l and p.

**It should not reply to its own messages

# Rules

Code-golf: the shortest answer wins.

Nice golfing!

• The idea is kinda fun but could it be considered a borderline malicious code? Using sockpuppet accounts may also be a problem. (But I don't really know for sure.) – Arnauld Oct 28 at 18:38
• @Arnauld No. Firstly you can use your own account. And... using an additional account for your bot is not considered a violation if you don't break these rules. – Victor VosMottor Oct 28 at 18:51
• @Arnauld Sockpuppet accounts are allowed for chat bots (assuming they don't break any normal rules), but I would recommend creating your own chatroom for this, rather than spamming into a different chatroom (even if that's what the room is for) – caird coinheringaahing Oct 28 at 18:57
• Furthermore, I would highly recommend that you start using the Sandbox for your challenge ideas – caird coinheringaahing Oct 28 at 18:59
• I'd recommend posting the messages to room 1 (sandbox). You can put bots and do basically whatever you want there because it's just the place for anyone to test anything (that isn't spam/R/A of course) – HyperNeutrino Oct 28 at 19:41

from chatexchange.client import Client