contrib bots: Rename bots to follow a consistent pattern.
Files renamed without any changes.
This commit is contained in:
parent
e749ff8c92
commit
6dda0eb506
18 changed files with 0 additions and 0 deletions
Binary file not shown.
Before Width: | Height: | Size: 287 KiB |
Binary file not shown.
Before Width: | Height: | Size: 180 KiB |
Binary file not shown.
Before Width: | Height: | Size: 160 KiB |
Binary file not shown.
Before Width: | Height: | Size: 170 KiB |
|
@ -1,16 +0,0 @@
|
|||
About EncryptBot:
|
||||
EncryptBot Allows for quick ROT13 encryption in the middle of a chat.
|
||||
|
||||
What It Does:
|
||||
The bot encrypts any message sent to it on any stream it is subscribed to with ROT13.
|
||||
|
||||
How It Works:
|
||||
The bot will Use ROT13(A -> N, B -> O... and vice-versa) in a python
|
||||
implementation to provide quick and easy encryption.
|
||||
|
||||
How to Use:
|
||||
|
||||
-Send the message you want to encrypt, add @encrypt to the beginning.
|
||||
-The Encrypted message will be sent back to the stream the original
|
||||
message was posted in to the topic <sender-email>'s encrypted text.
|
||||
-Messages can be decrypted by sending them to EncryptBot in the same way.
|
|
@ -1,33 +0,0 @@
|
|||
import encrypt_bot
|
||||
|
||||
def test():
|
||||
for cmd, expected_response in sample_conversation():
|
||||
message = {'content': cmd, 'subject': 'foo',
|
||||
'display_recipient': 'bar'}
|
||||
|
||||
class ClientDummy(object):
|
||||
def __init__(self):
|
||||
self.output = ''
|
||||
|
||||
def send_message(self, params):
|
||||
self.output = params['content']
|
||||
handler = encrypt_bot.EncryptHandler()
|
||||
client_dummy = ClientDummy()
|
||||
handler.handle_message(message, client_dummy, '')
|
||||
if client_dummy.output != expected_response:
|
||||
raise AssertionError('''
|
||||
cmd: %s
|
||||
expected: %s
|
||||
but got : %s
|
||||
''' % (cmd, expected_response, client_dummy.output))
|
||||
|
||||
def sample_conversation():
|
||||
return [
|
||||
('@encrypt Please encrypt this', 'Encrypted/Decrypted text: Cyrnfr rapelcg guvf'),
|
||||
('@encrypt Let\'s Do It', 'Encrypted/Decrypted text: Yrg\'f Qb Vg'),
|
||||
('@encrypt ', 'Encrypted/Decrypted text: '),
|
||||
('@encrypt me&mom together..!!', 'Encrypted/Decrypted text: zr&zbz gbtrgure..!!'),
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
test()
|
Loading…
Add table
Add a link
Reference in a new issue