rendered paste body#!/usr/bin/ruby# auto greeter v0.1 by sevcsik, 2009include XChatRubyclass AutoGreet < XChatRubyPlugin def initialize @nicks = ["ragcsi", "norr5", "_dummy"] @channels = ["&bitlbee", "#i13tankor2009"] @greetings = ["hali", "hi", "szia :)", "hello"]; hook_server("JOIN", XCHAT_PRI_NORM, method(:join_cb), nil) puts "auto greeter v0.1 by <sevcsik> loaded" end def join_cb(words, words_eol, data) nick = words[0][1, words[0].index("!") - 1] channel = words[2][1..-1] if (@channels.include? channel and @nicks.include? nick) command "msg #{nick} " + @greetings[rand(@greetings.length)] print get_info("nick") + ": koszontel neki: #{nick} @ #{channel}" end endend