Valentin Lorentz
3af1e3f42d
Fix internationalization of docstrings of wrap()ed commands.
2014-01-21 16:33:35 +01:00
Valentin Lorentz
06fdaa792f
Continue accelerating the 2to3 step (remove fix_map).
2014-01-21 10:57:38 +01:00
Valentin Lorentz
35a62b4e77
Continue accelerating the 2to3 step (remove fix_ws_comma, fix_xreadlines, and fix_zip).
2014-01-21 10:40:18 +01:00
Valentin Lorentz
359d3c633d
registry: Make subvalues inherit privacy. Closes GH-519.
2013-10-06 14:26:03 +00:00
Valentin Lorentz
990b911c06
Merge remote-tracking branch 'supybot/master' into testing
...
Conflicts:
src/callbacks.py
src/ircdb.py
2013-09-22 20:16:20 +02:00
James McCoy
6361b1e856
ircdb: Deduplicate hostmasks in IrcUser.addAuth
...
If addAuth is called with a hostmask that already exists (exactly, not
just equivalent patterns) in self.auth, remove the entry for the old
authentication. This essentially updates the timeout for the hostmask.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2013-09-22 11:13:52 -04: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
James McCoy
e7d0bfd2d0
commands: Handle OverflowError in _int
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2013-08-23 23:36:44 -04:00
James McCoy
333067c151
Provide a default help message for commands without help.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2013-08-23 22:57:13 -04:00
Valentin Lorentz
744681d259
Fix syntax error in tests when run with Python 3.1 and 3.2.
2013-08-10 15:40:10 +02:00
Valentin Lorentz
029c6993ad
Fix c23f25545f
for Python 2.
2013-08-10 15:25:40 +02:00
Valentin Lorentz
1ee8bc3480
Fix bug that caused commands like '@google google google google translate' to be valid. Closes GH-19.
2013-08-10 15:22:47 +02:00
Valentin Lorentz
c23f25545f
Fix core tests for Python 3 (actually imported + fixes).
2013-08-10 15:18:04 +02:00
Valentin Lorentz
6a4750015e
schedule: Add the 'count' argument.
2013-08-04 09:16:07 +02:00
Valentin Lorentz
61e5edefd3
Add test case for scheduler.addPeriodicEvent.
2013-08-04 09:12:03 +02:00
Valentin Lorentz
995ba6f229
Make sure strictRfc is on before testing for assertions.
2013-04-11 20:04:04 +02:00
Valentin Lorentz
574d73c14e
Fix RFC-compliance of privmsgs/notices/kicks/whois/... with list of nicks/channels are argument. Closes GH-462.
2013-03-23 11:06:08 +01:00
Valentin Lorentz
30c5519acb
Final encoding fix. It now work on IRC and unit tests pass, both with Python 2 & 3.
2013-01-22 21:02:04 +01:00
Valentin Lorentz
a4a595b39a
Partial fix of encoding handling.
...
This fixes mostly everything, except a little bit from the test framework. I'm just saving this in case my computer or I is destroyed in an alien invasion, because this commit is worth hours of debugging.
2013-01-22 20:35:11 +01:00
Valentin Lorentz
fe39d35b2f
core: Fix normalizeWhitespace handling of new lines.
2013-01-04 22:28:44 +01: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
Valentin Lorentz
79eeb8eb95
Revert "irclib: Apply changes to supybot.protocols.irc.maxHistoryLength immediately."
...
This reverts commit 1d2eefe880
.
IrcState instances are created more than five times a second! Imagine how much
memory is used (hint: 300MB five minutes after startup).
We should first try to reduce this amount.
2012-12-27 16:06:01 +00:00
Valentin Lorentz
1d2eefe880
irclib: Apply changes to supybot.protocols.irc.maxHistoryLength immediately.
2012-12-27 12:24:24 +00:00
Valentin Lorentz
6b7db2e9f1
test_irclib: Make use of context for maxHistoryLength.
2012-12-27 11:05:04 +00:00
Valentin Lorentz
724e77e5ac
Remove useless lines.
2012-12-21 20:17:42 +01:00
Valentin Lorentz
85f8bb3e46
Add unit tests for i18n.
2012-12-21 20:09:40 +01:00
Valentin Lorentz
d9f7e0e818
Add editable() method to registry.Json.
2012-12-08 21:13:54 +01:00
Valentin Lorentz
d8bd1f6f92
Add registry.Json.
2012-12-08 20:59:36 +01:00
Valentin Lorentz
4e8c35dd0c
Add context() method to registry.Value objects. Closes GH-430.
...
This method returns a context objet, for use with the 'with' statement.
2012-12-08 20:05:51 +01:00
Valentin Lorentz
fba70d15bc
Add configuration variable conf.supybot.capabilities.private.
...
This variable is a list of capabilities that are considered as 'private',
ie. the bot won't tell anyone but admins that a user has it, nor will the
bot give a list of users with this capability.
2012-10-29 20:15:14 +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
James McCoy
232aa86a1e
Merge branch 'maint/0.83.4'
2012-09-01 09:13:52 -04:00
James McCoy
c74e8f35ab
Fix regression in parsing 004 messages
...
This was introduced in commit 4232e40e26
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-08-26 12:59:41 -04:00
Valentin Lorentz
d2ab53cd19
Fix parsing of 004 message. (Broken in d9531d2d
).
2012-08-25 20:17:15 +02:00
Valentin Lorentz
16aeaaa4fe
Use the 'reverse' parameter of sorted() instead of 'mycmp'.
2012-08-05 14:49:47 +02:00
Valentin Lorentz
5a35c7fafd
Use __import__() instead of exec().
2012-08-05 10:22:15 +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
d52e501ae8
Use open() instead of file().
2012-08-04 13:13:16 +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
1fdf3688e9
Add a test to verify the nick converter honors strictRfc
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-05-25 18:15:17 +02:00
James McCoy
c574203bab
Add a test to verify the nick converter honors strictRfc
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-05-23 00:34:11 -04:00
James McCoy
d9531d2d29
Fix parsing of 004 message for supported umodes/chanmodes
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2011-12-14 01:31:28 +08: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
4232e40e26
Fix parsing of 004 message for supported umodes/chanmodes
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2011-11-07 05:58:27 -05:00
Daniel Folkinshteyn
8f7c4bdf7f
Fix banmask creation. Thanks Progval for the patch!
...
fixes https://sourceforge.net/tracker/?func=detail&aid=3088559&group_id=58965&atid=489447
incorporating patch https://sourceforge.net/tracker/?func=detail&aid=3163843&group_id=58965&atid=489449
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2011-10-22 14:25:26 -04: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
Valentin Lorentz
aefe980956
Fix a test case (default ident is no more supybot)
2011-06-22 21:02:47 +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
Valentin Lorentz
720b6d23eb
Fix to global hostmask. Fix bug #SF3088559 and submitted as patch #SF3163843
2011-01-22 10:17:32 +01:00
Jeremy Fincher
89a535e8c1
Until we can safely load Karma, this test is staying commented out.
2009-11-25 09:17:52 -06: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
75c300c6b0
Remove useless sets import and extraneous newlines
2009-03-11 13:37:26 -04:00
Jeremy Fincher
526e71e104
Added test for firewall, fixed implementation so it actually works.
2009-03-11 13:37:25 -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
James Vega
5b3ca9bd2d
src/registry.py, test/test_registry.py: Better handling of backslashes in config values.
2006-01-18 00:19:31 +00:00
Jeremy Fincher
4dcc4dea87
Fixed PrivmsgTextCase not to require Karma, which requires SQLite.
2006-01-12 19:08:39 +00:00
Jeremy Fincher
cede4a4a97
Fixed bug in ircutils.isNick, which allowed nicks to start with dashes.
2005-08-02 02:47:42 +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
James Vega
bd31b7f596
src/irclib: Handle IRCds which use a MAXLIST-style value for the MAXBANS 005 key.
2005-06-29 14:20:54 +00:00
James Vega
0880a07b72
test/test_callbacks: Fix a test failure.
2005-06-29 14:16:31 +00:00
James Vega
e4c9381f7b
src/commands: Update first so that state.errored will not prevent the bot from responding when the first converter fails.
2005-06-13 17:27:15 +00:00
James Vega
0027916214
test/test_callbacks.py: Added a test for multiple, nested invalidCommands not being recognized.
2005-06-08 14:28:48 +00:00
Jeremy Fincher
490fb0b140
Changed prefixName to prefixNick, which is more appropriate, and has always bothered me. Better now than later.
2005-06-01 21:08:30 +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
Jeremy Fincher
4fb15198a0
Properly fixed bugs where plugins expected strings and got non-strings.
2005-05-23 11:51:22 +00:00
Jeremy Fincher
a1992b55ec
Fixed the bug that caused "reply reply" to be necessary instead of just "reply".
2005-05-23 11:23:53 +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
8698eafd64
Add tests to clarify how source-nested commands work.
2005-04-14 01:47:21 +00:00
Jeremy Fincher
b48ca7ab71
Added supybot.protocols.irc.queuing.rateLimit.join, to throttle joins.
2005-04-14 01:35:35 +00:00
Jeremy Fincher
73f639b55f
Changed supybot.protocols.irc.refuseToQueueDuplicateMessages to supybot.protocols.irc.queuing.duplicates.
2005-04-14 00:56:26 +00:00
James Vega
8ce5a18120
Add tests for "command named same as nested command class".
2005-04-13 15:51:50 +00:00
Jeremy Fincher
0773aa31e5
Made Proxy Irc objects map to the same dictionary slot, so we don't need to worry about calling getRealIrc all the time.
2005-03-28 13:00:37 +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
Jeremy Fincher
0e68a44513
Fixed bug with nested plugins having the same name as themselves.
2005-03-09 08:05:24 +00:00
Jeremy Fincher
52fabfdaf7
Added a test for nested plugins having the same command name as the plugin name. It fails right now.
2005-03-09 07:28:35 +00:00
Jeremy Fincher
7c2bbeb638
Forgot the tests for source-nested plugins.
2005-02-25 10:00:42 +00:00
Jeremy Fincher
13e1f7ccb9
Added isSplit, a function for checking whether a given QUIT message is a split quit.
2005-02-25 09:59:39 +00:00
Jeremy Fincher
50d390ece4
Added a reset method, a couple more tests, and fixed a slight bug (IndexError being raised from the wrong place)
2005-02-25 09:44:51 +00:00
Jeremy Fincher
07814fc808
Fix for bug in first.__repr__.
2005-02-21 01:04:45 +00:00
Jeremy Fincher
06feea3ae7
Fixed test failures caused after test_irclib.py runs, and added a couple extra asserts and some commented out lines for more predictable test order.
2005-02-18 18:31:44 +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
5b3b616671
Forgot to remove the tests for getCommands.
2005-02-18 02:44:52 +00:00
James Vega
90c000793d
utils.gen.* functions shouldn't explicitly be called since they're all in the utils namespace.
2005-02-15 13:57:57 +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
Jeremy Fincher
46225641bd
Changed the implementation of IrcMsgQueue a bit.
2005-02-09 05:30:14 +00:00
Jeremy Fincher
affb09e4de
Commented out the case-insensitivity tests, since there's no easy way to fix them, and I'm willing to sacrifice the feature.
2005-02-07 06:08:37 +00:00
Jeremy Fincher
a3ebea6edd
Commented out a test that will probably never work again.
2005-02-07 06:05:37 +00:00
Jeremy Fincher
6b75be6e60
Changed supybot.protocols.irc.queueDuplicateMessages.
...
Changed supybot.protocols.irc.queueDuplicateMessages to
supybot.protocols.irc.refuseToQueueDuplicateMessages, and changed the default
to be to allow duplicate messages, rather than to reject them.
2005-02-03 20:13:49 +00:00
Jeremy Fincher
f6e132dde4
Added test_format.py, added floating point formatting to format, and fixed a bug in the %t format.
2005-02-01 11:57:50 +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
978cf65453
Added an email converter.
2005-02-01 07:08:13 +00:00