Commit Graph

7108 Commits

Author SHA1 Message Date
Daniel Folkinshteyn e5e9cbba69 Scheduler: add scheduled task persistence.
The list of tasks scheduled with the Scheduler plugin is now saved
on exit, and restored upon restart.

Previously all scheduled tasks would be forgotten upon bot restart,
which was undesirable behavior.
2010-09-01 15:03:20 -04:00
Daniel Folkinshteyn cf6fcb9928 Merge commit '05e8b658e633f37456340b83b01fa304f9fcc5d3', Add script to automatically update version with a datestamp upon commit. 2010-08-22 16:16:39 -04:00
Daniel Folkinshteyn 6230a32c69 Fix setup.py version import. It failed on clean install, since module supybot is not yet available.
When importing 'from src', that pulled src/__init__.py, which in turn tried to import the supybot module.
Now we edit sys.path and import the .py file directly.
2010-08-20 12:35:58 -04:00
Daniel Folkinshteyn 05e8b658e6 Add script to automatically update version with a datestamp upon commit. 2010-08-20 11:08:31 -04:00
Daniel Folkinshteyn 2a40d6eb90 Consolidate the version string to reside in one central place to ease change making. 2010-08-20 10:31:05 -04:00
quantumlemur 2c37d3e6a7 MessageParser: added configurable separator for the list command. 2010-08-19 20:12:07 -04:00
Daniel Folkinshteyn 29837e94b1 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.
2010-08-11 00:43:05 -04:00
James Vega 808cb2c9f4 Ensure channel-specific reply.whenNotAddressed works.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 166f32dcb0)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-08-11 00:13:49 -04:00
Daniel Folkinshteyn 4ea3761b4b String: make levenshtein command threaded, since it can take a nontrivial amount of time with longer inputs. 2010-08-08 01:46:05 -04:00
Daniel Folkinshteyn 2d9f61e66c String: make re timeout configurable. 2010-08-08 01:43:05 -04:00
Daniel Folkinshteyn e4498664bb Fix error handling for subprocesses. 2010-08-08 00:39:51 -04:00
Daniel Folkinshteyn 89fd19ed7d Status.processes: add output of currently active processes. 2010-08-06 14:48:21 -04:00
Daniel Folkinshteyn 27be9ceb74 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.
2010-08-05 14:48:12 -04:00
Daniel Folkinshteyn e779b70609 Merge branch 'multiprocess' 2010-08-05 14:01:23 -04:00
Daniel Folkinshteyn f55606cfb4 Status: add 'processes' command, the multiprocessing equivalent of the threads command. 2010-08-05 13:54:54 -04:00
Daniel Folkinshteyn 89cbc7efdf Some improvements to the commands.process function - better process naming and informational output. 2010-08-05 13:45:02 -04:00
Daniel Folkinshteyn 1b84e208ca Format.replace: replacement text is now allowed to be the empty string. 2010-08-05 01:27:38 -04:00
Daniel Folkinshteyn 0c300162d8 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.
2010-08-05 01:20:46 -04:00
Daniel Folkinshteyn 9398025088 MoobotFactoids: add check_same_thread=False to the sqlite3 connect calls, so it doesn't complain. (thanks malex!)
also fix up the code a bit so it doesn't fail the tests, and doesn't require presence of plain sqlite.
2010-08-02 17:51:17 -04:00
Daniel Folkinshteyn 3a181b6dd2 Google: fix encoding bug in lucky --snippet; need to pass encoded string to utils.web.htmlToText 2010-07-26 09:22:07 -04:00
Daniel Folkinshteyn d469108054 Topic: fix bug in invalid number error output.
Previously, when giving an invalid positive number, error would reference number-1 as being invalid.
2010-07-23 16:50:25 -04:00
Daniel Folkinshteyn 4aa876255c Filter: catch invalid input for unbinary command. 2010-07-21 12:57:18 -04:00
Daniel Folkinshteyn 920c37c314 Unix: add call command, giving owner ability to call any system command. 2010-07-21 12:48:46 -04:00
Daniel Folkinshteyn 76f109ce0d Google: in lucky --snippet, properly convert html to text, using utils.web.htmlToText. 2010-07-14 19:08:13 -04:00
Daniel Folkinshteyn 6905d22c2c Google: add --snippet option to lucky command, which shows the text snippet for the page. 2010-07-14 15:56:48 -04:00
brian c edc4d8644e Unix: various enhancements to the ping command:
Fixed bug in 100% packet loss response.
Errors from ping are now sent to irc.error().
Added packet count, interval, ttl, and wait options.
Added additional test cases.

