Commit Graph

90 Commits

Author SHA1 Message Date
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
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
16aeaaa4fe Use the 'reverse' parameter of sorted() instead of 'mycmp'. 2012-08-05 14:49:47 +02:00
Valentin Lorentz
602f1c7ecb utils/str.py: Use classes Multiple* instead of lambda functions.
As in Python 3, functions are bound to a class when assigned to an attribute,
lambda functions get two parameters, unless they are decorated with classmethod().
And there is no reason to ask plugin developpers use this decorator, while we
avoid them doing this (more over, it is not obvious to debug if they forgot it).
2012-08-04 13:52:02 +02:00
Valentin Lorentz
fa35a07941 Add utils.str.multipleRemover. 2012-08-04 11:27:50 +02:00
Valentin Lorentz
fffccb4600 Add utils.str.multipleReplacer. 2012-08-04 11:27:41 +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
Valentin Lorentz
be585ecea9 Merge remote-tracking branch 'supybot/maint/0.83.4' into testing
Conflicts:
	src/ircutils.py
2011-08-23 16:41:52 +02:00
James Vega
543e78828b Add utils.net.isIPV4, with utils.net.isIP checking v4 or v6
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2011-06-06 21:44:15 -04:00
James Vega
f7cedae9ad Update ircutils.standardSubstitute to use string.Template
In the process, deprecate utils.str.perlVariableSubstitute.

Since string.Template doesn't support callable values though, we also
sub-class IrcDict and override __getitem__ to call the value if it is
callable.

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-10-15 22:16:29 -04:00
Jeremy Fincher
43129239d6 Added Seen.since, which lets a user see messages which were sent since the last time he parted a channel. 2009-07-01 15:40:58 -05:00
Jeremy Fincher
757991afc9 Added basic CacheDict with simple test. 2009-04-02 11:28:57 -05:00
James Vega
0c42ea111a Fix our RE parsing to handle multiple backslashes before the separator
This also adds support for using brace pairs ({}, [], (), <>) as the
separators for m//.
2009-03-11 13:37:27 -04:00
James Vega
5c197471c6 Fix the tests for mircColor and sorted (Thanks dcraven) 2007-05-08 18:40:48 +00:00
James Vega
a3e4fc5b1d Change the modeline to use softtabstop instead of tabstop. 2006-02-11 15:52:51 +00:00
Jeremy Fincher
5b8400e158 Removed utils.iter.one, which was dumb, because iterators have a .next() method that does the same thing. 2005-07-08 09:14:45 +00:00
Jeremy Fincher
b369039507 Added utils.iter.one, to grab one value from an iterable. 2005-06-12 04:54:15 +00:00
Jeremy Fincher
b5f1e2a3e7 Added utils.iter.limited, an iterable that limits the number of elements that can be taken from another iterable. 2005-05-30 19:19:11 +00:00
James Vega
7bfc9cbdd3 utils/str: Rename nth to ordinal and have it return the full string instead of just the ordinal ending. 2005-05-09 17:20:43 +00:00
James Vega
9971e991fe Fix the modelines. 2005-03-23 20:07:45 +00:00
Jeremy Fincher
6b19504515 Changed the utils.iter.choice test to work bettar. 2005-03-14 18:55:11 +00:00
James Vega
aefcd594df Move structures to utils/ 2005-03-12 18:01:47 +00:00
James Vega
568ebcdf96 Add tests for utils.iter.choice. 2005-02-18 13:40:29 +00:00
Jeremy Fincher
6aca01bafb Made utils.file.mktemp a little more stochastic. 2005-02-18 07:04:48 +00:00
Jeremy Fincher
8897e6458b Removed test/test_fix.py, moving its tests to test/test_utils.py, and fixed the resulting bugs that were discovered. 2005-02-01 07:08:30 +00:00
Jeremy Fincher
2b6994428e Fixed a bug that was introduced in nItems. 2005-02-01 07:06:36 +00:00
Jeremy Fincher
65893c8e3c Added emailRe to utils.net. 2005-02-01 06:34:58 +00:00
James Vega
afc3c3f94a Fix some calls to pluralize to not use the extra argument. Also updated the pluralize tests. 2005-01-31 15:59:44 +00:00
Jeremy Fincher
a19a979499 Robustified and improved utils.str.format a bit; added a simple test. 2005-01-28 15:23:18 +00:00
Jeremy Fincher
34f1fe6562 Swapped the argument order for nItems *again*. 2005-01-28 15:17:26 +00:00
Jeremy Fincher
5fd6bbb52d Completely restructured our utils modules.
Tons of changes.  Here's the summary of things that matter most:

* There is no more supybot.fix.
* There is no more supybot.webutils; now there is supybot.utils.web.
  * It's no longer webutils.WebError, but just utils.web.Error.
* You shouldn't import itertools, ideally, but instead import utils.iter.
* No more using imap/ifilter in commands unless absolutely necessary.  It's
  premature optimization and annoying.
* utils.str.format isn't quite ready yet, but will be soon.  That'll be the
  next big thing to fix in our code.
2005-01-27 06:59:08 +00:00
Jeremy Fincher
74b9a3c702 Moved eachSubstring to be a nested function; we don't use it anywhere else. 2005-01-26 14:41:42 +00:00
Jeremy Fincher
895cd3e48e Resurrected the test suite with the new supybot-test program and RCS. 2005-01-23 19:42:25 +00:00
Jeremy Fincher
3d3b1498fe Changed copyright years on test files 2005-01-24 21:27:34 +00:00
Jeremy Fincher
8ca625d339 Initial import. 2005-01-19 13:14:38 +00:00
James Vega
dbfec8afb9 Add supybot module 2007-04-22 20:10:26 +00:00
Jeremy Fincher
fdeae5c022 Better error-checking. 2005-01-13 17:48:47 +00:00
Jeremy Fincher
493aa57d8e Added a couple asserts. 2005-01-12 02:47:35 +00:00
Jeremy Fincher
cc084d2535 Removed some XXXes and allowed other separators than /. 2004-12-16 09:22:39 +00:00
Jeremy Fincher
5d37d71afb Test is too tight, commented out until an appropriate test can be devised. 2004-12-16 09:18:36 +00:00
Jeremy Fincher
5466544350 Fix for a bug in the short timeElapsed. 2004-12-08 20:27:59 +00:00
Jeremy Fincher
e4f15ae1b3 Cleaner implementation. 2004-12-08 07:45:24 +00:00
Jeremy Fincher
58b3268bdd Have exnToString handle exceptions whose str representation is empty. 2004-11-04 06:01:17 +00:00
James Vega
601d58a662 utils.quoted 2004-10-23 19:40:00 +00:00
James Vega
23397b44b4 Remove #! lines. 2004-09-20 15:25:47 +00:00
Jeremy Fincher
ec55e86c61 Let's catch SyntaxError and turn it into an appropriate ValueError. 2004-08-25 05:17:37 +00:00
Jeremy Fincher
fbb348b6e7 Copyright updates. Again, more is left to be done, but this is my part. 2004-08-23 13:14:06 +00:00
Jeremy Fincher
0f1842b18d Only do real variable names. 2004-08-21 02:57:47 +00:00
Jeremy Fincher
f9c61271ea w00, less path mungingEXCLAIMEXCLAIM 2004-07-24 05:18:26 +00:00
James Vega
315810d08e yay! no more stray whitespace 2004-07-21 19:36:35 +00:00