Age | Commit message (Collapse) | Author |
|
Allow deletion of an element from the array iff it's at a given position (or in
a given range of positions).
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
Don't trap them, rerise and let the bot handle them
|
|
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
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.)
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
This allows us to support servers that (ab)use the CASEMAPPING
to indicate the set of allowed characters for nicks (e.g. Inspire
IRCd).
|
|
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).
|
|
|
|
|
|
|
|
|
|
|
|
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>
|
|
My fault for not finding it in review
|
|
|
|
|
|
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>
|
|
This is used to tell apart colloquial messages to the bot ("botname,
do this") from classic bot-style interface ("!do this").
|
|
|
|
|
|
|
|
Change a return to a next. Leftover from the refactoring of the logger
into its own thread. Thanks to gelraen for spotting this.
|
|
|
|
We cannot signal back to the user from the UI anyway.
|
|
Returns the unprefixed part of a channel name
|
|
This ensures that checks are correct in both Ruby 1.8 and 1.9
|
|
It should be BooleanValue, otherwise false would get converted to 0
which would evaluate to true, meaning cache would never expire.
|
|
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.
|
|
|
|
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.
|
|
Since in ruby 1.9 Exception#to_str was removed, change it to to #to_s
|
|
method_defined? doesn't search in private methods, and :bound_targets is
private, so change it to respond_to?(method, include_private=true)
|