Hardware Reference
In-Depth Information
That's all we need. Fire up Profanity and verify with the /plugins command that
our agentbot.py plugin was loaded successfully. If Profanity says that no plugins
are installed, most likely your plugin contains an error and needs to be corrected.
Use the following command to check your plugin for Python syntax errors:
pi@raspberrypi ~ $ python -m py_compile ~/.local/share/profanity/plugins/
agentbot.py
Now activate the bot with /agentbot enable and send a message to a friend or wait
for them to message you. Either way hilarity ensues.
You now have good building blocks to create your own custom bot. By inspecting
the incoming messages for certain words, you could easily create a utility bot that
will e-mail files from your Pi, tell you the weather, and so on.
Keeping your conversations secret with
encryption
Profanity has another cool feature that sets it apart from the native chats of Facebook
and Google, namely Off-the-Record Messaging ( OTR ). This encryption protocol
allows you to send secret messages to your friends that even Facebook or Google
themselves wouldn't be able to decipher.
OTR support and plugins are available for many instant messaging applications, so
it is by no means a requirement for your friends to run Profanity on a Raspberry Pi.
Take a look at http://en.wikipedia.org/wiki/Off-the-Record_Messaging for
a partial list of client software. The following are the steps to send secret messages:
1. The first thing we're going to do is generate your private key for the chat
service over which you'd like to send encrypted messages, as each service
requires its own key. You can think of the private key as something that
will unlock your secret conversations.
Connect to your chat service of choice, then type the following command:
> /otr gen
2.
Now we can try to initiate an encrypted OTR conversation with this command:
> /otr start "Your Friend"
If your friend's client supports OTR, it should automatically detect that you
want to establish a secure channel and enable encryption.
 
Search WWH ::




Custom Search