Permalink
Browse files

1.0 release

  • Loading branch information...
2 parents f5dbe71 + 57ff586 commit a4866ea7456139c1159ff8fd41cbdb3766722469 Lee Jarvis committed Aug 19, 2010
Showing with 3,852 additions and 2,741 deletions.
  1. +4 −3 .gitignore
  2. +1 −0 .yardopts
  3. +1 −1 LICENSE
  4. +192 −0 README.md
  5. +0 −200 README.rdoc
  6. +54 −38 Rakefile
  7. +8 −15 cinch.gemspec
  8. +0 −32 examples/autovoice.rb
  9. +32 −0 examples/basic/autovoice.rb
  10. +35 −0 examples/basic/google.rb
  11. +15 −0 examples/basic/hello.rb
  12. +38 −0 examples/basic/join_part.rb
  13. +39 −0 examples/basic/memo.rb
  14. +16 −0 examples/basic/msg.rb
  15. +36 −0 examples/basic/seen.rb
  16. +35 −0 examples/basic/urban_dict.rb
  17. +35 −0 examples/basic/url_shorten.rb
  18. +0 −19 examples/custom_patterns.rb
  19. +0 −25 examples/custom_prefix.rb
  20. +0 −31 examples/google.rb
  21. +0 −13 examples/hello.rb
  22. +0 −26 examples/join_part.rb
  23. +0 −40 examples/memo.rb
  24. +0 −14 examples/msg.rb
  25. +0 −19 examples/named-param-types.rb
  26. +40 −0 examples/plugins/autovoice.rb
  27. +23 −0 examples/plugins/custom_prefix.rb
  28. +37 −0 examples/plugins/google.rb
  29. +22 −0 examples/plugins/hello.rb
  30. +42 −0 examples/plugins/join_part.rb
  31. +50 −0 examples/plugins/memo.rb
  32. +22 −0 examples/plugins/msg.rb
  33. +41 −0 examples/plugins/multiple_matches.rb
  34. +45 −0 examples/plugins/seen.rb
  35. +30 −0 examples/plugins/urban_dict.rb
  36. +32 −0 examples/plugins/url_shorten.rb
  37. +0 −41 examples/seen.rb
  38. +0 −31 examples/urban_dict.rb
  39. +0 −34 examples/url_shorten.rb
  40. +7 −20 lib/cinch.rb
  41. +41 −0 lib/cinch/ban.rb
  42. +0 −368 lib/cinch/base.rb
  43. +479 −0 lib/cinch/bot.rb
  44. +11 −0 lib/cinch/callback.rb
  45. +419 −0 lib/cinch/channel.rb
  46. +369 −0 lib/cinch/constants.rb
  47. +25 −0 lib/cinch/exceptions.rb
  48. +21 −0 lib/cinch/helpers.rb
  49. +344 −38 lib/cinch/irc.rb
  50. +0 −135 lib/cinch/irc/message.rb
  51. +0 −141 lib/cinch/irc/parser.rb
  52. +0 −329 lib/cinch/irc/socket.rb
  53. +96 −0 lib/cinch/isupport.rb
  54. +80 −0 lib/cinch/logger/formatted_logger.rb
  55. +44 −0 lib/cinch/logger/logger.rb
  56. +18 −0 lib/cinch/logger/null_logger.rb
  57. +46 −0 lib/cinch/mask.rb
  58. +183 −0 lib/cinch/message.rb
  59. +62 −0 lib/cinch/message_queue.rb
  60. +0 −54 lib/cinch/names.rb
  61. +205 −0 lib/cinch/plugin.rb
  62. +1 −0 lib/cinch/rubyext/infinity.rb
  63. +18 −0 lib/cinch/rubyext/module.rb
  64. +19 −0 lib/cinch/rubyext/queue.rb
  65. +24 −0 lib/cinch/rubyext/string.rb
  66. +0 −171 lib/cinch/rules.rb
  67. +55 −0 lib/cinch/syncable.rb
  68. +325 −0 lib/cinch/user.rb
  69. +0 −94 spec/base_spec.rb
  70. +5 −0 spec/bot_spec.rb
  71. +5 −0 spec/channel_spec.rb
  72. +5 −0 spec/cinch_spec.rb
  73. +0 −8 spec/irc/helper.rb
  74. +0 −61 spec/irc/message_spec.rb
  75. +0 −103 spec/irc/parser_spec.rb
  76. +0 −90 spec/irc/socket_spec.rb
  77. +5 −0 spec/irc_spec.rb
  78. +5 −0 spec/message_spec.rb
  79. +0 −393 spec/names_spec.rb
  80. +0 −45 spec/options_spec.rb
  81. +5 −0 spec/plugin_spec.rb
  82. +0 −109 spec/rules_spec.rb
  83. 0 spec/{helper.rb → spec_helper.rb}
  84. +5 −0 spec/user_spec.rb
