Commit Graph

3335 Commits

Author SHA1 Message Date
Daniel Folkinshteyn 5d6a3c5a46 String: cap maximum soundex length to 1024. 2012-12-16 23:53:13 -05:00
Daniel Folkinshteyn 40bdec92ca Math: calc: coerce argument to ascii string. working with unicode errors on the translate() step. 2012-10-22 11:24:28 -04:00
Daniel Folkinshteyn c7ed79571a Seen: check to see if the bot is in target channel before doing anything.
Otherwise the check to see if user is in channel generated an error.
2012-08-30 15:34:28 -04:00
Valentin Lorentz 031b09307e Math: Allow 'factorial()' in icalc.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-07-13 14:14:24 -04:00
Valentin Lorentz 27857ff6f8 Math: Block factorial() in calc functions.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-07-13 14:14:10 -04:00
Daniel Folkinshteyn c991175425 Math: default %f formatting rounds to 6 decimal places. increase that to 16. 2012-06-12 12:28:26 -04:00
Daniel Folkinshteyn ce121459f7 Channelstats: require caller to be in target channel when using commands in this plugin.
This fixes information leakage from private channels.
2012-02-25 12:35:55 -05:00
Daniel Folkinshteyn 7283235caf Seen: require caller to be in target channel when using commands in this plugin.
This fixes information leakage from private channels.
2012-02-25 12:28:27 -05:00
Valentin Lorentz 37023f5616 MessageParser: fix two misspell
In config.py config var help and in plugin.py docstring
2011-12-25 01:28:51 -05:00
Daniel Folkinshteyn ce9d04eac9 Google: use web scraping as fallback to ig api
ig api doesn't have everything (for one, timezones),
and also, in case the IG api ever dies.
2011-12-12 14:57:10 -05:00
Daniel Folkinshteyn 4fe8fe4b10 Google: use google ig api for the calc. no more web scraping. let's hope this stays alive. 2011-12-12 12:59:27 -05:00
James McCoy 05adad617d Simplify handling of per-network waitingJoins
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
(cherry picked from commit c90fafebe7)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-12-12 11:26:31 -05:00
James McCoy bcdc8ecb00 Prevent nesting of Misc.tell
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
(cherry picked from commit 5b4c150d03)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-12-12 11:24:52 -05:00
James McCoy 865e87cf74 Misc: Avoid setting up "invalid command" flood handling if its not enabled
Closes: Sf#3088554
Signed-off-by: James McCoy <vega.james@gmail.com>
2011-12-12 11:22:16 -05:00
James McCoy c2b6633fe7 Channel.nicks: Raise error so we don't actually reply with the nicks.
Closes: Sf#3396388
Signed-off-by: James McCoy <vega.james@gmail.com>
(cherry picked from commit 0869a8e271)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-12-12 11:13:03 -05:00
Valentin Lorentz 3248bd79c4 NickCapture: Fix plugin help and l10n-fr. Closes GH-116.
Conflicts:

	plugins/NickCapture/locale/fr.po
	plugins/NickCapture/messages.pot
	src/version.py

Signed-off-by: James McCoy <vega.james@gmail.com>
(cherry picked from commit a1a90f7673)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-12-12 11:12:09 -05:00
Valentin Lorentz 90b7a83127 Topic: fix typo in @unlock help.
Conflicts:

	plugins/Topic/locale/fr.po
	plugins/Topic/messages.pot
	src/version.py

Signed-off-by: James McCoy <vega.james@gmail.com>
(cherry picked from commit f1690e6867)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-12-12 11:11:41 -05:00
Valentin Lorentz 3d5f92a61f Topic: Fix bad doctring
Conflicts:

	plugins/Topic/messages.pot

Signed-off-by: James McCoy <vega.james@gmail.com>
(cherry picked from commit 9561c9f417)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-12-12 11:07:15 -05:00
Valentin Lorentz f3136655e7 Factoids: Fix typo.
Conflicts:

	plugins/Factoids/locale/fi.po
	plugins/Factoids/locale/fr.po
	plugins/Factoids/messages.pot
	src/version.py

