butler 1.8.1 → 1.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/CHANGELOG.txt +212 -0
  2. data/{README → README.txt} +0 -0
  3. data/Rakefile +16 -11
  4. data/bin/botcontrol +35 -14
  5. data/data/butler/dialogs/create.rb +29 -40
  6. data/data/butler/dialogs/create_config.rb +1 -1
  7. data/data/butler/dialogs/dir.rb +13 -0
  8. data/data/butler/dialogs/en/create.yaml +24 -10
  9. data/data/butler/dialogs/en/dir.yaml +5 -0
  10. data/data/butler/dialogs/en/help.yaml +28 -11
  11. data/data/butler/dialogs/en/quickcreate.yaml +14 -0
  12. data/data/butler/dialogs/help.rb +16 -4
  13. data/data/butler/dialogs/quickcreate.rb +49 -0
  14. data/data/butler/plugins/core/access.rb +211 -0
  15. data/data/butler/plugins/core/logout.rb +11 -11
  16. data/data/butler/plugins/core/plugins.rb +23 -41
  17. data/data/butler/plugins/dev/bleakhouse.rb +46 -0
  18. data/data/butler/plugins/games/roll.rb +1 -1
  19. data/data/butler/plugins/operator/deop.rb +15 -20
  20. data/data/butler/plugins/operator/devoice.rb +14 -20
  21. data/data/butler/plugins/operator/limit.rb +56 -21
  22. data/data/butler/plugins/operator/op.rb +15 -20
  23. data/data/butler/plugins/operator/voice.rb +15 -20
  24. data/data/butler/plugins/service/define.rb +3 -3
  25. data/data/butler/plugins/service/more.rb +40 -0
  26. data/data/butler/plugins/util/cycle.rb +1 -1
  27. data/data/butler/plugins/util/load.rb +5 -5
  28. data/data/butler/plugins/util/pong.rb +3 -2
  29. data/lib/access/privilege.rb +17 -0
  30. data/lib/access/role.rb +33 -2
  31. data/lib/access/savable.rb +6 -0
  32. data/lib/access/yamlbase.rb +1 -2
  33. data/lib/butler/bot.rb +40 -7
  34. data/lib/butler/debuglog.rb +17 -0
  35. data/lib/butler/dialog.rb +1 -1
  36. data/lib/butler/irc/{channels.rb → channellist.rb} +2 -2
  37. data/lib/butler/irc/client.rb +60 -79
  38. data/lib/butler/irc/client/filter.rb +12 -0
  39. data/lib/butler/irc/client/listener.rb +55 -0
  40. data/lib/butler/irc/client/listenerlist.rb +69 -0
  41. data/lib/butler/irc/hostmask.rb +31 -16
  42. data/lib/butler/irc/message.rb +3 -3
  43. data/lib/butler/irc/parser.rb +2 -2
  44. data/lib/butler/irc/parser/rfc2812.rb +2 -6
  45. data/lib/butler/irc/socket.rb +12 -6
  46. data/lib/butler/irc/string.rb +4 -0
  47. data/lib/butler/irc/user.rb +0 -6
  48. data/lib/butler/irc/{users.rb → userlist.rb} +2 -2
  49. data/lib/butler/irc/whois.rb +6 -0
  50. data/lib/butler/plugin.rb +48 -14
  51. data/lib/butler/plugin/configproxy.rb +20 -0
  52. data/lib/butler/plugin/mapper.rb +308 -24
  53. data/lib/butler/plugin/matcher.rb +3 -1
  54. data/lib/butler/plugin/more.rb +65 -0
  55. data/lib/butler/plugin/onhandlers.rb +4 -4
  56. data/lib/butler/plugin/trigger.rb +4 -2
  57. data/lib/butler/plugins.rb +1 -1
  58. data/lib/butler/session.rb +11 -0
  59. data/lib/butler/version.rb +1 -1
  60. data/lib/cloptions.rb +1 -1
  61. data/lib/diagnostics.rb +20 -0
  62. data/lib/dialogline.rb +1 -1
  63. data/lib/durations.rb +19 -6
  64. data/lib/event.rb +8 -5
  65. data/lib/installer.rb +10 -3
  66. data/lib/ostructfixed.rb +11 -0
  67. data/lib/ruby/kernel/daemonize.rb +1 -2
  68. data/test/butler/plugin/mapper.rb +46 -0
  69. metadata +28 -11
  70. data/CHANGELOG +0 -44
  71. data/data/butler/plugins/core/privilege.rb +0 -103
