Commit Graph

49 Commits

Author SHA1 Message Date
James Lu b1cfb87e71 String: allow multi-character inputs in "ord" and "unicodename"
This allows them to support emoji ZWJ sequences, which render like one character but are actually multiple.
2022-10-06 08:31:22 +02:00
Valentin Lorentz 63eb6672ea Revert generic 'The Limnoria Contributors' in copyright notices
This commit reverts db7ef3f025
(though it keeps the year updates)

After discussion with several people, it seems better to mention
copyright owners explicitly. eg. https://reuse.software/faq/#vcs-copyright
explains the issue of using VCSs to track copyright.

As db7ef3f025 only replaced mentions
of my name with 'The Limnoria Contributors', this commit only needs
to undo that + add one person who contributed to setup.py.
2021-10-17 09:57:55 +02:00
Valentin Lorentz db7ef3f025 all: Add generic 'The Limnoria Contributors' to copyright notices.
No need to bother with details (that are all outdated / out of sync
anyway), just look up the git history.
2021-08-01 21:54:49 +02:00
Valentin Lorentz f1a5ab4866 String: Add unicodename and unicodesearch commands. 2021-03-11 22:49:13 +01:00
Valentin Lorentz c0527b6859 String: update docstrings of ord/chr, we're using unicode now 2021-03-10 22:19:35 +01:00
James Lu 41830a46aa String, Hashes: remove links describing hashing methods
These are either dead or don't accurately describe the state of these methods
today. For example, the SHA1 site still describes SHA-1 and MD5 as "trusted"
despite widely reported collision attacks already being possible[1][2][3].

[1]: https://www.computerworld.com/article/3173616/security/the-sha1-hash-function-is-now-completely-unsafe.html
[2]: https://arstechnica.com/information-technology/2017/02/at-deaths-door-for-years-widely-used-sha1-function-is-now-dead/
[3]: https://techcrunch.com/2017/02/23/security-researchers-announce-first-practical-sha-1-collision-attack/
2017-11-09 09:01:29 -08:00
Valentin Lorentz 6ec0af2da3 Strip CTCP characters from irc.reply by default. 2016-04-24 21:11:34 +02:00
Valentin Lorentz c3a2c800f1 Remove need for 2to3. 2015-08-11 16:50:23 +02:00
Valentin Lorentz 216c5d213f Replace sys.version_info[0] usages with minisix.PY{2,3}. 2015-08-09 00:23:03 +02:00
Valentin Lorentz ed37fb6646 String & core: Add support for G flag in matchers. Closes GH-1072. 2015-05-15 16:48:00 +02:00
Valentin Lorentz 981476d6d5 String: Return raw bytes when decode returns binary data. 2015-02-11 14:09:16 +00:00
Valentin Lorentz bcd39743f0 String: Strip all newline characters in base64 output. 2015-02-11 14:08:25 +00:00
James Lu a755238ef4 Add/improve help for Debug + plugins from F-W:
- Debug
- Factoids
- Format
- Games
- Google
- Herald
- Internet
- Karma
- Lart
- Math
- Misc
- MoobotFactoids
- Network
- News
- NickAuth
- Nickometer
- Note
- Owner
- Protector
- Quote
- QuoteGrabs
- Relay
- Scheduler
- Seen
- ShrinkUrl
- Status
- String
- Time
- Todo
- Topic
- URL
- Unix
- User
- Utilities
- Web
2014-11-30 12:07:41 -08:00
Valentin Lorentz 838c3e5a66 String: @re: catch “invalid group reference” exceptions. (Fixes second issue of GH-824.) 2014-08-25 09:43:12 +00:00
Valentin Lorentz bb7db3ab21 Continue accelerating the 2to3 step (remove fix_except). 2014-01-20 15:49:15 +01:00
Valentin Lorentz d1649a44ac Continue accelerating the 2to3 step (remove fix_idioms, fix_imports2, fix_input, fix_intern, fix_isinstance, fix_ne, fix_next, and fix_raw_input). 2014-01-20 15:13:01 +01:00
Valentin Lorentz 40675ffdfa Merge remote-tracking branch 'supybot/master' into testing
Conflicts:
	plugins/Admin/plugin.py
	plugins/BadWords/config.py
	plugins/Filter/plugin.py
	plugins/Google/plugin.py
	plugins/Math/plugin.py
	plugins/Misc/plugin.py
	plugins/Note/plugin.py
	plugins/RSS/plugin.py
	plugins/Seen/test.py
	plugins/ShrinkUrl/config.py
	plugins/ShrinkUrl/plugin.py
	plugins/ShrinkUrl/test.py
	plugins/Status/plugin.py
	plugins/String/config.py
	plugins/String/plugin.py
	plugins/Time/plugin.py
	plugins/Todo/plugin.py
	plugins/Web/plugin.py
	plugins/__init__.py
	scripts/supybot-botchk
	setup.py
	src/__init__.py
	src/callbacks.py
	src/commands.py
	src/conf.py
	src/drivers/Socket.py
	src/ircdb.py
	src/irclib.py
	src/ircutils.py
	src/questions.py
	src/registry.py
	src/schedule.py
	src/test.py
	src/utils/file.py
	src/utils/gen.py
	src/utils/net.py
	src/utils/web.py
	src/world.py
2013-08-24 11:28:29 +02:00
Valentin Lorentz 910244ef68 String: Fix plugin for Python 3. 2013-07-16 20:13:26 +00:00
Valentin Lorentz 3935152d65 Fix 'dictionary changed size during iteration'. 2013-05-10 23:55:48 +02:00
Valentin Lorentz 3dba9088b0 Merge remote-tracking branch 'supybot/master' into testing
Conflicts:
	INSTALL
	plugins/ChannelLogger/README.txt
	plugins/ChannelStats/README.txt
	plugins/Google/plugin.py
	plugins/Google/test.py
	plugins/Plugin/test.py
	plugins/Web/test.py
	setup.py
	src/callbacks.py
	src/ircdb.py
	src/irclib.py
	src/utils/str.py
	test/test_irclib.py
