moonbot 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/MoonBot/bot.rb +2 -5
- data/lib/MoonBot/plugins/auth.rb +4 -3
- data/lib/MoonBot/plugins/ping.rb +2 -2
- data/lib/MoonBot/version.rb +1 -1
- metadata +3 -3
data/lib/MoonBot/bot.rb
CHANGED
@@ -11,10 +11,7 @@ module MoonBot
|
|
11
11
|
|
12
12
|
def start
|
13
13
|
EventMachine.run do
|
14
|
-
@client = EventMachine.connect @host, @port, Client, Proc.new
|
15
|
-
message = message.split("\r\n")
|
16
|
-
message.each do {|m| self.handle m}
|
17
|
-
end
|
14
|
+
@client = EventMachine.connect @host, @port, Client, Proc.new {|m| handle m}
|
18
15
|
end
|
19
16
|
end
|
20
17
|
|
@@ -32,7 +29,7 @@ module MoonBot
|
|
32
29
|
end
|
33
30
|
|
34
31
|
def command message
|
35
|
-
self.client.send_data(message +
|
32
|
+
self.client.send_data(message + "\r\n")
|
36
33
|
end
|
37
34
|
|
38
35
|
end
|
data/lib/MoonBot/plugins/auth.rb
CHANGED
@@ -16,9 +16,10 @@ module MoonBot::Plugin
|
|
16
16
|
|
17
17
|
def send_auth
|
18
18
|
puts "Sending User Data"
|
19
|
-
|
20
|
-
|
21
|
-
@bot.
|
19
|
+
nick = "NICK #{@nick}"
|
20
|
+
user = "USER #{@login} 8 * : #{@name}"
|
21
|
+
@bot.command nick
|
22
|
+
@bot.command user
|
22
23
|
end
|
23
24
|
end
|
24
25
|
end
|
data/lib/MoonBot/plugins/ping.rb
CHANGED
data/lib/MoonBot/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moonbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-01-30 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|
16
|
-
requirement: &
|
16
|
+
requirement: &70138858589920 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70138858589920
|
25
25
|
description: Amazingly simple IRC bot that handles everything via plugins with the
|
26
26
|
exception of connecting.
|
27
27
|
email:
|