summaryrefslogtreecommitdiff
path: root/lib/rbot/plugins.rb
AgeCommit message (Collapse)Author
2021-05-29Catch another non-standard errorGiuseppe Bilotta
2020-04-16core: sets plugin_path to loaded pluginsMatthias Hecker
While loading a plugin in the manager using #load_botmodule_file this will remember the directory of the file that is being loaded in @next_plugin_path. In the plugin/BotModule initialization we set the path in plugin_path of the plugin. This was the only solution I could find to get this information in the plugin. It is useful because this allows the plugin to know in which directory it is located, it can then easily access data files stored alongside the plugin. Some built-in plugins (see #42) use the data/rbot/templates to copy data files on bot load (see #repopulate_botclass_directory) into the profile directory (~/.rbot/).
2020-03-31refactor: logger moved away from ircbot (exp.)Matthias Hecker
This moves the logger management thread/queue to a seperate singleton. It removes the explicit stopping/restarting of the logging thread since the thread should behave like a daemon thread anyway. Still needs to be tested to work in daemonize.
2020-03-29fix: plugins delegate disregarding all options givenMatthias Hecker
2020-03-27Merge pull request #4 from ahpook/rename_karmaMatthias Hecker
Rename and improve karma plugin
2015-12-15Renames the 'karma' plugin to a 'points' systemEric Sorenson
Prior to this commit, rbot used a "karma" system for keeping track of user points. This phrasing, while widespread, is unnecessarily appropriationist. This commit renames the plugin to a more neutral "points" system, accomplishing exactly the same goal without using culturally problematic language. For more background please read: http://bit.ly/1MfLmce
2015-07-04webservice: add erb template render methodsMatthias Hecker
2015-06-13plugins, improved how we lookup plugins filenameMatthias Hecker
2015-03-11plugins fix missing save for 1.9Matthias H
2015-03-11plugins: allow rescanning of one botmodule onlyMatthias H
2014-02-24[registry] refactoring into a abstract and factoryMatthias H
* a new abstract class AbstractAccessor is the new base for all concrete database implementations. * a factory now, dynamically discovers those implementations in the registry/ directory and will create the configured type for the plugins. * again: this makes db keys case-sensitive (aka 'the correct way of doing things' -.-) * re-added tokyocabinet
2014-02-18removes bdb&tc registry; adds dbm registryMatthias H
This removes the existing registries, ruby-bdb (Berkeley DB) and tokyocabinet, instead it creates a new registry based on ruby DBM. Ruby-bdb has long since been abandoned in favor for rubys DBM and tokyocabinet also has been ceased development since 2011 (for kyotocabinet).
2013-11-15plugins: improve error handling on loadGiuseppe Bilotta
Support OAuth2::Error braindead extension to StandardError and wrap loading in an outer rescue to catch problems with the error handling.
2010-10-04DBFatal at load time deserve special treatmentGiuseppe Bilotta
Don't trap them, rerise and let the bot handle them
2010-09-30* more BDB leaking fixedGiuseppe Bilotta
2010-05-12Survive active_support idiocyGiuseppe Bilotta
Somebody should hang the ActiveSupport developers by their balls with barbed wire. Their MissingSourceFile extension to LoadError _expects_ a second argument, breaking the usual Exception interface (instead, the smart thing to do would have been to make the second parameter optional and run the code in the from_message method if it was missing).
2009-09-06ruby 1.9: Exception#to_strfranz
Since in ruby 1.9 Exception#to_str was removed, change it to to #to_s
2009-08-12Better handling of MessageMapper failuresGiuseppe Bilotta
The plugin fallback method is now passed the list of failures. Failures themselves are encapsulated in their own data type, making it easier to handle failures that should inform the user with something more detailed than the classic 'usage' pattern. It's still up to the fallback method to make use (e.g. echo) the relevant messages.
2009-06-16lib/rbot/plugins.rb: remove executable bitAdam James
2009-02-28plugins: allow plugins whitelistingRaine Virta
If the whitelist is not empty, only load the specified plugins.
2009-02-28plugins: refactor plugin scanningRaine Virta
Refactor plugin scanning for cleaner distinction between core modules and plugins.
2009-02-28Separate @dirs containing all botmodules (plugins and core modules)Raine Virta
into @core_module_dirs and @plugin_dirs
2009-02-19remove whitespaceRaine Virta
2009-02-15+ @bot.path and datafile methodsGiuseppe Bilotta
We provide two methods that make it more simple and elegant for botmodules to define paths relative to the bot's own directory (botclass) and to the BotModule's (assumed) non-registry directory. The first method is Irc::Bot#path(), which joins its arguments with the botclass. This method can be used to access datafiles in the bot directory with a much cleaner syntax; and since it uses File.join, the resulting paths are also properly formatted on each platform, which doesn't hurt. Each BotModule now also carries a dirname() method that should return the directory under botclass that holds the BotModule's datafiles. dirname() defaults to the BotModule's name(), but it can be overridden, e.g. for backwards compatibility (see the patch for the quotes plugin), or for BotModules that share their datafiles. Datafiles can be accessed using the BotModule#datafile() method that joins the botclass, the dirname() and whatever other argument is passed.
2008-08-08plugins.rb: use IO.read instead of readlins+join gimmicksGiuseppe Bilotta
2008-07-14plugins.rb: commands were being delegated even from ignored messagesGiuseppe Bilotta
2008-06-17* plugins.rb: avoid uninitialized warning on @prioritydmitry kim
2008-06-07recommit 33c336af346dc08b4f4f4951dd6eae7150cef481 po file per pluginYaohan Chen
each plugin uses its own po file, no change required for plugin source, Rakefile, plugin loader and gettext loader are modified to adjust to the change
2008-06-06Revert "each plugin uses its own po file"Yaohan Chen
This reverts commit 33c336af346dc08b4f4f4951dd6eae7150cef481.
2008-06-05each plugin uses its own po fileYaohan Chen
no modification in plugin source is needed, plugin loader is modified to automatically bind to the plugin's text domain updatepo task is modified to maintain per-plugin po file po files are updated and cleaned
2008-04-13plugins: rework delegate() to accept optionsGiuseppe Bilotta
2008-04-13+ ModeChangeMessage classGiuseppe Bilotta
2008-04-13+ MotdMessage classGiuseppe Bilotta
2008-04-12+ delegate notice() for NoticeMessageGiuseppe Bilotta
2008-04-12+ WelcomeMessage classGiuseppe Bilotta
2008-04-12plugins: make delegate() aware of ignored and fake messagesGiuseppe Bilotta
By convention, ignored messages will only be delegated to plugins with negative priority, while fake messages will only be delegated to plugins with positive priority.
2008-04-12event delegation thresholdsdoki_pen
2008-04-10Bug fix, priority order needs to be marked dirty when modules added.doki_pen
2008-04-10plugins: reinstate debug lines in privmsg()Giuseppe Bilotta
2008-04-10plugins: mark priorities dirty on rescanGiuseppe Bilotta
2008-04-09Added event priorities to modules.doki_pen
2008-04-08revert previous useless commit and rdocify documentation of accessors to ↵Giuseppe Bilotta
BotModule
2008-04-07plugins: irc_delegate to do listen+actual delegateGiuseppe Bilotta
2008-04-07plugins: message() delegateGiuseppe Bilotta
2008-03-28plugins: expose the registry and the map handler as methods for the ↵Giuseppe Bilotta
BotModule class
2008-03-27* handle invites properly -- forgot more than half the files :/Giuseppe Bilotta
2007-12-13plugins: register maps with full information accessible via @bot.plugins.mapsGiuseppe Bilotta
2007-12-13plugins: refactor common code in #map() and #map!() to auxiliary #do_map() ↵Giuseppe Bilotta
method
2007-11-06Improved inspect methods all aroundGiuseppe Bilotta
2007-09-12namespaces: move rbot-specific classes and modules from Irc::* to Irc::Bot::*Giuseppe Bilotta