2013-01-01 21:11:24 +01:00
Daniel Folkinshteyn f6209a90c2 String: cap maximum soundex length to 1024. 2012-12-17 06:30:04 +01:00
James McCoy b5eac0994a Call unqualified process/regexp_wrapper, since commands exports them now.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-24 00:26:51 -04:00
Daniel Folkinshteyn 72c5c8ec09 String: fix it up to work with the previously committed enhancement for subprocess timeout.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-20 14:47:16 -04:00
Daniel Folkinshteyn 92be7c255f String: make levenshtein command threaded, since it can take a nontrivial amount of time with longer inputs.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 21:49:15 -04:00
Daniel Folkinshteyn 34e5aedc45 String: make re timeout configurable.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 21:47:32 -04:00
Daniel Folkinshteyn 7f98aa7105 Some improvements to the commands.process function - better process naming and informational output.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 21:28:41 -04:00
Daniel Folkinshteyn a2985c37d6 Create a commands.process function which runs a function inside a separate process.
This is the only way to limit the execution time of a possibly long-running python statement.
Use this on String.re, due to the possibility of pathologically long re matching in python.
This allows us to remove the 'trusted-only' restriction on string.re.
In the future, this should probably be used in other places that take user-supplied regexps,
such as 'misc last --regexp', for example, as well as other potentially long-running tasks
that can block the bot.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 21:19:34 -04:00
James McCoy 82ecf36fcd Update my name/contact information
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-01 10:16:48 -04:00
Valentin Lorentz a40ebae4da String: Apply/unapply base64 encoding when dealing with a binary encoding. 2012-08-05 17:55:29 +02:00
Valentin Lorentz 65eb79b8f2 String: Use the 'codecs' module and make it py3k-friendly. 2012-08-04 22:04:13 +02:00
Valentin Lorentz e92b8a62f5 Merge supybot's master (will make future merges easier)
Conflicts:
	plugins/Misc/plugin.py
	plugins/String/plugin.py
	src/drivers/Socket.py
	src/irclib.py
	src/ircutils.py
2012-04-03 16:55:29 +02:00
James McCoy 8b73f78b3e Merge branch 'maint/0.83.4'
Conflicts:
	plugins/Misc/plugin.py
	src/ircutils.py

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2011-11-13 15:26:19 -05:00
James McCoy 01c8dc7f78 String.decode: Only encode('utf-8') when the decode string is unicode
Closes: Sf#3165718
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2011-10-22 14:57:20 -04:00
Daniel Folkinshteyn 37597bfe94 Create a commands.process function which runs a function inside a separate process.
This is the only way to limit the execution time of a possibly long-running python statement.
Use this on String.re, due to the possibility of pathologically long re matching in python.
This allows us to remove the 'trusted-only' restriction on string.re.
In the future, this should probably be used in other places that take user-supplied regexps,
such as 'misc last --regexp', for example, as well as other potentially long-running tasks
that can block the bot.

Conflicts:

	plugins/String/plugin.py
	src/commands.py
2011-08-15 17:24:33 +02:00
Daniel Folkinshteyn 91ac1c2179 String: fix it up to work with the previously committed enhancement for subprocess timeout.
Conflicts:

	plugins/String/plugin.py
2011-08-13 01:55:25 +02:00
Valentin Lorentz 1cceeb7ad1 Fix @String decode utf8 issue 2011-01-26 08:30:20 +01:00
Valentin Lorentz 371a40e004 Internationalize Seen, Services, ShrinkUrl, Status, String, and Success 2010-10-20 09:10:03 +02:00
Štěpán Němec a66034f852 Fix some typos/wordings.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-08-26 16:34:12 -04:00
James Vega 804fbe8209 String: Trim trailing \n from encode's response.
Certain encode functions, like base64, add a trailing \n which simply clutters
the response for Supybot.

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-04-06 11:29:11 -04:00
James Vega 6a0b667817 String: Update the codecs URL in encode/decode's help
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-04-06 11:27:04 -04:00
James Vega ebfe8e66f3 String: Give a more useful message when decoding base64 fails
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-04-06 11:26:15 -04:00
James Vega 828d41e37d Add utils/crypt.py as a Python version-agnostic crypt module 2009-03-11 13:37:26 -04:00
James Vega 068f029355 wrap() String.len to vastly simplify the function and prevent responding with -1 when we get no arguments.
Add a test to make sure we respond with the help when called with no arguments.
2009-03-11 13:37:24 -04:00
James Vega a3e4fc5b1d Change the modeline to use softtabstop instead of tabstop. 2006-02-11 15:52:51 +00:00
James Vega 9971e991fe Fix the modelines. 2005-03-23 20:07:45 +00:00
Jeremy Fincher fdbecfd1d4 Changed the name of the strlen command just to be 'len'. 2005-02-10 07:04:08 +00:00
Jeremy Fincher b0cb616709 Changed callbacks.Privmsg to be callbacks.Plugin, and callbacks.PrivmsgCommandAndRegexp to be callbacks.Plugin. 2005-02-09 07:04:04 +00:00
James Vega c409493d3d Update some copyright strings. 2005-02-02 05:30:32 +00:00
James Vega 39e323f4b1 Split off commands from Fun and Utilities to the new String plugin. 2005-02-02 05:02:08 +00:00