This is a simple automatic forwarding bot basing on python-jabberbot. Each message sent to this bot will be forwarded to its buddies. Although XMPP supports conferencing, I think this bot’s mode provides an easier approach to extend any peer-to-peer encrypted messaging into reliable conferences. This bot’s code is modified from an example code of python-jabberbot. The following is my code’s explanation.
广播类继承自JabberBot,初始化所做的是清除消息队列等一系列操作。
The class inherits from Jabberbot. Initialize to clear up message queue and others.
Timed 60s to send a regular message, and handle exit events. Seems XMPP protocol requires user acting within given period to avoid being kicked offline. That’s the purpose.