Also, Enabled threading for Unix plugin, and
for wtf, spell, and ping commands.

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-07-13 11:52:51 -04:00
James Vega 3a84faeb18 Include String plugin for Utilities' tests.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 3090cffe2c)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-07-11 23:06:03 -04:00
James Vega 6e33df49ab ShrinkUrl: Add serviceRotation config.
When configured, the outFilter and shrinkSnarfer use cycle through
serviceRotation's list of services.  Otherwise, the default service is used.

Closes: deb#539858

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 0bfa0d153c)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-07-11 23:05:39 -04:00
Daniel Folkinshteyn a9e2fc7bed Socket driver: implement ssl connection support. 2010-07-11 02:29:02 -04:00
oevna@users.sourceforge.net 6df6d477f1 Unix: fixed uncaught OSError exception raised when executing ping fails.
Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-07-09 12:22:32 -04:00
Daniel Folkinshteyn e178d04522 Unix: fix test for the ping command, call unix ping instead of the default misc ping. 2010-07-08 23:29:01 -04:00
oevna@users.sourceforge.net a8e91a58a0 Added ping command to Unix plugin
Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-07-08 23:19:57 -04:00
Daniel Folkinshteyn 67a41f6626 Filter: add unbinary command, as counterpart to binary command. 2010-07-01 15:44:53 -04:00
James Vega 0781ff339e Services: Don't filter outgoing JOIN messages on disabled networks
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit acffde68ab)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-06-28 23:12:35 -04:00
James Vega 23cca935cb Use conf.registerGlobalValue to ensure generated values are properly setup.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 0c62204809)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-06-25 00:42:02 -04:00
James Vega dbde5fc250 Elide ignored replies from nested command output.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit c10d964604)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-06-25 00:41:47 -04:00
James Vega 16dbd8917a Services: Properly register the NickServ.password group and child values.
Closes: Sf#3019174

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit d78f7b6ac5)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-06-22 00:13:13 -04:00
James Vega be39fcdbc6 supybot: Remove extraneous sys.stdin.close()
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 0e22e218f0)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-06-21 14:53:28 -04:00
James Vega 9b9d009c43 Services: Fix conflict with callbacks.Commands.isDisabled
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit f926804f40)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-06-21 14:53:08 -04:00
James Vega d21fc27e0c Services: Disable most of the plugin on networks in the disabled list.
Notify the user when trying to use the commands on a disabled network, ignore
noJoinsUntilIdentified, and don't try communicating with services.

Closes: Sf#3018464

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 9e73f4482c)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-06-21 14:52:42 -04:00
James Vega 929859b246 Twisted: Send all available ircmsgs and reduce delay between checks
All ircmsgs that takeMsg will return should be processed each time
checkIrcForMsgs is called since there may be multiple available in the
fastqueue.

Reduced the time between calls of checkIrcForMsgs so the delay between
normally queued ircmsgs stays close to the configured throttleTime.

Closes: Sf#3018148
(cherry picked from commit adc5d62bbf)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-06-19 22:19:08 -04:00
Daniel Folkinshteyn 1ce52f01f4 ChannelLogger: include in logs the reasons for parts and quits 2010-06-15 23:53:15 -04:00
Daniel Folkinshteyn a91bc318dc Channel: nicks: add --count argument, which outputs only the count of nicks in channel.
also add tests for the nick command.
2010-06-13 02:36:18 -04:00
Daniel Folkinshteyn 80491fddb1 Conditional: allow empty string arguments in string-comparison functions 2010-06-03 17:03:39 -04:00
Daniel Folkinshteyn 5f2d2a9c5e Utilities: add countargs function, returns number of arguments supplied.
also add tests for it.
2010-06-03 16:08:25 -04:00
Daniel Folkinshteyn 52b36555f4 Utilities: add 'sample' command, a basic interface to random.sample()
Also add tests for it.
2010-06-03 13:06:28 -04:00
James Vega 108f7f2f86 Socket: Ensure driver is flagged as disconnected after a socket error.
Users were occasionally hitting a situation where the socket had errored,
causing a reconnect, but the socket wasn't closed nor the driver marked as
disconnected.  This resulted in run() continuing to try and use the driver,
which would cause another error, schedule another reconnect, log an error, ad
infinitum.

Closes: Sf#2965530

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit a278d17f2b)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-06-03 10:44:25 -04:00
James Vega bc8457dc90 utils/web.py: Only try catching socket.sslerror if built with SSL support
Closes: Sf#2998820

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit f03a3f6c85)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-06-03 10:43:54 -04:00
James Vega db479731b1 Anonymous: Implement support for allowPrivateTarget config.
Closes: Sf#2991515

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 57e894de58)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-06-03 10:43:31 -04:00
Jeremy Fincher df2c6c2650 Updates and tweaks to some ircutils functions.
(cherry picked from commit 6135a88741)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
2010-06-03 10:42:58 -04:00