View
@@ -1,4 +1,5 @@
-*.swp
*~
-rdoc
-*.gem
+coverage
+doc
+pkg
+.yardoc/
View
@@ -0,0 +1 @@
+--hide-void-return -m markdown --verbose
View
@@ -1,4 +1,4 @@
-Copyright (c) 2010 Lee Jarvis
+Copyright (c) 2010 Lee Jarvis, Dominik Honnef
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
192 README.md
@@ -0,0 +1,192 @@
+Cinch - An IRC Bot Building Framework
+=====================================
+
+Description
+-----------
+
+Cinch is an IRC Bot Building Framework for quickly creating IRC bots in
+Ruby with minimal effort. It provides a simple interface based on plugins and
+rules. It's as easy as creating a plugin, defining a rule, and watching your
+profits flourish.
+
+Cinch will do all of the hard work for you, so you can spend time creating cool
+plugins and extensions to wow your internet peers.
+
+If you'd like to test your own Cinch experiments you can do so in the
+\#cinch-bots IRC channel on
+[irc.freenode.org](irc://irc.freenode.org/cinch-bots). For general
+support, join [#cinch](irc://irc.freenode.org/cinch).
+
+This original document can be found [here](http://doc.injekt.net/cinch).
+
+Installation
+------------
+
+### RubyGems
+
+You can install the latest Cinch gem using RubyGems
+
+ gem install cinch
+
+### GitHub
+
+Alternatively you can check out the latest code directly from Github
+
+ git clone http://github.com/injekt/cinch.git
+
+Example
+-------
+
+Your typical Hello, World application in Cinch would go something like this:
+
+ require 'cinch'
+
+ bot = Cinch::Bot.new do
+ configure do |c|
+ c.server = "irc.freenode.org"
+ c.channels = ["#cinch-bots"]
+ end
+
+ on :message, "hello" do |m|
+ m.reply "Hello, #{m.user.nick}"
+ end
+ end
+
+ bot.start
+
+More examples can be found in the `examples` directory.
+
+Features
+--------
+
+### Documentation
+
+Cinch provides a documented API, which is online for your viewing pleasure [here](http://doc.injekt.net/cinch).
+
+### Object Oriented
+
+Many IRC bots (and there are, so **many**) are great, but we see so little of them take
+advantage of the awesome Object Oriented Interface which most Ruby programmers will have
+become accustomed to and grown to love.
+
+Well, Cinch uses this functionality to it's advantage. Rather than having to pass around
+a reference to a channel or a user, to another method, which then passes it to
+another method (by which time you're confused about what's going on) -- Cinch provides
+an OOP interface for even the simpliest of tasks, making your code simple and easy
+to comprehend.
+
+### Threaded
+
+Unlike a lot of popular IRC frameworks, Cinch is threaded. But wait, don't let that
+scare you. It's totally easy to grasp.
+
+Each of Cinch's plugins and handlers are executed in their own personal thread. This
+means the main thread can stay focused on what it does best, providing non-blocking
+reading and writing to an IRC server. This will prevent your bot from locking up
+when one of your plugins starts doing some intense operations. Damn that's handy.
+
+### Key/Value Store
+
+We have listened to your requests and implemented a bot-wide key/value store. You can
+now store data and use it across your handlers. Here's an example:
+
+ configure do |c|
+ store[:friends] = []
+ end
+
+ on :message, /^add friend (.+)$/ do |m, friend|
+ store[:friends] << friend
+ end
+
+ on :message /^get friends$/ do |m|
+ m.reply "Your friends are: #{store[:friends].join(', ')}"
+ end
+
+Neat, right?
+
+### Plugins
+
+That's right folks, Cinch provides a modular based plugin system. This is a feature
+many people have bugged us about for a long time. It's finally here, and it's
+as awesome as you had hoped!
+
+This system allows you to create feature packed plugins without interfering with
+any of the Cinch internals. Everything in your plugin is self contained, meaning
+you can share your favorite plugins among your friends and release a ton of
+your own plugins for others to use
+
+Want to see the same Hello, World application in plugin form? Sure you do!
+
+ require 'cinch'
+
+ class Hello
+ include Cinch::Plugin
+
+ match "hello"
+
+ def execute(m)
+ m.reply "Hello, #{m.user.nick}"
+ end
+ end
+
+ bot = Cinch::Bot.new do
+ configure do |c|
+ c.server = "irc.freenode.org"
+ c.channels = ["#cinch-bots"]
+ c.plugins.plugins = [Hello]
+ end
+ end
+
+ bot.start
+
+More information can be found in the {Cinch::Plugin} documentation.
+
+### Numeric Replies
+
+Do you know what IRC code 401 represents? How about 376? or perhaps 502?
+Sure you don't (and if you do, you're as geeky as us!). Cinch doesn't expect you
+to store the entire IRC RFC code set in your head, and rightfully so!
+
+That's exactly why Cinch has a ton of constants representing these numbers
+so you don't have to remember them. We're so nice.
+
+### Pretty Output
+
+Ever get fed up of watching those boring, frankly unreadable lines
+flicker down your terminal screen whilst your bot is online? Help is
+at hand! By default, Cinch will colorize all text it sends to a
+terminal, meaning you get some pretty damn awesome readable coloured
+text. Cinch also provides a way for your plugins to log custom
+messages:
+
+ on :message, /hello/ do |m|
+ bot.logger.debug "Someone said hello"
+ end
+
+Authors
+-------
+
+* [Lee Jarvis](http://injekt.net)
+* [Dominik Honnef](http://fork-bomb.org)
+
+Contribute
+----------
+
+Love Cinch? Love Ruby? Love helping? Of course you do! If you feel like Cinch
+is missing that awesome jaw-dropping feature and you want to be the one to
+make this magic happen, you can!
+
+Please note that although we very much appreciate all of your efforts, Cinch
+will not accept patches in aid of Ruby 1.8 compatibility. We have no intention
+of supporting Ruby versions below 1.9.1.
+
+Fork the project, implement your awesome feature in it's own branch, and send
+a pull request to one of the Cinch collaborators. We'll be more than happy
+to check it out.
+
+Just remember, no specs, no cookies!
+
+### Contributors
+- darix &lt;darix [at] nordisch.org&gt; (wrote the message splitting algorithm)
+- robgleeson (thanks for testing, contributing a lot of ideas,
+ discussing design decisions etc)
Oops, something went wrong.

0 comments on commit a4866ea

Please sign in to comment.