summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
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
2010-12-31fake message: set replied on replyGiuseppe Bilotta
Although the reply method for fake messages was actually relying on the original, we still need to set 'replied' to prevent the fake message from being wrongly delegated to 'unreplied'. The most obvious bug this commit fixes is the potentially infinite loop triggered by defining a command reaction triggered by the command name itself (e.g. reply to ping with cmd:ping).
2010-12-12+ Array#delete_if_atGiuseppe Bilotta
Allow deletion of an element from the array iff it's at a given position (or in a given range of positions).
2010-12-08auth module: update for messagemapper changesGiuseppe Bilotta
Since commit a993d1c358e24ab85621568c10411c5496e2dea8, the message mappers have a more rational way of reporting failures, but the auth module was not using it, resulting in the wrong permissions being granted/revoked whenever allow/deny was being used.
2010-12-07More gettext frozen string woesGiuseppe Bilotta
2010-12-07The mIRC color for white is 0, not 16Giuseppe Bilotta
Default mIRC colors are 0-15, and some clients don't react too well to a color > 15, while most wrap or default. Konversation, for example, will stop the color command parsing and interpret it as color 1, followed by the literal digit 6. So use the 'official' (mIRC) value of 0 for white.
2010-10-14safe_exec fixesGiuseppe Bilotta
Some plugins (ri, fortune) wrap safe_exec in begin/rescue blocks that did not get triggered because the exceptions from the execution were caught in the popen block (and would never get exposed anyway). Fix this by raising if $? does not indicate success.
2010-10-06TokyoCabinet #fwmkeys() expects a stringGiuseppe Bilotta
Convert the (optional) first argument to #each*() methods to a string to ensure the calls work as expected. This fixes a problem with @registry.each not working as expected, and although it would have been sufficient to convert the default for the first argument from nil to the empty string, the approach implemented by this patch is more robust overall.
2010-10-06TokyoCabinet: upgrade from BDB using case-insensitive treeGiuseppe Bilotta
2010-10-04DBFatal at load time deserve special treatmentGiuseppe Bilotta
Don't trap them, rerise and let the bot handle them
2010-09-30compat19: fix condition monitor waitingGiuseppe Bilotta
When timing out during a wait, return false instead of raising. This fixes a problem with TimeoutError being raised during restarts on ruby 1.9.x
2010-09-30IRC framework: Server#to_s must always return a StringGiuseppe Bilotta
Having Server#to_s alias the hostname would cause problems when the hostname was nil (e.g. after a disconnect). Fix by making sure that to_s always returns a string instead.
2010-09-30* more BDB leaking fixedGiuseppe Bilotta
2010-09-27* wrap BDB::Fatal classes for abstract trappingGiuseppe Bilotta
When using a DB backend different from BDB, the BDB constant may not be defined, causing a NameError during error trapping in the main loop. Fix this by defining our own DBFatal error that maps to BDB::Fatal in the BDB case and is defined as an (unused) Exception for TokyoCabinet.
2010-09-24Check BDB version only if it's loadedVoker57
2010-09-24TokyoCabinet: more BDB checksGiuseppe Bilotta
2010-09-23TokyoCabinet: only warn about skipped upgrade if the old reg was foundGiuseppe Bilotta
2010-09-23TokyoCabinet: fix extension in 0.9.9 upgrade pathGiuseppe Bilotta
2010-09-23TokyoCabinet: 0.9.5-to-0.9.9 must use BDB onlyGiuseppe Bilotta
When upgrading from 0.9.5 data, write the 0.9.9-style regisitry using BDB still rather than trying to use TokyoCabinet already. This makes sure that the next step (0.9.9 to modern times) works correctly. (Moreover, the existing BDB-to-TC attempt wouldn't have worked anyway due to wrong var names. I doubt anybody will ever hit this path and notice though.)
2010-08-24auth: minimal help about user import/exportGiuseppe Bilotta
2010-08-18Fix typoRaine Virta
2010-07-05load-gettext: cope with ruby gettext 2.1.0Giuseppe Bilotta
2010-07-03HTTP: only set cookies for the correct domainGiuseppe Bilotta
When a redirect has a Set-Cookie: header, check if the cookie domain is valid for the host we are redirected to. If not, don't set the cookie in the new request.
2010-07-03HTTP: support servers that forget to escape the redirect locationGiuseppe Bilotta
2010-06-30minor correction to help authGiuseppe Bilotta
2010-06-15New IRC Framework: don't raise on unknown casemapGiuseppe Bilotta
This allows us to support servers that (ab)use the CASEMAPPING to indicate the set of allowed characters for nicks (e.g. Inspire IRCd).
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).
2010-03-29IRC: support 'CASEMAPPING=charset' from some idiotic serversGiuseppe Bilotta
2010-03-18Small httputil.rb fix. Wrong Argument port instead of pass.Matthias -apoc- Hecker
2010-03-16Tokyo Cabinet DB backendVoker57
2010-03-16DB backend optionVoker57
2010-03-16Moved DB stuff to registry/bdbVoker57
2010-03-14basics: implement a channel list status queryRobin H. Johnson
This gets the list of channels we think we are in (not what the server says we are in). Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2010-03-08Fix typo in previous patchGiuseppe Bilotta
My fault for not finding it in review
2010-03-07Implement penalty for WHO and PART based on eggdrop code.Robin H. Johnson
2010-03-07Time parsing: also parse months and yearsGiuseppe Bilotta
2010-03-07rfc2812: Fix multiple RPL_WHOISCHANNELS handlingRobin H. Johnson
The new Freenode ircd returns multiple RPL_WHOISCHANNELS lines (split based on length), and they must be merged, otherwise only the last ends up as the list of channels that the bot is in. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2010-01-25Message 'prefixed?' methodGiuseppe Bilotta
This is used to tell apart colloquial messages to the bot ("botname, do this") from classic bot-style interface ("!do this").
2009-12-21message: Allow forcefully prepending of the nick when replyingAlex Legler
2009-12-21ircbot/rfc2812/message: Add banlist message handlingAlex Legler
2009-12-21ircbot: Delegate ERR_NOSUCHNICK and ERR_NOSUCHCHANNEL events to pluginsAlex Legler
2009-11-06irclog: don't kill logger thread on false can_log_onGiuseppe Bilotta
Change a return to a next. Leftover from the refactoring of the logger into its own thread. Thanks to gelraen for spotting this.
2009-11-05remote: bring up to date with changes in MessageMapperGiuseppe Bilotta
2009-11-05remote: use permit? instead of allow?Giuseppe Bilotta
We cannot signal back to the user from the UI anyway.
2009-11-01IRC Framework: Channel.npname()Giuseppe Bilotta
Returns the unprefixed part of a channel name