Terje Hoås
2327317b33
Web: Fix fetch. Use getUrl instead of getUrlFd.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2013-01-08 20:32:43 -05:00
James McCoy
295f9b1f0d
Make utils.str.soundex perform better when length is large
...
Closes: Sf patch#148
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-12-31 17:29:02 -05:00
Valentin Lorentz
8d8e574d12
Owner: fix error message when the ImportError comes from the plugin
2012-12-02 20:35:52 -05:00
Daniel Folkinshteyn
3c30463e11
Math: default %f formatting rounds to 6 decimal places. increase that to 16.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-11-04 19:48:53 -05:00
Daniel Folkinshteyn
910ad6dd62
core: make network.channels and channel keys private by default. Otherwise these can reveal secret information.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-11-04 19:43:36 -05:00
Valentin Lorentz
ac13d09511
conf.py: Prevent traceback if server address is an IPv6 address.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-11-03 14:48:16 -04:00
Daniel Folkinshteyn
c68afacc0f
Math: calc: coerce argument to ascii string. working with unicode errors on the translate() step.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-30 19:09:45 -04:00
Valentin Lorentz
484d7e6fac
Misc: Notify the caller when @tell succeeded. Closes GH-97.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-24 17:36:21 -04:00
Valentin Lorentz
9b8397193b
Admin: Add clearq command.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-24 01:45:38 -04:00
Valentin Lorentz
8062d9592c
Change the minimal number of non-wildcard characters in hostmask from 8 to 3. Closes GH-276.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-24 01:36:19 -04: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
James McCoy
57e429011d
Misc: Use regexp_wrapper for Misc.last
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-24 00:24:16 -04:00
James McCoy
c774be3ea6
commands: Add process and regexp_wrapper to __all__
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-24 00:23:25 -04:00
James McCoy
90b7f3cd4e
utils.web: Simplify getUrlFd by using standard parse methods
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-23 17:06:30 -04:00
James McCoy
180508496f
docs/USING_WRAP.rst: Add docs for missing converters
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-20 19:43:55 -04:00
James McCoy
6ab807be43
utils.net: Use _ipAddr and _domain from utils.web to define emailRe
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-20 19:43:11 -04:00
Valentin Lorentz
db3746d122
Add support for authentication scheme.
...
This commit closes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=690879
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-20 19:42:15 -04:00
Valentin Lorentz
7d87d422e1
Fix detection of .42 domains
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-20 19:15:05 -04:00
Daniel Folkinshteyn
dfdfd00b04
core: make sure owner is never ignored. also simplify the logic flow in ignore checking.
...
Thanks m4v for the patch!
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-20 15:11:23 -04:00
Daniel Folkinshteyn
18ec61842c
Secure some more commands which take a regexp from untrusted user input.
...
Namely todo.search, note.search, dunno.search.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-20 15:06:43 -04:00
Daniel Folkinshteyn
ac500b059a
String: set default re subprocess timeout to 0.1, since that should be quite enough.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-20 14:56:30 -04:00
Daniel Folkinshteyn
9356d0734f
Misc: fix potential ddos when misc.last command is fed a specially-crafted regexp.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-20 14:56:11 -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
6a9af819a3
src/commands.py: make subprocesses raise an error on timeout, rather than return a string
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 22:14:15 -04:00
Daniel Folkinshteyn
f310350335
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.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 22:10:56 -04:00
Daniel Folkinshteyn
ce9891368b
Seen: fix tests so they pass. fix seen command so it properly accepts nick wildcards.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 22:09:34 -04:00
Valentin Lorentz
8ded033410
Seen: Fix save Seen.any.db. (thanks to beo_ for the repport and the test)
...
Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 22:06:49 -04:00
Daniel Folkinshteyn
854e086fa7
Topic: get shouldn't require capabilities, since it's a read-only operation.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 22:04:35 -04:00
Daniel Folkinshteyn
02b9431536
BadWords: improve help for requireWordBoundaries config.
...
Make a note that the plugin requires restart or the words set updating,
for changes to this setting to take effect.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 22:01:39 -04:00
Daniel Folkinshteyn
011d4dd676
Badwords: add plugin docstring, and fix/standardize some method docstrings.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 22:00:08 -04:00
Daniel Folkinshteyn
a5ec33adeb
Make plugin loading/reloading case-insensitive.
...
Since load/reload was the only place where case mattered for plugins, and it tripped up
a lot of new users, this should be a nice bit of usability improvement.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 21:51:00 -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
9fc7ec28b4
Fix error handling for subprocesses.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 21:44:04 -04:00
Daniel Folkinshteyn
7504c646b7
Status.processes: add output of currently active processes.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 21:35:26 -04:00
Daniel Folkinshteyn
141b120a9c
commands.process: return immediately when terminating process, without having to deal with the queue.
...
otherwise, we have to block for $smalldelay between putting and getting the item, since queue putting is not instantaneous
and sometimes we would get 'nothing returned' instead of the timeout message.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 21:32:54 -04:00
Daniel Folkinshteyn
7f4a1be9f9
Status: add 'processes' command, the multiprocessing equivalent of the threads command.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 21:32:17 -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
Daniel Folkinshteyn
d691a91636
Topic: fix bug in invalid number error output.
...
Previously, when giving an invalid positive number, error would reference number-1 as being invalid.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 20:52:27 -04:00
Daniel Folkinshteyn
84b878b10e
Filter: catch invalid input for unbinary command.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 20:51:13 -04:00
Daniel Folkinshteyn
7feb50685a
Filter: add unbinary command, as counterpart to binary command.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 20:47:30 -04:00
Daniel Folkinshteyn
6025f7364c
core: force inet_aton argument to string to prevent occasional error on reconnect.
...
it /should/ always be a string anyway, but sometimes things break with
a TypeError that it is an int instead of the expected string and hangs
up the bot.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-14 12:21:56 -04:00
James McCoy
aa4071fa68
RSS: Remove local/feedparser and add it to install_requires
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-14 12:13:00 -04:00
James McCoy
450be69710
Bootstrap setuptools if it isn't available.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-14 12:12:23 -04:00
James McCoy
0b81b170ca
Indicate supybot.networks.$network.servers/channels are space-separated lists in their help
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-04 21:41:00 -04:00
Valentin Lorentz
b8b79d063d
Admin: Change message 'It's banned me' into 'I am banned.'. Closes GH-329.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-17 22:22:34 -04:00
James McCoy
198688eab4
Import external dateutil module
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-17 22:15:52 -04:00
James McCoy
cef93a6cfd
Use relative imports for all packages under the supybot namespace
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-17 22:12:11 -04:00
James McCoy
b1552ced11
Ignore setuptools directories
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-17 21:31:49 -04:00