Commit Graph

2704 Commits

Author SHA1 Message Date
Valentin Lorentz
4a5b98507f Revert 9a2eea4272 2010-10-10 16:54:46 +02:00
Valentin Lorentz
d156ae7474 Add the configuration variable help reloading 2010-10-10 16:46:55 +02:00
Valentin Lorentz
b44401dd1c Remove a forgotten debug print 2010-10-10 16:35:31 +02:00
Valentin Lorentz
9a2eea4272 Change the version name 2010-10-10 16:34:34 +02:00
Valentin Lorentz
a8319d3c6f Remove debug message and internationalize config.py in ChannelStats 2010-10-10 15:11:41 +02:00
Valentin Lorentz
a750fe6a2e Fix the internationalisation problem for the docstrings 2010-10-10 14:45:25 +02:00
Valentin Lorentz
50acd3d8d9 Creating the internationalization module and internationalize/localize ChannelStats into French 2010-10-09 11:36:22 +02:00
James Vega
26a458b9ec Merge branch 'maint/0.83.4' 2010-09-20 19:46:18 -04:00
James Vega
0fd6a84632 Use self.error() instead of raise for BooleanRequiredFalseOnWindows.
Closes: Sf#3070285
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2010-09-20 18:34:07 -04:00
James Vega
0abe22f5d1 Merge branch 'maint/0.83.4' 2010-09-08 23:50:35 -04:00
James Vega
b0575cec88 Handle changes to fnmatch.translate in Python 2.6
Define utils.python.glob2re based on the Python version being used.
Use glob2re in Todo and Note plugins.

Closes: Sf#3059292
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2010-09-08 23:31:01 -04:00
James Vega
e7ef97e529 Ensure channel-specific reply.whenNotAddressed works.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 166f32dcb0)
2010-08-24 19:52:59 -04:00
James Vega
8d5e4ba624 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)
2010-08-24 19:49:54 -04:00
James Vega
ff760d1c69 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)
2010-08-24 19:49:38 -04:00
James Vega
a6857ce9bf 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)
2010-08-24 19:49:30 -04:00
James Vega
fa199022e1 Make registry.Regexp.error mimic registry.Value.error
Regexp.error can't directly call Value.error because it's providing extra
information, so it needs to build the InvalidRegistryValue exception itself
and raise it.

Closes: Sf#2985241

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit ef8bd817e8)
2010-08-24 19:44:31 -04:00
James Vega
8d94ff743c Include hostmasks in JOIN, PART, QUIT logs.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 4a9596608a)
2010-08-24 19:44:10 -04:00
James Vega
e13d3d6943 Decode/encode as 'string_escape' when (de)serializing the registry.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2010-08-24 19:43:24 -04:00
James Vega
455b5631bc Update plugins to ignore all non-ACTION CTCP messages.
Also update commands.urlSnarfer to do the same, which allows us to revert
"Don't bother snarfing URLs from non-Action CTCP messages."

This reverts commit 3282e3407e.

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 288d7c6e02)
2010-08-24 19:42:11 -04:00
James Vega
2a18d07a2e Default to strict RFC compliance.
It's better to force people to use an RFC nick and change it after they
connect than to let non-RFC nicks get used and not be able to connect to the
network.

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 07e283f450)
2010-08-24 19:26:13 -04:00
James Vega
9ddf07ce97 Allow Banmask.makeBanmask to work when dynamic.channel is None.
This gives back the ability to generate a banmask based on the global banmask
settings instead of per-channel settings.

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 8a98653d3b)
2010-08-24 19:23:25 -04:00
James Vega
f0852a9e45 utils.web: Provide access to the raw httpUrlRe/urlRe strings
Using the compiled regexps for a PluginRegexp method's __doc__ doesn't work.

