summaryrefslogtreecommitdiff
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-26weather: support google service tooGiuseppe Bilotta
2011-01-26weather: use bot standard html cleanup functionsGiuseppe Bilotta
Get rid of wu_clean and replace it with ircify_html or riphtml depending on context.
2011-01-26weather: config option for default unitsGiuseppe Bilotta
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
2011-01-12Load the 1.9 compatibility code earlierGiuseppe Bilotta
The compat19 code touches the monitor mixins which are used by the logger which is started as soon as ircbot.rb is loaded. To make sure the logger uses the compat code we must load compat19 before ircbot.
2011-01-11rss: obviously, the precending patch wasn't enoughGiuseppe Bilotta
Proper support for a 'modified' element actually requires its model to be defined and added to the RSS Atom namespace.
2011-01-11rss: updated can be nilGiuseppe Bilotta
An Atom item can reply to updated even though its value is nil, so check for it actually being valued instead. Also, some malformed Atom feeds use the nonstandard 'modified' element instead, so check for that too.
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-11small updates for italian markovGiuseppe Bilotta
2010-12-11time plugin: check if argument is a nick earlierGiuseppe Bilotta
When !time <somenick> was being used and the user <somenick> hadn't set his or her location, the bot would wrongly assume the argument was some timezone. Fix by checking against local nicks first.
2010-12-10geoip: blogama is dead, long live ipinfodbGiuseppe Bilotta
Sadly, the new ipinfodb API requires an API key, and I don't know yet if I'm allowed to redistributed it (I'm betting on no, but in case I can it will added with an appropriate patch).
2010-12-09UNO!: when the game hasn't started, it's nobody's turnGiuseppe Bilotta
2010-12-09UNO!: prevent joins after a challengeable cardGiuseppe Bilotta
If someone joins after a challengeable W+4, he would be inserted between the last and first player, and if there is a challenge _his_ cards would be exposed. So prevent joining in such a situation.
2010-12-08UNO!: reset must_play when changing turnGiuseppe Bilotta
After a successful challenge, the challenged player can choose to pick&pass instead of playing one of its allowed cards. In such a case, the must_play array would not get reset, preventing the next player to be able to play any of its card. Fix by resetting must_play on next_turn rather than on set_discard.
2010-12-08UNO!: early exit when checking if W+4 was legalGiuseppe Bilotta
Exit as soon as we find a card that reveals that the W+4 was not a valid move.
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-12-07Greet plugin: bot should not greet himselfGiuseppe Bilotta
2010-11-30poll: missing choice value in replyGiuseppe Bilotta
2010-11-30poll: cope with gettext frozen stringGiuseppe Bilotta
Some gettext versions freeze the string they return, so dup them before modifying them.
2010-11-25rss: watch handle case during renameGiuseppe Bilotta
We allow rss handles to be of any case on creation, even though matching is case-insentivie. However, when renaming an rss using 'rss change handle' and only changing the case, two things prevented this from working correctly: * since the new downcased handle was equal to the old downcased handle, the bot would prevent the renaming due to the existence of the new handle * the new handle was forcefully downcased, preventing the user from renaming handle 'case' to 'CaSe'. Fix by checking for this case explicitly, and handling it separately.
2010-11-25remind: fix presence of 'in', 'every' or 'at' in messageGiuseppe Bilotta
if 'in' was present in the message but not part of the time specification (e.g. because the specification was with 'every' or with 'at'), the parser would fail at the first attempt (look for time after 'in') and fail unnecessarily. Fix by trying all possibilities and only giving an error if none succeeds.
2010-11-18rss plugin: don't fail when feed.last_success is nilGiuseppe Bilotta
The first_run check comparing the time delta from last success failed when feed.last_success was nil. Prevent this from happening by checking if we are on the first run before the rest of the checks.
2010-11-09imdb: fix title regexp for missing second dateGiuseppe Bilotta
2010-11-08UNO!: fix g9r9 fixGiuseppe Bilotta
Commit a306b2c68eb58c1c88057ff7ee78895401adb6a9 introduced a fix to prevent a player from playing something like g9r9, but the fix actually prevented any single-card play. Fix by making the \1 optional.
2010-10-31urban: fix regexpGiuseppe Bilotta
2010-10-19uno plugin: don't allow g9r9 card specificationGiuseppe Bilotta
The regexp should make sure that the second card is equal to the first specified card, instead of matching the card expression one or two times. Otherwise, a play like 'pl g9r9' would be accepted when the player had two r9 cards and could play them. This is only a aesthetical change because the plays would still be valid, albeit (1) surprising and (2) mismatching what the user actually wrote.
2010-10-14translator: don't show providerRaine Virta
2010-10-14imdb: restore 'character of' functionalityGiuseppe Bilotta
2010-10-14imdb: update to latest htmlGiuseppe Bilotta
2010-10-14search: gcalc fixGiuseppe Bilotta
Google changed their HTML again, breaking gcalc. Fix by using the WAP search and get the first result if it contains an equal sign.
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-14dictclient: monkeypatch DICTErrorGiuseppe Bilotta
The Ruby/DICT library is so tightly coupled with the rdict client that its errors exit on initialize, instead of letting the lib user do that. This makes those errors untrappable from the code. Fix by monkeypatching DICTError to just act like the other exceptions in Ruby.
2010-10-12youtube: fix detection of video pagesGiuseppe Bilotta
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-10-04time plugin: properly reset TZ in on_timezoneGiuseppe Bilotta
2010-10-04poll: suppress warningGiuseppe Bilotta
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-30Revert "markov: removed unnecessary mutexes"Giuseppe Bilotta
This reverts commit 06485aeb187dde5e81204b06c8e956e7e035c323. The mutex is necessary because of the concurrent learning and database conversion. Some other approach should be used instead (e.g. skipping the mutex if not running a conversion).
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