Commit Graph

1570 Commits

Author SHA1 Message Date
Valentin Lorentz
0d627c05b7 Do not break UTF-8 characters in long words. Closes GH-1333. 2018-04-14 22:31:30 +02:00
Valentin Lorentz
f26f098d82 supybot-wizard: Warn if run with ~/.local/bin as CWD. 2018-04-11 11:57:12 +02:00
Valentin Lorentz
2472e857c7 Fix test on Python 3. 2018-02-02 00:19:37 +01:00
Valentin Lorentz
39dacf6e5b Fix Python 2 support. 2018-02-01 23:21:18 +01:00
Valentin Lorentz
030ce5e6d4 Fix previous commit. 2018-02-01 22:37:24 +01:00
Valentin Lorentz
63a17f7491 Rewrite text wrapping to count line size in bytes instead of characters.
Also, fix shitty comparisons that were done in reverse.
2018-02-01 21:32:14 +01:00
Valentin Lorentz
7e98802809 Drop STARTTLS support, it complicates the connection initialization too much. 2018-01-24 09:27:39 +01:00
James Lu
37a42b0e3b ircutils: split ! and @ in hostmasks from the right
This fixes /names parsing when ! is a prefix character and userhost-in-names is enabled: previously, strings such as "!@user!ident@some.host" were incorrectly split into "" for nick and "@user!ident@some.host" for ident@host.
2017-12-17 04:21:35 -05:00
Valentin Lorentz
11bbc89c9d Properly handle multiple hosts in supybot.servers.http.hosts4.
See ebb48a4808 (which I reverted).
2017-10-28 09:50:12 +02:00
James Lu
22408ce413 Fix tests from last commit 2016-03-15 08:35:46 -07:00
James Lu
1b0c2ab95a ircutils: add $network to standard substitutions 2016-03-14 20:30:11 -07:00
Valentin Lorentz
a8be36051f Add tests for ircdb serialization. 2016-02-07 10:49:44 +01:00
Valentin Lorentz
30cb10e422 Add support for CAP NEW, including reauthentication. 2015-12-12 00:52:44 +01:00
Valentin Lorentz
8aff8170e4 Filter list of SASL mechanisms when provided (908 or IRCv3.2-style CAP LS). 2015-12-11 23:30:57 +01:00
Valentin Lorentz
932345fa48 Fix test cases if ecdsa is not available. 2015-12-11 11:10:48 +01:00
Valentin Lorentz
45c23a8f54 Try all possible SASL mechanisms instead of just one. 2015-12-11 10:56:05 +01:00
Valentin Lorentz
15d59d1153 Handle AUTHENTICATE line splitting. 2015-12-10 20:08:53 +01:00
Valentin Lorentz
3b78fd2424 Tag NICK messages with the channel as for QUIT messages. 2015-12-04 13:27:11 +01:00
Valentin Lorentz
d2749ea4d6 Add support for BATCH. 2015-12-04 01:37:23 +01:00
Valentin Lorentz
f880229d78 Tag QUIT messages with the list of channels the user was on. 2015-12-04 01:14:42 +01:00
Valentin Lorentz
c587900c6f Make normalizeWhitespace remove \r as well. 2015-08-30 15:44:07 +02:00
Valentin Lorentz
09cb8e977f supybot-test: Add a new level of verbosity, for showing only unexpected exceptions. 2015-08-29 23:02:20 +02:00
Valentin Lorentz
39df987274 Fix timezone handling of b338a2370. 2015-08-22 20:38:16 +02:00
Valentin Lorentz
b338a23708 core: Use IRCv3.2 extension server-time to fill IrcMsg.time, if available. 2015-08-22 20:11:46 +02:00
Valentin Lorentz
11c10bb3f1 Add attribute IrcMsg.time. 2015-08-22 18:36:47 +02:00
jacksonmj
8eb5d4f240 Add support for italics
New functions:
ircutils.italic to add
ircutils.stripItalic to remove

And remove italics in ircutils.stripFormatting.
2015-08-21 21:44:11 +00:00
Valentin Lorentz
0254d7b84d Add a decorator to retry tests that fail often. 2015-08-11 17:13:27 +02:00
Valentin Lorentz
c3a2c800f1 Remove need for 2to3. 2015-08-11 16:50:23 +02:00
Valentin Lorentz
17bf893437 Fix imports. 2015-08-09 09:21:12 +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
078eb9bad8 Fix Python 2 compatiblity. 2015-08-08 23:21:12 +02:00
Valentin Lorentz
be118c3338 Remove use of fix_dict fixer. 2015-08-08 23:08:49 +02:00
nyuszika7h
869c6ce30d Fix capability negotiation 2015-06-12 15:08:45 +02:00
Valentin Lorentz
9e645ed645 Fix non-determinism in tests (again). 2015-05-25 03:12:01 +02:00
Valentin Lorentz
154d8c60ac Fix syntax error. 2015-05-24 12:44:16 +02:00
Valentin Lorentz
05ad96d8ae Fix non-determinism. 2015-05-24 12:40:28 +02:00
Valentin Lorentz
e2b3b917e5 Use CAP LS. 2015-05-24 12:25:42 +02:00
Valentin Lorentz
a2004b7150 Improve order of connect messages. 2015-05-17 12:31:14 +02:00
Valentin Lorentz
b405f998a5 NickAuth: Add support for account-tag (not tested). 2015-05-15 20:46:18 +02:00
Valentin Lorentz
ba495f5719 Add support for message tags. 2015-05-15 18:08:50 +02:00
Valentin Lorentz
7031e47ebd Fix merge. 2015-05-15 14:43:57 +02:00
Valentin Lorentz
487f8c8af5 Merge remote-tracking branch 'supybot/master' into testing
Conflicts:
	.mailmap
	README
	docs/FAQ.rst
	plugins/Ctcp/plugin.py
	plugins/Misc/plugin.py
	plugins/Network/plugin.py
	plugins/QuoteGrabs/plugin.py
	plugins/RSS/README.txt
	plugins/Relay/plugin.py
	plugins/ShrinkUrl/config.py
	plugins/ShrinkUrl/plugin.py
	plugins/ShrinkUrl/test.py
	setup.py
	src/callbacks.py
	src/commands.py
	src/conf.py
	test/test_commands.py