Closes Sourceforge #2879862

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 25fc2de643)
2010-08-24 19:14:58 -04:00
James Vega
3e984c71d0 Clarify databases.types.cdb.maximumModifications' help and use a proper type.
The code expects a float between 0 and 1 inclusive but was simply using
registry.Float.  registry.Probability matches the behavior we want.

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit e9a896c736)
2010-08-24 19:12:44 -04:00
James Vega
5a0f96fc8e Reply with an error when getBanmask doesn't have a valid channel.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 459bc616b1)
2010-08-24 19:12:21 -04:00
James Vega
bdf9e8836b Ensure getBanmask has a channel variable as per makeBanmask's requirement
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 260570bd4f)
2010-08-24 19:12:09 -04:00
Ricky Zhou
6299ef5c22 Account for negative times in timeElapsed.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit aa2337791a)
2010-08-24 19:02:16 -04:00
James Vega
024a77af48 Updated to 0.83.4.1+git.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 332a614eef)
2010-08-24 18:59:46 -04:00
James Vega
166f32dcb0 Ensure channel-specific reply.whenNotAddressed works.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2010-07-26 19:48:37 -04:00
James Vega
c10d964604 Elide ignored replies from nested command output.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2010-06-24 00:33:04 -04:00
James Vega
adc5d62bbf 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
2010-06-18 20:33:43 -04:00
James Vega
a278d17f2b 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>
2010-05-24 23:36:29 -04:00
James Vega
f03a3f6c85 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>
2010-05-24 15:44:25 -04:00
Jeremy Fincher
6135a88741 Updates and tweaks to some ircutils functions. 2010-05-18 12:48:36 -05:00
Štěpán Němec
6520d1f282 Topic plugin: Add persistence support.
Topics now persist between restarts.

Rationale: Useful when reloading/restarting; previously the topics would
be just forgotten. Don't use database, as that would be an unnecessary
overkill and in any case not needed.

(Also, remove the unused `re' module import.)

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2010-05-11 18:22:37 -04:00
Daniel Folkinshteyn
51eac7da5b add standardsubstitute vars 'utc' and 'gmt' which output current time in UTC.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2010-04-11 17:01:11 -04:00
Daniel Folkinshteyn
2c9f325cf4 fix some time display issues in standardsubstitute:
first, use explicit time.strftime() instead of time.ctime, since ctime() leaves an extra space between month and date, if date is
single-digit.

second, use stftime('%Z') for timezone, old code was a bug which always displayed the daylight saving timezone name, even when it wasn't
in effect. time.daylight is not a dst flag, it is a flag for whether a dst timezone is /defined/, not if it is in effect.

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2010-04-11 17:00:50 -04:00
James Vega
ef8bd817e8 Make registry.Regexp.error mimic registry.Value.error
Regexp.error can't directly call Value.error because it's providing extra
information, so it needs to build the InvalidRegistryValue exception itself
and raise it.

Closes: Sf#2985241

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2010-04-11 10:15:39 -04:00
James Vega
4a9596608a Include hostmasks in JOIN, PART, QUIT logs.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2010-02-28 21:17:35 -05:00
James Vega
0540513387 Decode/encode as 'string_escape' when (de)serializing the registry.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2010-01-30 23:03:35 -05:00
James Vega
288d7c6e02 Update plugins to ignore all non-ACTION CTCP messages.
Also update commands.urlSnarfer to do the same, which allows us to revert
"Don't bother snarfing URLs from non-Action CTCP messages."

This reverts commit 3282e3407e.

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2010-01-28 08:14:44 -05:00
Jeremy Fincher
5f9d2bc4ce We had an issue with a command flooder, so we've tightened command flood detection to detect things on a per-host basis, rather than a per-user@host basis. 2009-12-28 12:26:33 -06:00
Jeremy Fincher
b774268498 Added network to debug "Incoming message" log. 2009-12-28 12:17:27 -06:00
James Vega
07e283f450 Default to strict RFC compliance.
It's better to force people to use an RFC nick and change it after they
connect than to let non-RFC nicks get used and not be able to connect to the
network.

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-11-18 20:02:53 -05:00
James Vega
8a98653d3b Allow Banmask.makeBanmask to work when dynamic.channel is None.
This gives back the ability to generate a banmask based on the global banmask
settings instead of per-channel settings.

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-11-01 10:26:08 -05:00
James Vega
56ba12aa4b Add support for UltimateIRCd's ! (protected) user mode.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-10-23 19:20:02 -04:00
James Vega
035a9f2459 Add registry.TemplatedString for config variables which use string.Template 2009-10-15 22:17:36 -04:00
James Vega
25fc2de643 utils.web: Provide access to the raw httpUrlRe/urlRe strings
Using the compiled regexps for a PluginRegexp method's __doc__ doesn't work.

Closes Sourceforge #2879862

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-10-15 22:16:38 -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
James Vega
c5896ff6cb utils.web: Import urllib's urlencode into our namespace.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-09-29 19:54:07 -04:00
James Vega
56fbbe9f36 commands.py: Explain the odd userHostmask check in getOtherUser
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-09-23 18:29:49 -04:00