1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Added ChatStart.rb and ascii.py plugins

This commit is contained in:
James Booth 2013-08-31 15:16:05 +01:00
parent 13d079ddaa
commit 6db8fe848c
2 changed files with 26 additions and 0 deletions

14
plugins/ChatStart.rb Normal file
View File

@ -0,0 +1,14 @@
module ChatStart
@@contacts = [
"\"Prof 2\"",
"prof3@panesar"
]
def self.prof_on_connect()
@@contacts.each { | contact |
Prof::send_line("/msg " + contact)
}
Prof::send_line("/win 1")
end
end

12
plugins/ascii.py Normal file
View File

@ -0,0 +1,12 @@
import prof
import subprocess
def prof_init(version, status):
prof.register_command("/ascii", 1, 1, "/ascii", "ASCIIfy a message", "ASCIIfy a message.", cmd_ascii)
def cmd_ascii(text):
recipient = prof.get_current_recipient()
if recipient:
proc = subprocess.Popen(['figlet', '--', text], stdout=subprocess.PIPE)
ascii_out = proc.communicate()[0].decode('utf-8')
prof.send_line(u'\u000A' + ascii_out)