summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
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
2009-11-01Ruby 1.9 compat: use String#[0,1] for channel prefixesGiuseppe Bilotta
This ensures that checks are correct in both Ruby 1.8 and 1.9
2009-10-21httputil.rb: fix http.no_expire_cache being IntegerValuefranz
It should be BooleanValue, otherwise false would get converted to 0 which would evaluate to true, meaning cache would never expire.
2009-10-21Loop until connected in reconnect()Giuseppe Bilotta
Untrapped connect() failures would raise up to the mainloop, causing a burst of reconnect attempts without delay. Fix by rescuing in reconnect() and retrying after waiting.
2009-09-24ircify_html: options to handle img tagsGiuseppe Bilotta
2009-09-09basics: log the fact that we're not joining default channelsGiuseppe Bilotta
This makes it easier to understand why the bot is not joining when join_after_identify is set to true and the bot is not identifying.
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-09-06ruby 1.9: fix method_defined?franz
method_defined? doesn't search in private methods, and :bound_targets is private, so change it to respond_to?(method, include_private=true)
2009-08-30Revert "utils: try nokogiri/hpricot if hpricot is not available"Giuseppe Bilotta
This reverts commit 4ea25eba02d85b81dcee4302375d7d3e08cd52ac. Not only the patch was missing an essential part, but Nokogiri is not compatible enough with Hpricot anyway. Incompatibilities include doc/"style|script" raising an "Undefined namespace prefix" error and the non-existence of Hpricot::Elements. If we want to support Nokogiri we'll need to write code for it on purpose or redesign the Hpricot code so that it only uses the subset supported by Nokogiri.
2009-08-30httputil: POST respose '201 Created' is goodGiuseppe Bilotta
2009-08-30utils: try nokogiri/hpricot if hpricot is not availableGiuseppe Bilotta
2009-08-27utils: avoid namespace conflictGiuseppe Bilotta
The time parsing refactoring introduced an unpleasant namespace conflict by defining Utils::Time. Eliminate it by renaming it to ParseTime
2009-08-26gettext: fix empty LANGUAGE env varfranz
When LANGUAGE env var is set to empty value, it breaks gettext in ruby, so we unset it if it's empty.
2009-08-26ruby 1.9: fix *methods.include?franz
Since in 1.9 methods arrays have symbols instead of strings, fix it by changing into respond_to? and method_defined?
2009-08-26ruby 1.9: disable the Singleton monkeypatch for 1.9franz
this monkeypatch doesn't work on 1.9 - Singleton has no _load method
2009-08-26ruby 1.9: monkeypatch MonitorMixin and ConditionVariablefranz
ruby 1.9's ConditionVariable#wait is not implemented for timeout != nil, this patch adds an implementation for it (see ruby-core:15847) Also, since MonitorMixin is included into TCPSocket in rbot, and TCPSocket#send != Object#send in ruby 1.9, i changed that to use __send__.
2009-08-26ruby 1.9: fix Integer(nil)franz
in 1.9, Integer(nil) raises TypeError, so we change "%d" to "%s"
2009-08-26ruby 1.9: convert Exception to string explicitlyfranz
changed "string + exception" to "string #{e}", the former yields 'can't convert <e> into String' in ruby 1.9
2009-08-26ircbot: fix indentation errorfranz
2009-08-26ruby 1.9: get rid of Array#nitemsfranz
Array#nitems is gone in ruby 1.9, changed rbot code to use Array.compact.size, which works in both 1.8 & 1.9
2009-08-26Utils: time parsing routinesGiuseppe Bilotta
Add time parsing routines to Utils, to be used for human-to-computer conversion of time offsets. Refactored and enhanced from the remind plugin.
2009-08-16Suppress warnings about unitialized variablesGiuseppe Bilotta
hangman: an unneeded letters accessor was defined ircbot: restore initializations removed by previous commit
2009-08-14ircbot: clean up ping timings on connectGiuseppe Bilotta
2009-08-13basics: UI reconnect commandGiuseppe Bilotta
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-30extends: bring conjoin to EnumerableGiuseppe Bilotta
Put #conjoin() in the Enumerable module, so that it can be shared by all enumerables (e.g. ranges). Since #size() is not necessarily present, its use is replaced by #count(), the result of which is cached because it can be slow on objects missing #size().