Signed-off-by: James McCoy <vega.james@gmail.com>
(cherry picked from commit 8fb4cbcdc6)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-12-12 11:07:07 -05:00
Valentin Lorentz 0a6d38f37a Channel: fix NameError: 'replyirc' -> 'replyIrc'. Closes GH-73.
Conflicts:

	src/version.py

Signed-off-by: James McCoy <vega.james@gmail.com>
(cherry picked from commit 8056da06f6)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-12-12 11:07:00 -05:00
Valentin Lorentz 11b5ca3fd7 Karma: fix typo. Closes GH-38.
Conflicts:

	plugins/Karma/locale/fi.po
	plugins/Karma/locale/fr.po
	plugins/Karma/messages.pot

Signed-off-by: James McCoy <vega.james@gmail.com>
(cherry picked from commit fa8385596d)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-12-12 11:06:49 -05:00
Valentin Lorentz a6f9c1c2d4 Protector: Fix variable name.
Signed-off-by: James McCoy <vega.james@gmail.com>
(cherry picked from commit 70a6e6932d)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-12-12 11:06:40 -05:00
Valentin Lorentz f78803a82b Relay: remove redundant nick on join/part when hostmasks enabled
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
(cherry picked from commit ce4d26514b)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-12-12 11:05:25 -05:00
Valentin Lorentz a93d3fee85 AutoMode: fix bans.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
(cherry picked from commit 5dcbe57fa3)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-12-12 11:05:02 -05:00
Valentin Lorentz b99525db63 Owner: Fix bug with @enable and @disable if a plugin is given. Closes GH-43. Closes GH-44.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
(cherry picked from commit 8fb97c56bc)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-12-12 11:04:25 -05:00
James McCoy b42b06fe79 RSS._getConverter: Encode strings before handing them off to other functions
When the feed has a specified encoding, we'll be dealing with unicode objects
in the response from feedparser.parse().  To avoid possible UnicodeErrors, we
need to encode() before handing the string off to other functions, so the
other functions are always dealing with bytestrings instead of bytestrings and
unicode objects.  Mixing unicode and bytestrings will cause implicit
conversions of the unicode objects, which will most likely use the wrong
encoding.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
(cherry picked from commit 964c73f591)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-12-12 11:04:03 -05:00
James McCoy 50e4b6baf1 String.decode: Only encode('utf-8') when the decode string is unicode
Closes: Sf#3165718
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
(cherry picked from commit 01c8dc7f78)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-12-12 11:03:18 -05:00
Daniel Folkinshteyn f3e5223f3f Undo the web title fix because it appears it broke more than it fixed. 2011-11-21 15:14:34 -05:00
Daniel Folkinshteyn b533290c7a Web: fix problems with title snarfer and unicode due to bug in HTMLParser in python 2.6+
Upstream bug: http://bugs.python.org/issue3932
Rather than override the unescape method with the patch posted, we just convert the page
text to unicode before passing it to the HTMLParser. UTF8 and Latin1 will eat just about
anything.
2011-10-11 13:06:27 -04:00
James Vega 1c321409b8 Topic: Ensure do315's response is for a channel in our state object
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 44eb449ba4)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-10-11 11:56:02 -04:00
James Vega a8736d9a64 Seen: Anchor nick regexp to ensure valid match.
When searching for 'st*ke', 'stryker' would incorrectly match, 'stryke' would
be added to the nick set and the subsequent lookup would cause a KeyError.
This is fixed both by anchoring the regexp ('^st.*ke$' instead of 'st.*ke')
and adding searchNick to the nick set instead of the string that matched the
pattern.