2015-05-15 14:41:08 +02:00
Valentin Lorentz
a39a6d247d Fix previous commit 2015-05-14 07:46:18 +00:00
Valentin Lorentz
ded7dc8e6f Fix Python 2.6 compatibility of previous commit. 2015-05-14 07:33:26 +00:00
Valentin Lorentz
3f9118a1a6 utils.str.format: Add support for sets for %L + add test case. Closes GH-1104 2015-05-14 07:14:29 +00:00
James Lu
6d20183abf tests: Use internal mock from Python 3.3+ if available
Closes ProgVal/Limnoria#1088.
2015-04-26 22:49:02 -07:00
Valentin Lorentz
b0846f914e
Fix crash for commands with ambiguous getopts shortcuts and no docstring.
Signed-off-by: James McCoy <vega.james@gmail.com>
2015-03-26 02:00:43 -04:00
Valentin Lorentz
6f9960d7a4 Fix crash for commands with ambiguous getopts shortcuts and no docstring. 2015-03-03 08:55:29 +01:00
James McCoy
a8cd99f121 commands._getRe: Restore original args for any failure
String.re uses first('regexpMatcher', 'regexpReplacer').  If the args
provided to String.re are not a matcher and are longer than a single IRC
message (e.g., from a nested command), then regexpReplacer would never
be tried.  A too long error should be handled the same as running out of
args while trying to find a valid regexp.

Signed-off-by: James McCoy <vega.james@gmail.com>
2015-02-18 22:09:38 -05:00
Valentin Lorentz
cb6669015e Make ircutils.standardSubstitute accept None as irc and msg. (Preliminary for GH-1041.) 2015-02-07 08:15:42 +01:00
nyuszika7h
c565af7765 Update tests again 2015-01-19 18:14:51 +01:00
Valentin Lorentz
ccea98b428 Update tests. 2015-01-19 17:38:51 +01:00
nyuszika7h
037cc98cac Fix capability negotiation 2014-08-05 11:22:56 +02:00
Valentin Lorentz
3d4f6502d8 Fix previous commit. 2014-08-05 00:29:43 +02:00
Valentin Lorentz
0ec8c13911 Fix test. 2014-08-04 21:52:31 +02:00
nyuszika7h
8729fee015 Fix typo 2014-08-02 13:47:19 +02:00
nyuszika7h
e185416987 Fix tests 2014-08-02 13:45:41 +02:00
Valentin Lorentz
c6cb948996 Fix Python 2.6 compatibility. 2014-07-31 19:53:00 +00:00
Valentin Lorentz
00aaf79ef8 Add test for union with TruncatableSet. 2014-07-31 15:50:26 +02:00
Valentin Lorentz
94fbea6266 Add utils.structures.TruncatableSet. 2014-07-31 14:24:47 +02:00
Valentin Lorentz
7569b613ff Fix tests for Python 2.6 (broken by 0a9d6469f0). 2014-07-12 10:16:51 +02:00
Valentin Lorentz
0a9d6469f0 Make dependency on python-mock optional. 2014-07-12 10:01:59 +02:00
Valentin Lorentz
6f19088724 Merge remote-tracking branch 'supybot/master' into testing
Conflicts:
	.gitignore
	plugins/Alias/plugin.py
	plugins/Anonymous/plugin.py
	plugins/Anonymous/test.py
	setup.py
	src/callbacks.py
2014-07-12 09:48:27 +02:00
venth
76599db944 questions.yn: Perform string, not identity, comparison against 'y'
The `is` operator performs object identity comparison.  Changing to `==`
implements the expected behavior.

Use the mock library to add tests verifying the API of questions.yn.
2014-06-01 22:52:58 -04:00
Mikaela Suomalainen
635511f7e6 fix previous commit 2014-05-22 18:56:58 +03:00
Mikaela Suomalainen
8ef5adbc77 fix previous commit
Thanks @ProgVal :)
2014-05-22 18:40:14 +03:00
Valentin Lorentz
4fe74ed397 Merge branch 'aka-sqlite3' into speed-up-2to3 2014-02-02 22:15:43 +01:00
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