summaryrefslogtreecommitdiff
path: root/lib/rbot
AgeCommit message (Collapse)Author
2014-02-20[registry] daybreak engine small fixMatthias H
2014-02-19[registry] registry folder with suffix, added daybreak engineMatthias H
2014-02-18log fatal/error messages to stderr, but check if daemonized first!Matthias H
2014-02-18remove old/compat code no longer supportedMatthias H
2014-02-18[registry] removed temp loggingMatthias H
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-12-06workaround for broken pretty_inspectMatthias H
2013-12-06httputil: fixes encoding issues with 1.9+Matthias Hecker
(incompatible with 1.8)
2013-12-04Revert "always print FATAL and ERROR logmessages to STDERR"Matthias Hecker
This reverts commit c4d629ad86aae3b8bb4669650df57875252bea92.
2013-12-04gettext: change depricated and removed setlocaleMatthias Hecker
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.
2013-11-14always print FATAL and ERROR logmessages to STDERRMatthias Hecker
This adds a print to $stderr for log messages with the level ERROR or FATAL. I did this because in the past errors connecting to the server weren't immediately obvious but rather hidden in the logfile. I think it should be right in-your-face when the connection doesn't work. It would probaply be better to extend Logger to print to STDERR but this apparently requires monkeypatching ruby's Logger. Anyhow I think my solution works for now.
2013-11-14allow to verify ssl connections against a CA.Matthias H
This adds three new configuration variables to configure SSL verification against a CA. server.ssl_verify: true if it should verify and disconnect if it fails server.ssl_ca_file: a CA file, is set to the systems CA bundle by default (distri. dependent) server.ssl_ca_path: alternativly path to a directory with CA PEM files I tested it and this seems no longer an issue with >= 1.9.3 https://www.braintreepayments.com/braintrust/sslsocket-verify_mode-doesnt-verify
2013-11-02ruby 2.0.0: better fix for the ThreadErrorMatthias H
I revisited my fix for the ThreadError in ruby 2.0.0 this doesn't use a queue for signals but just starts a thread for each received signal, works much better for me. It also fixes a bug in Bot#reconnect where the SystemExit exception coming from quit is not handled correctly.
2013-11-02ruby 2.0.0: changes sigtrapping, fixes ThreadErrorMatthias H
Ruby 2.0.0 crashes with "ThreadError: can't be called from trap context" anytime a signal is received, because it tries to write a debug message within the "trap context". This changes signal handling so that signals are queued and processed in the main loop. More information: https://www.ruby-forum.com/topic/4411227
2013-11-02ruby 2.0.0: fix for changed @waiters in compat19Matthias H
I don't really know what this is all about, but this fixes a bug with the compat19 monkeypatching. @waiters is now a Hash. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?revision=38109&view=revision
2013-11-02Solve Socket vs URI IPv6 handling in RubyGiuseppe Bilotta
2013-11-02ruby 1.9+: specify file encodingsGiuseppe Bilotta
2013-04-25utils: fixed secs_to_string output for one-element arraysJay Thomas
2013-04-25extends: updated shuffle methodJay Thomas
2012-09-27bdb: message when wrong bdb module is loadedGiuseppe Bilotta
2012-08-31bdb: restore errors should be logged as errorsGiuseppe Bilotta
2012-07-14Update gettext supportGiuseppe Bilotta
Somewhere along the line between 2.0.0 and 2.2.1 gettext switched from locale to lang for the hash key name. Support both.
2012-05-14utils: support hex HTML entitiesGiuseppe Bilotta
2012-04-30db adaptors: nil internal variable when closingGiuseppe Bilotta
This prevents subsequent spurious flushes from bombing out because of closed databases.
2012-03-04RubyGems obsoleted *and* b0rked all_load_path, try to work around itGiuseppe Bilotta
2012-03-03httputil: work (sub-par) without iconvGiuseppe Bilotta
2011-12-08Improve first par detection without hpricotGiuseppe Bilotta
2011-10-24Exit for good when getting a DBFatal errorGiuseppe Bilotta
2011-09-15Better handling of akills and other form of disconnectionsGiuseppe Bilotta
2011-08-30An unparseable message from the server is a ServerErrorGiuseppe Bilotta
2011-08-28basics: UI command to send NOTICEsGiuseppe Bilotta
2011-07-11Fix TC db close on cleanupGiuseppe Bilotta
When closing the TC db on cleanup, we didn't remove it from the environment. Override the #close() method to achieve that.
2011-06-11Saner treatment for connect errorsGiuseppe Bilotta
Rather than raising changing the message (a message that would not be displayed anyway), display the (composed) error message and then reraise without further changes.
2011-06-09Mark threaded mapped messages as repliedGiuseppe Bilotta
This prevents them from being delegated to unreplied() before the processing thread has the chance to mark it replied. The solution would fail for threaded messages whose processing would not reply, but I'm not aware of such a method currently exists. A future design of the message delegation and mapping could thread the actual delegation instead, and this problem would be solved.
2011-06-03Ruby 1.9 can intern empty stringsGiuseppe Bilotta
Since in the subsequent switc we check for nil, explicitly use nil when the modifier is empty or nil rather than relying on a rescued exception.
2011-05-10bdb: don't retrieve the db values when warning about nil keyGiuseppe Bilotta
When either of the keys passed to the BDB compare function is nil, we emit a warning. In this warning, however, we used to peek at the registry value, which required the use of the comparison function itself, falling in a nested loop. Solve by omitting the self[<key>].inspect from the warning.
2011-05-03Preliminary support for the LIST commandGiuseppe Bilotta
2011-04-03* less eager quit message resetGiuseppe Bilotta
Only reset quit message when entering the main loop sanely.
2011-04-02utils: support new HTMLEntities interfaceGiuseppe Bilotta
Since version 4.1.0, HTMLEntities removed the decode_entities() class method and uses a decoder since. Support the new interface as well as the old one. Also slightly optimize by moving the conditional outside of the method definition. Now a rescan is required even if HTMLEntities is loaded at runtime, but the method should be slightly faster.
2011-03-16Add &ndash; to known HTML charactersGiuseppe Bilotta
This was affecting the imdb plugin when htmlentities was not available, because TV series were split at en dashes, which were being converted to asterisks when our built-in UNESCAPE_TABLE was being used.
2011-02-07auth: force no-nick reply when meeting someoneGiuseppe Bilotta
This prevents things such as "nickA: hi, nickB" where nickA is e.g. the owner and nickB is the newly met user.
2011-02-02httputil: nicer UI message when lacking sslGiuseppe Bilotta
Rather than complaining about a missing use_ssl= method, if net/https fails to load we define a mock use_ssl= method that raises a runtime error making the LoadError message public. This is not the most user-friendly message (we would prefer not to expose internals), but it should be clear enough to help owners that forget to read the log find what's missing.
2011-01-31comments and message fixesGiuseppe Bilotta
2011-01-28bdb: support running without envsGiuseppe Bilotta
The various checkpointing function may be called when no env has been loaded (yet), support this.
2011-01-26TokyoCabinet pseudo-environmentGiuseppe Bilotta
Since TokyoCabinet does not provide a DB environment, trying to reopen the same db multiple times (something that happens with subregistry mostly, and possibly after rescans) causes the subsequent opens to fail due to "threading errors". Fix by implementing some sort of environmentalish database management (only keeps track of open databases, returns existing ones if reopening the same db multiple times, closes all of them on exit).
2011-01-26html entities: add degGiuseppe Bilotta
The symbol appears in weather underground data an was not being escaped when htmlentities was not available
2011-01-26extends: fix riphtmlGiuseppe Bilotta
2011-01-12Ruby 1.9 cleanup: variables warningsGiuseppe Bilotta
Fix most ruby 1.9 warnings about shadowed variables (still one remaining in keywords.rb). The only significant changes are in the quiz game plugin. Also fix an issue in dictclient where the block parameter of a method was not correctly isolated from the previous parameter.
2011-01-12Limit Comparable inclusion to ArrayGiuseppe Bilotta
Including Comparable at the top level causes infinite recursions in Ruby 1.9.2