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:
parent
13d079ddaa
commit
6db8fe848c
14
plugins/ChatStart.rb
Normal file
14
plugins/ChatStart.rb
Normal 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
12
plugins/ascii.py
Normal 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)
|
Loading…
Reference in New Issue
Block a user