All pastes #34037 Raw Edit

Miscellany

public ruby v1 · immutable
#34037 ·published 2005-12-18 07:30 UTC
rendered paste body
include XChatRubyclass Figlet < XChatRubyPlugin    def initialize    hook_command('Fig', XCHAT_PRI_NORM, method(:fig), 'Usage: /fig <message>')    hook_command('Figx', XCHAT_PRI_NORM, method(:figx), 'Usage: /figx <message>')    puts 'Loaded Figlet Plugin'  end    def fig(words, words_eol, data)    if words[1]      for line in `figlet "#{words_eol[1]}"`.split("\n")        command('msg ' + get_info('channel') + '  ' + line)      end    end    return XCHAT_EAT_ALL  end    def figx(words, words_eol, data)    if words[2]      message = words_eol[2]      for i in 0...words[1].to_i        message = `figlet "#{message}"`      end      for line in message.split("\n")        command('msg ' + get_info('channel') + '  ' + line)      end    end    return XCHAT_EAT_ALL  endend