Class: EventMachine::IRC::Server
- Inherits:
-
Connection
- Object
- Connection
- EventMachine::IRC::Server
- Defined in:
- lib/eventmachine/irc/server.rb,
lib/eventmachine/irc/server/version.rb
Constant Summary collapse
- VERSION =
"0.0.1"- @@user_store =
SynchronizedStore.new
- @@channel_store =
SynchronizedStore.new
- @@config =
{ 'version' => '0.04dev', 'timeout' => 10, 'port' => 6667, 'hostname' => Socket.gethostname.split(/\./).shift, 'starttime' => Time.now.to_s, 'nick-tries' => 5 }
Instance Attribute Summary collapse
-
#channel_store ⇒ Object
readonly
Returns the value of attribute channel_store.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#user_store ⇒ Object
readonly
Returns the value of attribute user_store.
Class Method Summary collapse
Instance Method Summary collapse
- #channelmodes ⇒ Object
-
#initialize ⇒ Server
constructor
A new instance of Server.
- #post_init ⇒ Object
- #receive_data(data) ⇒ Object
- #unbind ⇒ Object
- #usermodes ⇒ Object
Constructor Details
#initialize ⇒ Server
741 742 743 744 745 |
# File 'lib/eventmachine/irc/server.rb', line 741 def initialize @user_store = @@user_store @channel_store = @@channel_store @config = @@config end |
Instance Attribute Details
#channel_store ⇒ Object (readonly)
Returns the value of attribute channel_store.
739 740 741 |
# File 'lib/eventmachine/irc/server.rb', line 739 def channel_store @channel_store end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
739 740 741 |
# File 'lib/eventmachine/irc/server.rb', line 739 def config @config end |
#user_store ⇒ Object (readonly)
Returns the value of attribute user_store.
739 740 741 |
# File 'lib/eventmachine/irc/server.rb', line 739 def user_store @user_store end |
Class Method Details
.channel_store ⇒ Object
731 732 733 |
# File 'lib/eventmachine/irc/server.rb', line 731 def self.channel_store @@channel_store end |
.config ⇒ Object
735 736 737 |
# File 'lib/eventmachine/irc/server.rb', line 735 def self.config @@config end |
.user_store ⇒ Object
727 728 729 |
# File 'lib/eventmachine/irc/server.rb', line 727 def self.user_store @@user_store end |
Instance Method Details
#channelmodes ⇒ Object
751 752 753 |
# File 'lib/eventmachine/irc/server.rb', line 751 def channelmodes return "bcdefFhiIklmnoPqstv" end |
#post_init ⇒ Object
755 756 757 |
# File 'lib/eventmachine/irc/server.rb', line 755 def post_init @client = ConnectedClient.new(self) end |
#receive_data(data) ⇒ Object
763 764 765 766 767 |
# File 'lib/eventmachine/irc/server.rb', line 763 def receive_data(data) data.split(/\n/).each do |line| @client.receive_data(line) end end |
#unbind ⇒ Object
759 760 761 |
# File 'lib/eventmachine/irc/server.rb', line 759 def unbind @client.handle_quit("disconnected...") end |
#usermodes ⇒ Object
747 748 749 |
# File 'lib/eventmachine/irc/server.rb', line 747 def usermodes return "aAbBcCdDeEfFGhHiIjkKlLmMnNopPQrRsStUvVwWxXyYzZ0123459*@" end |