butler 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/GPL.txt +340 -0
- data/LICENSE.txt +52 -0
- data/README +37 -0
- data/Rakefile +334 -0
- data/bin/botcontrol +230 -0
- data/data/butler/config_template.yaml +4 -0
- data/data/butler/dialogs/backup.rb +19 -0
- data/data/butler/dialogs/botcontrol.rb +4 -0
- data/data/butler/dialogs/config.rb +1 -0
- data/data/butler/dialogs/create.rb +53 -0
- data/data/butler/dialogs/delete.rb +3 -0
- data/data/butler/dialogs/en/backup.yaml +6 -0
- data/data/butler/dialogs/en/botcontrol.yaml +5 -0
- data/data/butler/dialogs/en/create.yaml +11 -0
- data/data/butler/dialogs/en/delete.yaml +2 -0
- data/data/butler/dialogs/en/help.yaml +17 -0
- data/data/butler/dialogs/en/info.yaml +13 -0
- data/data/butler/dialogs/en/list.yaml +4 -0
- data/data/butler/dialogs/en/notyetimplemented.yaml +2 -0
- data/data/butler/dialogs/en/rename.yaml +3 -0
- data/data/butler/dialogs/en/start.yaml +3 -0
- data/data/butler/dialogs/en/sync_plugins.yaml +3 -0
- data/data/butler/dialogs/en/uninstall.yaml +5 -0
- data/data/butler/dialogs/en/unknown_command.yaml +2 -0
- data/data/butler/dialogs/help.rb +11 -0
- data/data/butler/dialogs/info.rb +27 -0
- data/data/butler/dialogs/interactive.rb +1 -0
- data/data/butler/dialogs/list.rb +10 -0
- data/data/butler/dialogs/notyetimplemented.rb +1 -0
- data/data/butler/dialogs/rename.rb +4 -0
- data/data/butler/dialogs/selectbot.rb +2 -0
- data/data/butler/dialogs/start.rb +5 -0
- data/data/butler/dialogs/sync_plugins.rb +30 -0
- data/data/butler/dialogs/uninstall.rb +17 -0
- data/data/butler/dialogs/unknown_command.rb +1 -0
- data/data/butler/plugins/core/logout.rb +41 -0
- data/data/butler/plugins/core/plugins.rb +134 -0
- data/data/butler/plugins/core/privilege.rb +103 -0
- data/data/butler/plugins/core/user.rb +166 -0
- data/data/butler/plugins/dev/eval.rb +64 -0
- data/data/butler/plugins/dev/nometa.rb +14 -0
- data/data/butler/plugins/dev/onhandlers.rb +93 -0
- data/data/butler/plugins/dev/raw.rb +36 -0
- data/data/butler/plugins/dev/rawlog.rb +77 -0
- data/data/butler/plugins/games/eightball.rb +54 -0
- data/data/butler/plugins/games/mastermind.rb +174 -0
- data/data/butler/plugins/irc/action.rb +36 -0
- data/data/butler/plugins/irc/join.rb +38 -0
- data/data/butler/plugins/irc/notice.rb +36 -0
- data/data/butler/plugins/irc/part.rb +38 -0
- data/data/butler/plugins/irc/privmsg.rb +36 -0
- data/data/butler/plugins/irc/quit.rb +36 -0
- data/data/butler/plugins/operator/deop.rb +41 -0
- data/data/butler/plugins/operator/devoice.rb +41 -0
- data/data/butler/plugins/operator/limit.rb +47 -0
- data/data/butler/plugins/operator/op.rb +41 -0
- data/data/butler/plugins/operator/voice.rb +41 -0
- data/data/butler/plugins/public/help.rb +69 -0
- data/data/butler/plugins/public/login.rb +72 -0
- data/data/butler/plugins/public/usage.rb +49 -0
- data/data/butler/plugins/service/clones.rb +56 -0
- data/data/butler/plugins/service/define.rb +47 -0
- data/data/butler/plugins/service/log.rb +183 -0
- data/data/butler/plugins/service/svn.rb +91 -0
- data/data/butler/plugins/util/cycle.rb +98 -0
- data/data/butler/plugins/util/load.rb +41 -0
- data/data/butler/plugins/util/pong.rb +29 -0
- data/data/butler/strings/random/acknowledge.en.yaml +5 -0
- data/data/butler/strings/random/gratitude.en.yaml +3 -0
- data/data/butler/strings/random/hello.en.yaml +4 -0
- data/data/butler/strings/random/ignorance.en.yaml +7 -0
- data/data/butler/strings/random/ignorance_about.en.yaml +3 -0
- data/data/butler/strings/random/insult.en.yaml +3 -0
- data/data/butler/strings/random/rejection.en.yaml +12 -0
- data/data/man/botcontrol.1 +17 -0
- data/lib/access.rb +187 -0
- data/lib/access/admin.rb +16 -0
- data/lib/access/privilege.rb +122 -0
- data/lib/access/role.rb +102 -0
- data/lib/access/savable.rb +18 -0
- data/lib/access/user.rb +180 -0
- data/lib/access/yamlbase.rb +126 -0
- data/lib/butler.rb +188 -0
- data/lib/butler/bot.rb +247 -0
- data/lib/butler/control.rb +93 -0
- data/lib/butler/dialog.rb +64 -0
- data/lib/butler/initialvalues.rb +40 -0
- data/lib/butler/irc/channel.rb +135 -0
- data/lib/butler/irc/channels.rb +96 -0
- data/lib/butler/irc/client.rb +351 -0
- data/lib/butler/irc/hostmask.rb +53 -0
- data/lib/butler/irc/message.rb +184 -0
- data/lib/butler/irc/parser.rb +125 -0
- data/lib/butler/irc/parser/commands.rb +83 -0
- data/lib/butler/irc/parser/generic.rb +343 -0
- data/lib/butler/irc/socket.rb +378 -0
- data/lib/butler/irc/string.rb +186 -0
- data/lib/butler/irc/topic.rb +15 -0
- data/lib/butler/irc/user.rb +265 -0
- data/lib/butler/irc/users.rb +112 -0
- data/lib/butler/plugin.rb +249 -0
- data/lib/butler/plugin/configproxy.rb +35 -0
- data/lib/butler/plugin/mapper.rb +85 -0
- data/lib/butler/plugin/matcher.rb +55 -0
- data/lib/butler/plugin/onhandlers.rb +70 -0
- data/lib/butler/plugin/trigger.rb +58 -0
- data/lib/butler/plugins.rb +147 -0
- data/lib/butler/version.rb +17 -0
- data/lib/cloptions.rb +217 -0
- data/lib/cloptions/adapters.rb +24 -0
- data/lib/cloptions/switch.rb +132 -0
- data/lib/configuration.rb +223 -0
- data/lib/dialogline.rb +296 -0
- data/lib/dialogline/localizations.rb +24 -0
- data/lib/durations.rb +57 -0
- data/lib/event.rb +295 -0
- data/lib/event/at.rb +64 -0
- data/lib/event/every.rb +56 -0
- data/lib/event/timed.rb +112 -0
- data/lib/installer.rb +75 -0
- data/lib/iterator.rb +34 -0
- data/lib/log.rb +68 -0
- data/lib/log/comfort.rb +85 -0
- data/lib/log/converter.rb +23 -0
- data/lib/log/entry.rb +152 -0
- data/lib/log/fakeio.rb +55 -0
- data/lib/log/file.rb +54 -0
- data/lib/log/filereader.rb +81 -0
- data/lib/log/forward.rb +49 -0
- data/lib/log/methods.rb +39 -0
- data/lib/log/nolog.rb +18 -0
- data/lib/log/splitter.rb +26 -0
- data/lib/ostructfixed.rb +26 -0
- data/lib/ruby/array/columnize.rb +38 -0
- data/lib/ruby/dir/mktree.rb +28 -0
- data/lib/ruby/enumerable/join.rb +13 -0
- data/lib/ruby/exception/detailed.rb +24 -0
- data/lib/ruby/file/append.rb +11 -0
- data/lib/ruby/file/write.rb +11 -0
- data/lib/ruby/hash/zip.rb +15 -0
- data/lib/ruby/kernel/bench.rb +15 -0
- data/lib/ruby/kernel/daemonize.rb +42 -0
- data/lib/ruby/kernel/non_verbose.rb +17 -0
- data/lib/ruby/kernel/safe_fork.rb +18 -0
- data/lib/ruby/range/stepped.rb +11 -0
- data/lib/ruby/string/arguments.rb +72 -0
- data/lib/ruby/string/chunks.rb +15 -0
- data/lib/ruby/string/post_arguments.rb +44 -0
- data/lib/ruby/string/unescaped.rb +17 -0
- data/lib/scheduler.rb +164 -0
- data/lib/scriptfile.rb +101 -0
- data/lib/templater.rb +86 -0
- data/test/cloptions.rb +134 -0
- data/test/cv.rb +28 -0
- data/test/irc/client.rb +85 -0
- data/test/irc/client_login.txt +53 -0
- data/test/irc/client_subscribe.txt +8 -0
- data/test/irc/message.rb +30 -0
- data/test/irc/messages.txt +64 -0
- data/test/irc/parser.rb +13 -0
- data/test/irc/profile_parser.rb +12 -0
- data/test/irc/users.rb +28 -0
- metadata +256 -0
data/test/cv.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'fastthread'
|
3
|
+
|
4
|
+
cv = ConditionVariable.new
|
5
|
+
mu = Mutex.new
|
6
|
+
th1 = Thread.new {
|
7
|
+
puts "a1 #{Time.now.sec}"
|
8
|
+
mu.synchronize {
|
9
|
+
puts "a2 #{Time.now.sec}"
|
10
|
+
sleep 2
|
11
|
+
cv.wait(mu)
|
12
|
+
puts "a3 #{Time.now.sec}"
|
13
|
+
}
|
14
|
+
puts "a4 #{Time.now.sec}"
|
15
|
+
}
|
16
|
+
th2 = Thread.new {
|
17
|
+
puts "b1 #{Time.now.sec}"
|
18
|
+
mu.synchronize {
|
19
|
+
puts "b2 #{Time.now.sec}"
|
20
|
+
sleep 4
|
21
|
+
cv.signal
|
22
|
+
puts "b3 #{Time.now.sec}"
|
23
|
+
sleep 2
|
24
|
+
}
|
25
|
+
puts "b4 #{Time.now.sec}"
|
26
|
+
}
|
27
|
+
th1.join
|
28
|
+
th2.join
|
data/test/irc/client.rb
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'fastthread'
|
3
|
+
require 'test/unit'
|
4
|
+
|
5
|
+
Thread.abort_on_exception = true
|
6
|
+
|
7
|
+
class IRCFileServer
|
8
|
+
def initialize(file, host="127.0.0.1", port=6667)
|
9
|
+
@serv = TCPServer.new(host, port)
|
10
|
+
Thread.new {
|
11
|
+
conn = @serv.accept
|
12
|
+
@thre = Thread.new {
|
13
|
+
File.foreach(file) { |line|
|
14
|
+
conn.write("#{line.chomp}\r\n")
|
15
|
+
}
|
16
|
+
}
|
17
|
+
while conn.gets("\r\n"); end
|
18
|
+
@thre.kill
|
19
|
+
conn.close
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
def join
|
24
|
+
@thre.join
|
25
|
+
end
|
26
|
+
|
27
|
+
def stop
|
28
|
+
@serv.close
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class TestMessage < Test::Unit::TestCase
|
33
|
+
def test_locking
|
34
|
+
assert(m = IRC::Client.new("127.0.0.1", :port => 9999))
|
35
|
+
th1 = Thread.new {
|
36
|
+
assert_equal("bar", m.synchronize(:foo) { sleep 2; "bar" })
|
37
|
+
}
|
38
|
+
sleep(0.1)
|
39
|
+
th2 = Thread.new {
|
40
|
+
assert_equal("baz", m.synchronize(:foo) { "baz" })
|
41
|
+
}
|
42
|
+
th3 = Thread.new {
|
43
|
+
assert_equal("quuz", m.synchronize(:quuz) { sleep 3; "quuz" })
|
44
|
+
}
|
45
|
+
sleep(0.1)
|
46
|
+
th4 = Thread.new {
|
47
|
+
assert_raise(Timeout::Error) { m.synchronize(:quuz, 1) { "quuz" }}
|
48
|
+
}
|
49
|
+
assert_equal("sleep", th2.status)
|
50
|
+
th1.join
|
51
|
+
th2.join
|
52
|
+
th3.join
|
53
|
+
th4.join
|
54
|
+
lock = m.instance_variable_get(:@locks)
|
55
|
+
assert(!lock.has_key?(:foo))
|
56
|
+
assert(!lock.has_key?(:quuz))
|
57
|
+
m.terminate(false)
|
58
|
+
end
|
59
|
+
|
60
|
+
def test_subscribe
|
61
|
+
server = IRCFileServer.new("#{File.dirname(__FILE__)}/client_subscribe.txt")
|
62
|
+
assert(i = IRC::Client.new("127.0.0.1"))
|
63
|
+
catch_all = []
|
64
|
+
catch_pm = []
|
65
|
+
i.subscribe { |l,e| catch_all << e }
|
66
|
+
i.subscribe(:PRIVMSG) { |l,e| catch_pm << e }
|
67
|
+
i.login("foo", "bar", "baz")
|
68
|
+
server.join
|
69
|
+
sleep(0.1)
|
70
|
+
i.terminate
|
71
|
+
assert_equal(8, catch_all.length)
|
72
|
+
assert_equal(2, catch_pm.length)
|
73
|
+
server.stop
|
74
|
+
end
|
75
|
+
|
76
|
+
def test_login
|
77
|
+
server = IRCFileServer.new("#{File.dirname(__FILE__)}/client_login.txt")
|
78
|
+
assert(client = IRC::Client.new("127.0.0.1"))
|
79
|
+
assert_nothing_raised {
|
80
|
+
client.login("foo", "bar", "baz")
|
81
|
+
}
|
82
|
+
client.terminate
|
83
|
+
server.stop
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
NOTICE AUTH :*** Looking up your hostname...
|
2
|
+
NOTICE AUTH :*** Checking ident
|
3
|
+
NOTICE AUTH :*** Found your hostname
|
4
|
+
NOTICE AUTH :*** No identd (auth) response
|
5
|
+
:kornbluth.freenode.net 433 * apeiros :Nickname is already in use.
|
6
|
+
:kornbluth.freenode.net 001 apeiros_ :Welcome to the freenode IRC Network apeiros_
|
7
|
+
:kornbluth.freenode.net 002 apeiros_ :Your host is kornbluth.freenode.net[freenode.freenode.net/6667], running version hyperion-1.0.2b
|
8
|
+
NOTICE apeiros_ :*** Your host is kornbluth.freenode.net[freenode.freenode.net/6667], running version hyperion-1.0.2b
|
9
|
+
:kornbluth.freenode.net 003 apeiros_ :This server was created Fri Dec 22 00:08:18 UTC 2006
|
10
|
+
:kornbluth.freenode.net 004 apeiros_ kornbluth.freenode.net hyperion-1.0.2b aAbBcCdDeEfFGhHiIjkKlLmMnNopPQrRsStTuUvVwWxXyYzZ01234569*@ bcdefFhiIklmnoPqstv
|
11
|
+
:kornbluth.freenode.net 005 apeiros_ IRCD=dancer CAPAB CHANTYPES=# EXCEPTS INVEX CHANMODES=bdeIq,k,lfJD,cgijLmnPQrRstz CHANLIMIT=#:20 PREFIX=(ov)@+ MAXLIST=bdeI:50 MODES=4 STATUSMSG=@ KNOCK NICKLEN=16 :are supported by this server
|
12
|
+
:kornbluth.freenode.net 005 apeiros_ SAFELIST CASEMAPPING=ascii CHANNELLEN=30 TOPICLEN=450 KICKLEN=450 KEYLEN=23 USERLEN=10 HOSTLEN=63 SILENCE=50 :are supported by this server
|
13
|
+
:kornbluth.freenode.net 251 apeiros_ :There are 16841 listed and 15777 unlisted users on 29 servers
|
14
|
+
:kornbluth.freenode.net 252 apeiros_ 40 :flagged staff members
|
15
|
+
:kornbluth.freenode.net 254 apeiros_ 13833 :channels formed
|
16
|
+
:kornbluth.freenode.net 255 apeiros_ :I have 5551 clients and 0 servers
|
17
|
+
:kornbluth.freenode.net 265 apeiros_ :Current local users: 5551 Max: 9700
|
18
|
+
:kornbluth.freenode.net 266 apeiros_ :Current global users: 32618 Max: 38201
|
19
|
+
:kornbluth.freenode.net 250 apeiros_ :Highest connection count: 9701 (9700 clients) (1932610 since server was (re)started)
|
20
|
+
:kornbluth.freenode.net 375 apeiros_ :- kornbluth.freenode.net Message of the Day -
|
21
|
+
:kornbluth.freenode.net 372 apeiros_ :- Welcome to kornbluth.freenode.net in Frankfurt, DE, EU.
|
22
|
+
:kornbluth.freenode.net 372 apeiros_ :- Thanks to Probe Networks (www.probe-networks.de) for
|
23
|
+
:kornbluth.freenode.net 372 apeiros_ :- sponsoring this server!
|
24
|
+
:kornbluth.freenode.net 372 apeiros_ :-
|
25
|
+
:kornbluth.freenode.net 372 apeiros_ :- KORNBLUTH, CYRIL M. [1923-1958]. Born in New York City and
|
26
|
+
:kornbluth.freenode.net 372 apeiros_ :- an active member of the Futurians, Cyril Kornbluth sold his
|
27
|
+
:kornbluth.freenode.net 372 apeiros_ :- first story professionally at age 15. By the 1940's his
|
28
|
+
:kornbluth.freenode.net 372 apeiros_ :- stories appeared widely under several pennames, including
|
29
|
+
:kornbluth.freenode.net 372 apeiros_ :- S.D. Gottesman and Cecil Corman. He left his university
|
30
|
+
:kornbluth.freenode.net 372 apeiros_ :- studies in Chicago to serve in the Army in Europe during
|
31
|
+
:kornbluth.freenode.net 372 apeiros_ :- WWII, then returned to school and work in Chicago until he
|
32
|
+
:kornbluth.freenode.net 372 apeiros_ :- began writing full-time in 1951. The author of .The Marching.
|
33
|
+
:kornbluth.freenode.net 372 apeiros_ :- .Morons. and the novels .The Space Merchants. (with Frederik
|
34
|
+
:kornbluth.freenode.net 372 apeiros_ :- Pohl) and .The Syndic., he's best known for his biting social
|
35
|
+
:kornbluth.freenode.net 372 apeiros_ :- satire and his collaborations with Pohl and with Judith
|
36
|
+
:kornbluth.freenode.net 372 apeiros_ :- Merril.
|
37
|
+
:kornbluth.freenode.net 372 apeiros_ :-
|
38
|
+
:kornbluth.freenode.net 372 apeiros_ :- You're using freenode, a service of Peer-Directed Projects
|
39
|
+
:kornbluth.freenode.net 372 apeiros_ :- Center (http://freenode.net/pdpc.shtml).
|
40
|
+
:kornbluth.freenode.net 372 apeiros_ :-
|
41
|
+
:kornbluth.freenode.net 372 apeiros_ :- Freenode runs an open proxy scanner. Your use of the network
|
42
|
+
:kornbluth.freenode.net 372 apeiros_ :- indicates your acceptance of this policy. For details on
|
43
|
+
:kornbluth.freenode.net 372 apeiros_ :- freenode network policy, please take a look at our policy
|
44
|
+
:kornbluth.freenode.net 372 apeiros_ :- page (http://freenode.net/policy.shtml). Thank you for using
|
45
|
+
:kornbluth.freenode.net 372 apeiros_ :- the network!
|
46
|
+
:kornbluth.freenode.net 372 apeiros_ :-
|
47
|
+
:kornbluth.freenode.net 372 apeiros_ :- Freenode is a service of Peer-Directed Projects Center, an
|
48
|
+
:kornbluth.freenode.net 372 apeiros_ :- IRS 501(c)(3) not-for-profit organization. Our yearly
|
49
|
+
:kornbluth.freenode.net 372 apeiros_ :- fundraiser will begin soon; if you'd like to donate early,
|
50
|
+
:kornbluth.freenode.net 372 apeiros_ :- please see http://freenode.net/pdpc_donations.shtml for more
|
51
|
+
:kornbluth.freenode.net 372 apeiros_ :- information. Thank you for using freenode!
|
52
|
+
:kornbluth.freenode.net 372 apeiros_ :-
|
53
|
+
:kornbluth.freenode.net 376 apeiros_ :End of /MOTD command.
|
@@ -0,0 +1,8 @@
|
|
1
|
+
:kornbluth.freenode.net 376 apeiros_ :End of /MOTD command.
|
2
|
+
:apeiros_!n=apeiros_@80-219-58-122.dclient.hispeed.ch JOIN :#rubygame
|
3
|
+
:kornbluth.freenode.net 332 apeiros_ #rubygame :rubygame.sourceforge.net, rubygame.wiki.sourceforge.net || a flexible ruby library for game development || Found a bug? --> http://sourceforge.net/tracker/?group_id=172781&atid=862994 || Want a feature? --> http://sourceforge.net/tracker/?group_id=172781&atid=862997
|
4
|
+
:kornbluth.freenode.net 333 apeiros_ #rubygame jacius 1179014790
|
5
|
+
:kornbluth.freenode.net 353 apeiros_ = #rubygame :apeiros_ entropy shevy apeiros +jacius @ChanServ kuja
|
6
|
+
:kornbluth.freenode.net 366 apeiros_ #rubygame :End of /NAMES list.
|
7
|
+
:manveru!n=manveru@pp101.opt2.point.ne.jp PRIVMSG #rubyforce :+?
|
8
|
+
:Aw0L_!n=awol@75-105-80-12.cust.wildblue.net PRIVMSG #ruby :-I'll think I'll give ruby a go
|
data/test/irc/message.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
class TestMessage < Test::Unit::TestCase
|
3
|
+
def test_members
|
4
|
+
m = IRC::Message.new(nil, nil, "rawmessage", nil, nil, nil)
|
5
|
+
assert_equal("rawmessage", m[:raw])
|
6
|
+
assert_equal("rawmessage", m.raw)
|
7
|
+
|
8
|
+
assert_raise(IndexError) { m[:foo] }
|
9
|
+
assert_raise(NoMethodError) { m[:foo] = "foo" }
|
10
|
+
assert_raise(NoMethodError) { m.foo }
|
11
|
+
assert_raise(NoMethodError) { m.foo = "foo" }
|
12
|
+
|
13
|
+
m.create_member(:foo, "foo")
|
14
|
+
assert_equal("foo", m[:foo])
|
15
|
+
assert_equal("foo", m.foo)
|
16
|
+
assert_raise(NoMethodError) { m[:foo] = "foo" }
|
17
|
+
assert_raise(NoMethodError) { m.foo = "foo" }
|
18
|
+
assert_raise(IndexError) { m.create_member(:foo, "foo") }
|
19
|
+
|
20
|
+
m.create_member(:bar, "bar", true)
|
21
|
+
assert_equal("bar", m[:bar])
|
22
|
+
assert_equal("bar", m.bar)
|
23
|
+
assert(m[:bar] = "bar2")
|
24
|
+
assert_equal("bar2", m[:bar])
|
25
|
+
assert_equal("bar2", m.bar)
|
26
|
+
assert(m.bar = "bar")
|
27
|
+
assert_equal("bar", m[:bar])
|
28
|
+
assert_equal("bar", m.bar)
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
NOTICE AUTH :*** Looking up your hostname...
|
2
|
+
NOTICE AUTH :*** Checking ident
|
3
|
+
NOTICE AUTH :*** Found your hostname
|
4
|
+
NOTICE AUTH :*** No identd (auth) response
|
5
|
+
:kornbluth.freenode.net 433 * apeiros :Nickname is already in use.
|
6
|
+
:kornbluth.freenode.net 001 apeiros_ :Welcome to the freenode IRC Network apeiros_
|
7
|
+
:kornbluth.freenode.net 002 apeiros_ :Your host is kornbluth.freenode.net[freenode.freenode.net/6667], running version hyperion-1.0.2b
|
8
|
+
NOTICE apeiros_ :*** Your host is kornbluth.freenode.net[freenode.freenode.net/6667], running version hyperion-1.0.2b
|
9
|
+
:kornbluth.freenode.net 003 apeiros_ :This server was created Fri Dec 22 00:08:18 UTC 2006
|
10
|
+
:kornbluth.freenode.net 004 apeiros_ kornbluth.freenode.net hyperion-1.0.2b aAbBcCdDeEfFGhHiIjkKlLmMnNopPQrRsStTuUvVwWxXyYzZ01234569*@ bcdefFhiIklmnoPqstv
|
11
|
+
:kornbluth.freenode.net 005 apeiros_ IRCD=dancer CAPAB CHANTYPES=# EXCEPTS INVEX CHANMODES=bdeIq,k,lfJD,cgijLmnPQrRstz CHANLIMIT=#:20 PREFIX=(ov)@+ MAXLIST=bdeI:50 MODES=4 STATUSMSG=@ KNOCK NICKLEN=16 :are supported by this server
|
12
|
+
:kornbluth.freenode.net 005 apeiros_ SAFELIST CASEMAPPING=ascii CHANNELLEN=30 TOPICLEN=450 KICKLEN=450 KEYLEN=23 USERLEN=10 HOSTLEN=63 SILENCE=50 :are supported by this server
|
13
|
+
:kornbluth.freenode.net 251 apeiros_ :There are 16841 listed and 15777 unlisted users on 29 servers
|
14
|
+
:kornbluth.freenode.net 252 apeiros_ 40 :flagged staff members
|
15
|
+
:kornbluth.freenode.net 254 apeiros_ 13833 :channels formed
|
16
|
+
:kornbluth.freenode.net 255 apeiros_ :I have 5551 clients and 0 servers
|
17
|
+
:kornbluth.freenode.net 265 apeiros_ :Current local users: 5551 Max: 9700
|
18
|
+
:kornbluth.freenode.net 266 apeiros_ :Current global users: 32618 Max: 38201
|
19
|
+
:kornbluth.freenode.net 250 apeiros_ :Highest connection count: 9701 (9700 clients) (1932610 since server was (re)started)
|
20
|
+
:kornbluth.freenode.net 375 apeiros_ :- kornbluth.freenode.net Message of the Day -
|
21
|
+
:kornbluth.freenode.net 372 apeiros_ :- Welcome to kornbluth.freenode.net in Frankfurt, DE, EU.
|
22
|
+
:kornbluth.freenode.net 372 apeiros_ :- Thanks to Probe Networks (www.probe-networks.de) for
|
23
|
+
:kornbluth.freenode.net 372 apeiros_ :- sponsoring this server!
|
24
|
+
:kornbluth.freenode.net 372 apeiros_ :-
|
25
|
+
:kornbluth.freenode.net 372 apeiros_ :- KORNBLUTH, CYRIL M. [1923-1958]. Born in New York City and
|
26
|
+
:kornbluth.freenode.net 372 apeiros_ :- an active member of the Futurians, Cyril Kornbluth sold his
|
27
|
+
:kornbluth.freenode.net 372 apeiros_ :- first story professionally at age 15. By the 1940's his
|
28
|
+
:kornbluth.freenode.net 372 apeiros_ :- stories appeared widely under several pennames, including
|
29
|
+
:kornbluth.freenode.net 372 apeiros_ :- S.D. Gottesman and Cecil Corman. He left his university
|
30
|
+
:kornbluth.freenode.net 372 apeiros_ :- studies in Chicago to serve in the Army in Europe during
|
31
|
+
:kornbluth.freenode.net 372 apeiros_ :- WWII, then returned to school and work in Chicago until he
|
32
|
+
:kornbluth.freenode.net 372 apeiros_ :- began writing full-time in 1951. The author of .The Marching.
|
33
|
+
:kornbluth.freenode.net 372 apeiros_ :- .Morons. and the novels .The Space Merchants. (with Frederik
|
34
|
+
:kornbluth.freenode.net 372 apeiros_ :- Pohl) and .The Syndic., he's best known for his biting social
|
35
|
+
:kornbluth.freenode.net 372 apeiros_ :- satire and his collaborations with Pohl and with Judith
|
36
|
+
:kornbluth.freenode.net 372 apeiros_ :- Merril.
|
37
|
+
:kornbluth.freenode.net 372 apeiros_ :-
|
38
|
+
:kornbluth.freenode.net 372 apeiros_ :- You're using freenode, a service of Peer-Directed Projects
|
39
|
+
:kornbluth.freenode.net 372 apeiros_ :- Center (http://freenode.net/pdpc.shtml).
|
40
|
+
:kornbluth.freenode.net 372 apeiros_ :-
|
41
|
+
:kornbluth.freenode.net 372 apeiros_ :- Freenode runs an open proxy scanner. Your use of the network
|
42
|
+
:kornbluth.freenode.net 372 apeiros_ :- indicates your acceptance of this policy. For details on
|
43
|
+
:kornbluth.freenode.net 372 apeiros_ :- freenode network policy, please take a look at our policy
|
44
|
+
:kornbluth.freenode.net 372 apeiros_ :- page (http://freenode.net/policy.shtml). Thank you for using
|
45
|
+
:kornbluth.freenode.net 372 apeiros_ :- the network!
|
46
|
+
:kornbluth.freenode.net 372 apeiros_ :-
|
47
|
+
:kornbluth.freenode.net 372 apeiros_ :- Freenode is a service of Peer-Directed Projects Center, an
|
48
|
+
:kornbluth.freenode.net 372 apeiros_ :- IRS 501(c)(3) not-for-profit organization. Our yearly
|
49
|
+
:kornbluth.freenode.net 372 apeiros_ :- fundraiser will begin soon; if you'd like to donate early,
|
50
|
+
:kornbluth.freenode.net 372 apeiros_ :- please see http://freenode.net/pdpc_donations.shtml for more
|
51
|
+
:kornbluth.freenode.net 372 apeiros_ :- information. Thank you for using freenode!
|
52
|
+
:kornbluth.freenode.net 372 apeiros_ :-
|
53
|
+
:kornbluth.freenode.net 376 apeiros_ :End of /MOTD command.
|
54
|
+
:NickServ!NickServ@services. NOTICE apeiros_ :This nickname is owned by someone else
|
55
|
+
:NickServ!NickServ@services. NOTICE apeiros_ :If this is your nickname, type /msg NickServ .IDENTIFY. <password>
|
56
|
+
:freenode-connect!freenode@freenode/bot/connect PRIVMSG apeiros_ :.VERSION.
|
57
|
+
:kornbluth.freenode.net 290 apeiros_ :IDENTIFY-MSG
|
58
|
+
:NickServ!NickServ@services. NOTICE apeiros_ :+Password accepted - you are now recognized
|
59
|
+
:services. MODE apeiros_ :+e
|
60
|
+
:apeiros_!n=apeiros_@80-219-58-122.dclient.hispeed.ch JOIN :#rubygame
|
61
|
+
:kornbluth.freenode.net 332 apeiros_ #rubygame :rubygame.sourceforge.net, rubygame.wiki.sourceforge.net || a flexible ruby library for game development || Found a bug? --> http://sourceforge.net/tracker/?group_id=172781&atid=862994 || Want a feature? --> http://sourceforge.net/tracker/?group_id=172781&atid=862997
|
62
|
+
:kornbluth.freenode.net 333 apeiros_ #rubygame jacius 1179014790
|
63
|
+
:kornbluth.freenode.net 353 apeiros_ = #rubygame :apeiros_ entropy shevy apeiros +jacius @ChanServ kuja
|
64
|
+
:kornbluth.freenode.net 366 apeiros_ #rubygame :End of /NAMES list.
|
data/test/irc/parser.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
class TestMessage < Test::Unit::TestCase
|
3
|
+
def test_members
|
4
|
+
channels = IRC::Channels.new(nil)
|
5
|
+
users = IRC::Users.new(nil)
|
6
|
+
users.create_myself("apeiros_")
|
7
|
+
parser = IRC::Parser.new(nil, users, channels)
|
8
|
+
raws = File.readlines("#{File.dirname(__FILE__)}/messages.txt")
|
9
|
+
raws.each { |raw|
|
10
|
+
assert(message = parser.server_message(raw.chomp))
|
11
|
+
}
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
$:.unshift(File.expand_path("#{File.dirname(__FILE__)}/../../lib"))
|
2
|
+
require 'irc/parser'
|
3
|
+
require 'pp'
|
4
|
+
|
5
|
+
channels = IRC::Channels.new(nil)
|
6
|
+
users = IRC::Users.new(nil)
|
7
|
+
users.create_myself("apeiros_")
|
8
|
+
parser = IRC::Parser.new(nil, users, channels)
|
9
|
+
|
10
|
+
100.to_i.times {
|
11
|
+
parser.server_message(":chris2!n=chris@p549D38A5.dip0.t-ipconnect.de PRIVMSG #ruby-lang :+hi apeiros")
|
12
|
+
}
|
data/test/irc/users.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
class TestUsers < Test::Unit::TestCase
|
3
|
+
def test_all
|
4
|
+
channels = IRC::Channels.new(nil)
|
5
|
+
users = IRC::Users.new(nil)
|
6
|
+
users.create_myself("butler")
|
7
|
+
myself = users.create("butler")
|
8
|
+
assert(users.myself == "butler")
|
9
|
+
assert(users.myself == myself)
|
10
|
+
assert(myself.add_channel(channels.create("#foo"), :joined))
|
11
|
+
|
12
|
+
assert(users.create("Nerd"))
|
13
|
+
assert(nerd = users.create("Nerd", "user", "host"))
|
14
|
+
assert(nerd.add_channel(channels.create("#foo"), :joined))
|
15
|
+
assert_equal("Nerd", nerd.nick)
|
16
|
+
assert_equal("user", nerd.user)
|
17
|
+
assert_equal("host", nerd.host)
|
18
|
+
assert(nerd.host)
|
19
|
+
assert_equal(:online, nerd.status)
|
20
|
+
assert_raise(RuntimeError) { nerd2 = users.create("Nerd", "user2", "host") }
|
21
|
+
assert(nerd2 = users.create("Nerd", "user2", "host"))
|
22
|
+
assert_equal(:mutated, nerd.status)
|
23
|
+
assert(nerd.common_channels?(myself))
|
24
|
+
assert(!nerd2.common_channels?(myself))
|
25
|
+
assert_equal(["#foo"], nerd.common_channels(myself))
|
26
|
+
assert_equal([], nerd2.common_channels(myself))
|
27
|
+
end
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,256 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
rubygems_version: 0.9.4
|
3
|
+
specification_version: 1
|
4
|
+
name: butler
|
5
|
+
version: !ruby/object:Gem::Version
|
6
|
+
version: 1.8.0
|
7
|
+
date: 2007-10-07 00:00:00 +02:00
|
8
|
+
summary: Butler - the IRC bot with class
|
9
|
+
require_paths:
|
10
|
+
- lib
|
11
|
+
email: apeiros@gmx.net
|
12
|
+
homepage: http://butler.rubyforge.org/
|
13
|
+
rubyforge_project: butler
|
14
|
+
description: Butler - the IRC bot with class
|
15
|
+
autorequire:
|
16
|
+
default_executable: botcontrol
|
17
|
+
bindir: bin
|
18
|
+
has_rdoc: true
|
19
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.8.0
|
24
|
+
version:
|
25
|
+
platform: ruby
|
26
|
+
signing_key:
|
27
|
+
cert_chain:
|
28
|
+
post_install_message:
|
29
|
+
authors:
|
30
|
+
- Stefan Rusterholz
|
31
|
+
files:
|
32
|
+
- CHANGELOG
|
33
|
+
- LICENSE.txt
|
34
|
+
- GPL.txt
|
35
|
+
- README
|
36
|
+
- Rakefile
|
37
|
+
- bin/botcontrol
|
38
|
+
- data/butler
|
39
|
+
- data/butler/config_template.yaml
|
40
|
+
- data/butler/dialogs
|
41
|
+
- data/butler/dialogs/backup.rb
|
42
|
+
- data/butler/dialogs/botcontrol.rb
|
43
|
+
- data/butler/dialogs/config.rb
|
44
|
+
- data/butler/dialogs/create.rb
|
45
|
+
- data/butler/dialogs/delete.rb
|
46
|
+
- data/butler/dialogs/en
|
47
|
+
- data/butler/dialogs/en/backup.yaml
|
48
|
+
- data/butler/dialogs/en/botcontrol.yaml
|
49
|
+
- data/butler/dialogs/en/create.yaml
|
50
|
+
- data/butler/dialogs/en/delete.yaml
|
51
|
+
- data/butler/dialogs/en/help.yaml
|
52
|
+
- data/butler/dialogs/en/info.yaml
|
53
|
+
- data/butler/dialogs/en/list.yaml
|
54
|
+
- data/butler/dialogs/en/notyetimplemented.yaml
|
55
|
+
- data/butler/dialogs/en/rename.yaml
|
56
|
+
- data/butler/dialogs/en/start.yaml
|
57
|
+
- data/butler/dialogs/en/sync_plugins.yaml
|
58
|
+
- data/butler/dialogs/en/uninstall.yaml
|
59
|
+
- data/butler/dialogs/en/unknown_command.yaml
|
60
|
+
- data/butler/dialogs/help.rb
|
61
|
+
- data/butler/dialogs/info.rb
|
62
|
+
- data/butler/dialogs/interactive.rb
|
63
|
+
- data/butler/dialogs/list.rb
|
64
|
+
- data/butler/dialogs/notyetimplemented.rb
|
65
|
+
- data/butler/dialogs/rename.rb
|
66
|
+
- data/butler/dialogs/selectbot.rb
|
67
|
+
- data/butler/dialogs/start.rb
|
68
|
+
- data/butler/dialogs/sync_plugins.rb
|
69
|
+
- data/butler/dialogs/uninstall.rb
|
70
|
+
- data/butler/dialogs/unknown_command.rb
|
71
|
+
- data/butler/plugins
|
72
|
+
- data/butler/plugins/core
|
73
|
+
- data/butler/plugins/core/logout.rb
|
74
|
+
- data/butler/plugins/core/plugins.rb
|
75
|
+
- data/butler/plugins/core/privilege.rb
|
76
|
+
- data/butler/plugins/core/user.rb
|
77
|
+
- data/butler/plugins/dev
|
78
|
+
- data/butler/plugins/dev/eval.rb
|
79
|
+
- data/butler/plugins/dev/nometa.rb
|
80
|
+
- data/butler/plugins/dev/onhandlers.rb
|
81
|
+
- data/butler/plugins/dev/raw.rb
|
82
|
+
- data/butler/plugins/dev/rawlog.rb
|
83
|
+
- data/butler/plugins/games
|
84
|
+
- data/butler/plugins/games/eightball.rb
|
85
|
+
- data/butler/plugins/games/mastermind.rb
|
86
|
+
- data/butler/plugins/irc
|
87
|
+
- data/butler/plugins/irc/action.rb
|
88
|
+
- data/butler/plugins/irc/join.rb
|
89
|
+
- data/butler/plugins/irc/notice.rb
|
90
|
+
- data/butler/plugins/irc/part.rb
|
91
|
+
- data/butler/plugins/irc/privmsg.rb
|
92
|
+
- data/butler/plugins/irc/quit.rb
|
93
|
+
- data/butler/plugins/operator
|
94
|
+
- data/butler/plugins/operator/deop.rb
|
95
|
+
- data/butler/plugins/operator/devoice.rb
|
96
|
+
- data/butler/plugins/operator/limit.rb
|
97
|
+
- data/butler/plugins/operator/op.rb
|
98
|
+
- data/butler/plugins/operator/voice.rb
|
99
|
+
- data/butler/plugins/public
|
100
|
+
- data/butler/plugins/public/help.rb
|
101
|
+
- data/butler/plugins/public/login.rb
|
102
|
+
- data/butler/plugins/public/usage.rb
|
103
|
+
- data/butler/plugins/service
|
104
|
+
- data/butler/plugins/service/clones.rb
|
105
|
+
- data/butler/plugins/service/define.rb
|
106
|
+
- data/butler/plugins/service/log.rb
|
107
|
+
- data/butler/plugins/service/svn.rb
|
108
|
+
- data/butler/plugins/util
|
109
|
+
- data/butler/plugins/util/cycle.rb
|
110
|
+
- data/butler/plugins/util/load.rb
|
111
|
+
- data/butler/plugins/util/pong.rb
|
112
|
+
- data/butler/strings
|
113
|
+
- data/butler/strings/random
|
114
|
+
- data/butler/strings/random/acknowledge.en.yaml
|
115
|
+
- data/butler/strings/random/gratitude.en.yaml
|
116
|
+
- data/butler/strings/random/hello.en.yaml
|
117
|
+
- data/butler/strings/random/ignorance.en.yaml
|
118
|
+
- data/butler/strings/random/ignorance_about.en.yaml
|
119
|
+
- data/butler/strings/random/insult.en.yaml
|
120
|
+
- data/butler/strings/random/rejection.en.yaml
|
121
|
+
- data/man
|
122
|
+
- data/man/botcontrol.1
|
123
|
+
- lib/access
|
124
|
+
- lib/access/admin.rb
|
125
|
+
- lib/access/privilege.rb
|
126
|
+
- lib/access/role.rb
|
127
|
+
- lib/access/savable.rb
|
128
|
+
- lib/access/user.rb
|
129
|
+
- lib/access/yamlbase.rb
|
130
|
+
- lib/access.rb
|
131
|
+
- lib/butler
|
132
|
+
- lib/butler/bot.rb
|
133
|
+
- lib/butler/control.rb
|
134
|
+
- lib/butler/dialog.rb
|
135
|
+
- lib/butler/initialvalues.rb
|
136
|
+
- lib/butler/irc
|
137
|
+
- lib/butler/irc/channel.rb
|
138
|
+
- lib/butler/irc/channels.rb
|
139
|
+
- lib/butler/irc/client.rb
|
140
|
+
- lib/butler/irc/hostmask.rb
|
141
|
+
- lib/butler/irc/message.rb
|
142
|
+
- lib/butler/irc/parser
|
143
|
+
- lib/butler/irc/parser/commands.rb
|
144
|
+
- lib/butler/irc/parser/generic.rb
|
145
|
+
- lib/butler/irc/parser.rb
|
146
|
+
- lib/butler/irc/socket.rb
|
147
|
+
- lib/butler/irc/string.rb
|
148
|
+
- lib/butler/irc/topic.rb
|
149
|
+
- lib/butler/irc/user.rb
|
150
|
+
- lib/butler/irc/users.rb
|
151
|
+
- lib/butler/plugin
|
152
|
+
- lib/butler/plugin/configproxy.rb
|
153
|
+
- lib/butler/plugin/mapper.rb
|
154
|
+
- lib/butler/plugin/matcher.rb
|
155
|
+
- lib/butler/plugin/onhandlers.rb
|
156
|
+
- lib/butler/plugin/trigger.rb
|
157
|
+
- lib/butler/plugin.rb
|
158
|
+
- lib/butler/plugins.rb
|
159
|
+
- lib/butler/version.rb
|
160
|
+
- lib/butler.rb
|
161
|
+
- lib/cloptions
|
162
|
+
- lib/cloptions/adapters.rb
|
163
|
+
- lib/cloptions/switch.rb
|
164
|
+
- lib/cloptions.rb
|
165
|
+
- lib/configuration.rb
|
166
|
+
- lib/dialogline
|
167
|
+
- lib/dialogline/localizations.rb
|
168
|
+
- lib/dialogline.rb
|
169
|
+
- lib/durations.rb
|
170
|
+
- lib/event
|
171
|
+
- lib/event/at.rb
|
172
|
+
- lib/event/every.rb
|
173
|
+
- lib/event/timed.rb
|
174
|
+
- lib/event.rb
|
175
|
+
- lib/installer.rb
|
176
|
+
- lib/iterator.rb
|
177
|
+
- lib/log
|
178
|
+
- lib/log/comfort.rb
|
179
|
+
- lib/log/converter.rb
|
180
|
+
- lib/log/entry.rb
|
181
|
+
- lib/log/fakeio.rb
|
182
|
+
- lib/log/file.rb
|
183
|
+
- lib/log/filereader.rb
|
184
|
+
- lib/log/forward.rb
|
185
|
+
- lib/log/methods.rb
|
186
|
+
- lib/log/nolog.rb
|
187
|
+
- lib/log/splitter.rb
|
188
|
+
- lib/log.rb
|
189
|
+
- lib/ostructfixed.rb
|
190
|
+
- lib/ruby
|
191
|
+
- lib/ruby/array
|
192
|
+
- lib/ruby/array/columnize.rb
|
193
|
+
- lib/ruby/dir
|
194
|
+
- lib/ruby/dir/mktree.rb
|
195
|
+
- lib/ruby/enumerable
|
196
|
+
- lib/ruby/enumerable/join.rb
|
197
|
+
- lib/ruby/exception
|
198
|
+
- lib/ruby/exception/detailed.rb
|
199
|
+
- lib/ruby/file
|
200
|
+
- lib/ruby/file/append.rb
|
201
|
+
- lib/ruby/file/write.rb
|
202
|
+
- lib/ruby/hash
|
203
|
+
- lib/ruby/hash/zip.rb
|
204
|
+
- lib/ruby/kernel
|
205
|
+
- lib/ruby/kernel/bench.rb
|
206
|
+
- lib/ruby/kernel/daemonize.rb
|
207
|
+
- lib/ruby/kernel/non_verbose.rb
|
208
|
+
- lib/ruby/kernel/safe_fork.rb
|
209
|
+
- lib/ruby/range
|
210
|
+
- lib/ruby/range/stepped.rb
|
211
|
+
- lib/ruby/string
|
212
|
+
- lib/ruby/string/arguments.rb
|
213
|
+
- lib/ruby/string/chunks.rb
|
214
|
+
- lib/ruby/string/post_arguments.rb
|
215
|
+
- lib/ruby/string/unescaped.rb
|
216
|
+
- lib/scheduler.rb
|
217
|
+
- lib/scriptfile.rb
|
218
|
+
- lib/templater.rb
|
219
|
+
- test/cloptions.rb
|
220
|
+
- test/cv.rb
|
221
|
+
- test/irc
|
222
|
+
- test/irc/client.rb
|
223
|
+
- test/irc/client_login.txt
|
224
|
+
- test/irc/client_subscribe.txt
|
225
|
+
- test/irc/message.rb
|
226
|
+
- test/irc/messages.txt
|
227
|
+
- test/irc/parser.rb
|
228
|
+
- test/irc/profile_parser.rb
|
229
|
+
- test/irc/users.rb
|
230
|
+
test_files: []
|
231
|
+
|
232
|
+
rdoc_options:
|
233
|
+
- --quiet
|
234
|
+
- --title
|
235
|
+
- Butler library API
|
236
|
+
- --main
|
237
|
+
- README
|
238
|
+
- --charset
|
239
|
+
- utf-8
|
240
|
+
- --inline-source
|
241
|
+
- --tab-width
|
242
|
+
- "2"
|
243
|
+
- --line-numbers
|
244
|
+
extra_rdoc_files:
|
245
|
+
- README
|
246
|
+
- CHANGELOG
|
247
|
+
- GPL.txt
|
248
|
+
- LICENSE.txt
|
249
|
+
executables:
|
250
|
+
- botcontrol
|
251
|
+
extensions: []
|
252
|
+
|
253
|
+
requirements: []
|
254
|
+
|
255
|
+
dependencies: []
|
256
|
+
|