data/CHANGELOG DELETED
@@ -1,44 +0,0 @@
1
- = Butler2
2
-
3
- === 12th Oct, 2007
4
- * Butler 1.8.1
5
- * botcontrol
6
- * New flag -l (lowercased L) overrides config and connects locally.
7
- * Setup now allows to set botcontrol up for another user
8
- * Fixed permissions of directories created for a user
9
- * Log now uses logger instead of log_device, changes due to that in:
10
- * lib/butler.rb
11
- * lib/butler/bot.rb
12
- * lib/butler/irc/socket.rb
13
- * lib/butler/plugin.rb
14
- * lib/irc/client.rb
15
- * lib/log/comfort.rb
16
- * lib/butler/irc/client.rb:
17
- * Adapted to new Commands requiring specification of command-sets
18
- * Added #load_command_set
19
- * lib/butler/irc/parser/rfc2812.rb: Added, moved rfc2812 commands to it.
20
- * lib/butler/irc/parser/generic.rb:
21
- * moved rfc2812 commands to rfc2812.rb
22
- * Added 396 RPL_HIDDENHOST
23
- * lib/butler/irc/parser/commands.rb:
24
- * Now loads only command-sets as specified
25
- * Added #load, to post-load command-sets
26
- * Added logging
27
- * Added a warning if matching of a message fails
28
- * lib/butler/irc/user.rb: Added #force_update.
29
- * lib/butler/irc/parser.rb:
30
- * Fixed logging of ParseErrors (forgot to initialize_details)
31
- * Adapted to new Commands requiring specification of command-sets
32
- * lib/configuration.rb: Changed separator from . to / to increase consistence.
33
- * lib/log.rb: More documentation.
34
- * lib/log/comfort.rb: Added #log_origin
35
- * lib/log/entry.rb: Supports origin now.
36
- * lib/butler.rb: Fixed a bug (::start wouldn't pass on the options param)
37
- * lib/irc/client.rb: Now uses options[:server] if available
38
- * lib/ruby/exception/detailed.rb: Hardened against misuse.
39
- * lib/butler/irc/client.rb: Fixed a bug (forgot to include Log::Comfort)
40
- * Rakefile: Added :website_docs task.
41
- * README: updated.
42
-
43
- === 7th Oct, 2007
44
- * Initial release of Butler2. Butler 1.8.x series is the alpha series of Butler2.
@@ -1,103 +0,0 @@
1
- #--
2
- # Copyright 2007 by Stefan Rusterholz.
3
- # All rights reserved.
4
- # See LICENSE.txt for permissions.
5
- #++
6
-
7
-
8
-
9
- trigger "privilege"
10
-
11
- def on_trigger
12
- case @message.arguments[1] && @message.arguments[1].downcase
13
- when "create"
14
- name, pass, active = @message.arguments[2,3]
15
- active = active && !%(false off).include?(active.downcase)
16
- return answer(usage) unless name and pass
17
- if @butler.access.user.exists?(name) then
18
- answer(:exists, :name => name)
19
- else
20
- @butler.access.user.create(name, pass, nil, false, :active => active)
21
- answer(:created, :name => name)
22
- end
23
-
24
- when "delete"
25
- return answer(usage) unless name = @message.arguments[2]
26
- if @butler.access.user.exists?(name) then
27
- @butler.access.user.delete(name)
28
- answer(:deleted)
29
- else
30
- answer(:doesnt_exist, :name => name)
31
- end
32
-
33
- when "activate"
34
- return answer(usage) unless name = @message.arguments[2]
35
- if @butler.access.user.exists?(name) then
36
- @butler.access.user[name].activate
37
- answer(:activated)
38
- else
39
- answer(:doesnt_exist, :name => name)
40
- end
41
-
42
- when "deactivate"
43
- return answer(usage) unless name = @message.arguments[2]
44
- if @butler.access.user.exists?(name) then
45
- @butler.access.user[name].deactivate
46
- answer(:deactivated)
47
- else
48
- answer(:doesnt_exist, :name => name)
49
- end
50
-
51
- when "list"
52
- answer(:users, :names => @butler.access.user.keys.columnize(5))
53
-
54
- when "add"
55
-
56
-
57
- when "remove"
58
-
59
- else
60
- answer(usage)
61
-
62
- end
63
- end
64
-
65
- __END__
66
- ---
67
- :revision:
68
- :plugin: 1
69
- :summary:
70
- en: "Manage your users."
71
- :about:
72
- :mail: "apeiros@gmx.net"
73
- :version: "1.0.0"
74
- :author: "Stefan Rusterholz"
75
- :strings:
76
- :users:
77
- en: |
78
- Users:
79
- <%= names %>
80
- :created:
81
- en: |
82
- Created user <%= name %>.
83
- :deleted:
84
- en: |
85
- Deleted user <%= name %>.
86
- :activated:
87
- en: |
88
- Activated user <%= name %>.
89
- :deactivated:
90
- en: |
91
- Deactivated user <%= name %>.
92
- :exists:
93
- en: |
94
- User <%= name %> exists already.
95
- :doesnt_exist:
96
- en: |
97
- User <%= name %> does not exist.
98
- :usage:
99
- en: "![b]user![o] ('create' name password ['active' | 'inactive'] | ('delete' | 'activate' | 'deactivate') username | ('add' | 'remove') privilege)"
100
- :help:
101
- en:
102
- "": |
103
- Manage your users.