Class: JoinPlugin

Inherits:
CrazyDoll::Plugin show all
Defined in:
lib/crazy_doll/plugins/join_plugin.rb

Instance Attribute Summary

Attributes inherited from CrazyDoll::Plugin

#line, #opts, #params

Instance Method Summary collapse

Methods inherited from CrazyDoll::Plugin

#c, config, #config, #current_channel, #current_nick, #custom_messages, #custom_messages_chan, #custom_messages_priv, #get, #initialize, #join, #parse_message, #post, #register_events, #register_keys, #reply, #reply_to, #reply_to_a_channel?, #say, #talked_with_me?

Constructor Details

This class inherits a constructor from CrazyDoll::Plugin

Instance Method Details

#get_joinObject



22
23
24
# File 'lib/crazy_doll/plugins/join_plugin.rb', line 22

def get_join
  (c.channels << opts.channel).uniq!
end

#get_rpl_welcomeObject



18
19
20
# File 'lib/crazy_doll/plugins/join_plugin.rb', line 18

def get_rpl_welcome
  join_all
end

#initObject



8
9
10
# File 'lib/crazy_doll/plugins/join_plugin.rb', line 8

def init
  c.channels = []
end

#join_allObject



12
13
14
15
16
# File 'lib/crazy_doll/plugins/join_plugin.rb', line 12

def join_all
  for channel,password in config.channels - c.channels
    join(channel, password)
  end
end

#join_channelObject



26
27
28
# File 'lib/crazy_doll/plugins/join_plugin.rb', line 26

def join_channel
  join(@params.channel)
end