diff --git a/plugins/ChatStart.rb b/plugins/ChatStart.rb new file mode 100644 index 00000000..3d77270f --- /dev/null +++ b/plugins/ChatStart.rb @@ -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 diff --git a/plugins/ascii.py b/plugins/ascii.py new file mode 100644 index 00000000..e37ed106 --- /dev/null +++ b/plugins/ascii.py @@ -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)