Closes: Sf#3377381

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 0cd4939678)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-10-11 11:55:27 -04:00
James Vega 59936f52f3 Update Internet.hexip to handle IPv6
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit b0e595fbd2)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-10-11 11:55:16 -04:00
James Vega 5c9139990b Update Internet.dns to handle IPv6 IPs and responses
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit d56381436c)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-10-11 11:55:06 -04:00
Daniel Folkinshteyn 7c14992fe8 RSS: don't output anything if there are no headlines remaining after filtering. 2011-08-15 13:45:07 -04:00
Daniel Folkinshteyn c270111c6b RSS: fix bug failing to define a variable under some conditions before referencing it. 2011-08-15 11:13:54 -04:00
Daniel Folkinshteyn a345262846 Factoids: fix bug when making an alias to a newkey that already has a factoid associated with it. 2011-08-14 14:58:11 -04:00
Daniel Folkinshteyn af32d6bfd3 RSS: add channel-specific blacklist and whitelist.
also fix bug introduced with the initialannounce feature, which overwrote newheadlines
list when doing channel-specific things with it.
2011-08-14 01:42:08 -04:00
Daniel Folkinshteyn e23bd93ded Secure some more commands which take a regexp from untrusted user input.
Namely todo.search, note.search, dunno.search.
2011-08-12 18:13:27 -04:00
Daniel Folkinshteyn 47fdfe2e9a String: set default re subprocess timeout to 0.1, since that should be quite enough. 2011-08-12 16:38:36 -04:00
Daniel Folkinshteyn 57884bba57 Misc: fix potential ddos when misc.last command is fed a specially-crafted regexp. 2011-08-12 16:30:46 -04:00
Daniel Folkinshteyn 3e0375812a String: fix it up to work with the previously committed enhancement for subprocess timeout. 2011-08-12 16:30:09 -04:00
Daniel Folkinshteyn 08e676e8fe Misc: fix test for misc.last 2011-08-12 16:21:36 -04:00
Daniel Folkinshteyn 3a96f6735b Services: catch occasional error when removing waiting joins from list 2011-08-08 18:45:02 -04:00
Daniel Folkinshteyn 1e337bdfa9 Dict: Fix FSF address in included dictclient module
Taking fresh address from http://www.gnu.org/licenses/old-licenses/gpl-2.0.html#SEC4
2011-06-27 14:41:49 -04:00
Daniel Folkinshteyn 2b708f034b Web: add 'timeout' config for web fetch, default 5 sec.
Otherwise, when a site would take a long time to respond, the thread would hang for quite a while.

also needed to mod src/utils/web.py to take the timeout arg.
2011-06-13 16:42:57 -04:00
Daniel Folkinshteyn 1b74b8ddf6 Seen: fix tests so they pass. fix seen command so it properly accepts nick wildcards. 2011-04-04 16:30:52 -04:00
Valentin Lorentz da5b2b35e2 Seen: Fix save Seen.any.db. (thanks to beo_ for the repport and the test)
Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2011-04-04 16:21:12 -04:00
Daniel Folkinshteyn c25db0ecdf Services: fix problem with some channels being mixed up between networks on startup, when noJoinsUntilIdentified is true.
When noJoinsUntilIdentified config is true, the bot holds join messages in a 'waitingJoins' list, and processes them
once nickserv identification comes through. The problem was that when the bot is configured to join multiple networks,
join messages from different networks would get appended to the same list, without any differentiation by which message
belongs to which network. Thus, if there are messages waiting for multiple networks, it would often be the case that
whichever network got identification done first, would 'pick up' other network's join messages.

This fix stores the network name along with the join messages in the list, and has each network pick out only its own
join messages.
2011-03-13 14:21:46 -04:00
Daniel Folkinshteyn 831a2c3b9a Topic: get shouldn't require capabilities, since it's a read-only operation. 2011-01-25 01:26:42 -05:00
Daniel Folkinshteyn 3151d08e73 Filter: fix rainbow so it doesn't fail with numbers.
fixing this bug: https://sourceforge.net/tracker/?func=detail&aid=3140981&group_id=58965&atid=489447

Thanks to The Compiler for the report and the fix.
2011-01-24 16:18:01 -05:00