Commit Graph

178 Commits

Author SHA1 Message Date
James Vega
a3e4fc5b1d Change the modeline to use softtabstop instead of tabstop. 2006-02-11 15:52:51 +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
James Vega
9971e991fe Fix the modelines. 2005-03-23 20:07:45 +00:00
James Vega
aefcd594df Move structures to utils/ 2005-03-12 18:01:47 +00:00
James Vega
0fde2393e6 Update usage of utils.iter functions. 2005-01-31 15:22:48 +00:00
Jeremy Fincher
5fd6bbb52d Completely restructured our utils modules.
Tons of changes.  Here's the summary of things that matter most:

* There is no more supybot.fix.
* There is no more supybot.webutils; now there is supybot.utils.web.
  * It's no longer webutils.WebError, but just utils.web.Error.
* You shouldn't import itertools, ideally, but instead import utils.iter.
* No more using imap/ifilter in commands unless absolutely necessary.  It's
  premature optimization and annoying.
* utils.str.format isn't quite ready yet, but will be soon.  That'll be the
  next big thing to fix in our code.
2005-01-27 06:59:08 +00:00
Jeremy Fincher
5019d10a1b Updated license years. 2005-01-19 13:33:05 +00:00
Jeremy Fincher
8ca625d339 Initial import. 2005-01-19 13:14:38 +00:00
James Vega
dbfec8afb9 Add supybot module 2007-04-22 20:10:26 +00:00
Jeremy Fincher
6d9cc6855d Updated some docstrings. 2004-12-20 19:19:29 +00:00
Jeremy Fincher
aa83ab2420 Removed an XXX. 2004-12-16 09:02:55 +00:00
Jeremy Fincher
eac5d2f9f8 Added a couple asserts. 2004-12-06 22:42:34 +00:00
Jeremy Fincher
e688faf16e Moved standardSubstitute to ircutils. 2004-10-27 01:37:19 +00:00
Jeremy Fincher
39ab3459de Removed a dumb valueerror. 2004-10-26 19:09:43 +00:00
James Vega
cbd5abbab7 A bunch more %r -> %s conversions as well as wrap updates, new policy for
Channel.voice and some bug fixes for Debian
2004-10-25 22:59:03 +00:00
Jeremy Fincher
a0c0d833e3 Let's make channellen parameterizable as well. 2004-10-15 11:20:51 +00:00
Jeremy Fincher
26771923f6 Allow None in IrcDict and InsensitivePreservingDicts. 2004-10-01 21:25:01 +00:00
James Vega
50973a10fb Remove #! lines. 2004-09-20 03:01:50 +00:00
Jeremy Fincher
1ba0fccd34 Slight tweak to make a test in test_Channel.py pass. 2004-09-16 14:29:13 +00:00
Jeremy Fincher
e44f7ab50c Fixed bug #1019387. Again. 2004-09-14 17:12:21 +00:00
Jeremy Fincher
934363db10 Added some __repr__ action. 2004-09-14 15:38:49 +00:00
Jeremy Fincher
39f427d4be Even when not strict, spaces can't be in nicks. 2004-09-12 05:48:36 +00:00
Jeremy Fincher
db7940089b Added FloodQueue. 2004-09-08 22:49:08 +00:00
Jeremy Fincher
fbb348b6e7 Copyright updates. Again, more is left to be done, but this is my part. 2004-08-23 13:14:06 +00:00
Jeremy Fincher
966129c9a3 A docstring doesn't hurt much. 2004-08-21 08:02:52 +00:00
Jeremy Fincher
d36459ab0b More spelling/capitalization normalization. 2004-08-19 13:33:34 +00:00
Jeremy Fincher
6bd8d43c28 PyChecker updates. 2004-08-10 22:09:23 +00:00
Jeremy Fincher
127e9f3ccf Fixed a bug in stripFormatting. 2004-08-08 02:07:11 +00:00
Jeremy Fincher
823bfb040f Added utils.AtomicFile and converted our uses of 'w' to it. This rocks. 2004-07-31 10:21:07 +00:00
James Vega
115a3a88ec move isCtcp to ircmsgs and fix up a couple things with Infobot 2004-07-31 03:45:25 +00:00
Jeremy Fincher
a3e04ea9e8 Handled some XXXs. 2004-07-31 00:46:26 +00:00
Jeremy Fincher
a8a95c2ecc Fixed the one-channel bug. 2004-07-30 22:35:51 +00:00
Jeremy Fincher
61793a489c Added the new buttkicking enable/disable. 2004-07-29 09:46:22 +00:00
Jeremy Fincher
bfa2382aae Slight doc/style updates. 2004-07-28 16:42:39 +00:00
Jeremy Fincher
f9c61271ea w00, less path mungingEXCLAIMEXCLAIM 2004-07-24 05:18:26 +00:00
Jeremy Fincher
a4386a6798 Updated to make mircColors an IrcDict, and clean up the limplementation of mircColor function. 2004-07-22 22:30:24 +00:00
Jeremy Fincher
c064aa1155 Let's make sure to zfill those digits before we mircColor. 2004-07-22 20:57:46 +00:00
Jeremy Fincher
9e6a3ed094 Fixed bug #960696. 2004-07-22 16:16:01 +00:00
James Vega
315810d08e yay! no more stray whitespace 2004-07-21 19:36:35 +00:00
Jeremy Fincher
2377a4a83c Automatically convert non-strings to strings with safeArgument. 2004-07-19 22:33:58 +00:00
Jeremy Fincher
581a489177 Changed the non-strictRfc implementation of isNick not to allow full hostmasks. 2004-06-19 03:04:02 +00:00
Jeremy Fincher
b4f977e2dd Fixed the wacky addressed problems. 2004-05-06 15:48:09 +00:00
Jeremy Fincher
b7fb78abed Slight optimization, finally figured out how to automatically intern all IrcStrings. 2004-04-27 11:06:26 +00:00
Jeremy Fincher
99adf8511f Uh, someone forgot to make the remainder of the changes necessary for the unColor -> stripColor conversion... 2004-04-15 23:41:24 +00:00
James Vega
e87c31aea4 ircutils.strip{Bold,Reverse,Underline,Formatting} 2004-04-15 21:15:57 +00:00
Jeremy Fincher
132adeff7d Updated. 2004-04-13 05:18:17 +00:00
James Vega
0027117e8c Fix some coloring/formatting bugs we had 2004-04-13 01:01:17 +00:00
Jeremy Fincher
f8b83f69f2 Slight optimization, not that it matters, but it makes the code easier to read, too. 2004-04-09 15:30:09 +00:00
James Vega
b2153c83fb unColor is now working. Added a colorstrip outfilter to Filter to close RFE
#863599
2004-04-09 03:59:12 +00:00
Jeremy Fincher
de512b24de Guarded asserts with strictRfc. 2004-02-24 11:21:12 +00:00
Jeremy Fincher
ff370e29cf Who knows why I wrote that without a for loop before? 2004-02-16 00:54:05 +00:00
Jeremy Fincher
487fb3cc2f Made separateModes int the argument if it can. 2004-02-16 00:51:29 +00:00
Jeremy Fincher
74300bb148 Man, I must've been really sleepy when I 'fixed' that code. 2004-02-13 08:58:29 +00:00
Jeremy Fincher
5d3a3437db Fixed G-LiTe's bug with -l. 2004-02-11 06:57:35 +00:00
Jeremy Fincher
c04d3632cc strictRfc added, off by default. 2004-02-11 05:57:34 +00:00
Jeremy Fincher
d2d5f880ed Trying something out for fixing the Jawoota unicode bug. 2004-02-10 06:19:16 +00:00
Jeremy Fincher
6771c24ca6 Added InsensitivePreservingDict and made IrcDict a subclass of it. 2004-02-05 07:14:35 +00:00
Jeremy Fincher
c62702cfc3 Foo! 2004-01-23 13:08:42 +00:00
Jeremy Fincher
fd132f20ad Added setdefault and get to IrcDict. 2004-01-19 22:29:55 +00:00
Jeremy Fincher
29426e2f1d Moved isIP* to utils from ircutils. 2004-01-16 17:33:51 +00:00
Jeremy Fincher
ed7748492f Fix for isIPV6 on platforms that don't support IPV6. 2004-01-07 22:48:01 +00:00
Jeremy Fincher
a0d2a9da2a Fixed bug #863808; added isIPV6. 2004-01-02 20:50:43 +00:00
Jeremy Fincher
a63d175498 Added memoization of hostmaskPatternEqual. 2003-12-16 20:36:43 +00:00
Jeremy Fincher
c1f88120f0 Added an assert. 2003-12-16 18:14:48 +00:00
Jeremy Fincher
3f6d347e2b Added isCtcp. 2003-12-10 18:49:45 +00:00
Jeremy Fincher
b91a1b8941 Oops, shouldn't have committed, a stray underscore got here. 2003-12-06 14:18:10 +00:00
Jeremy Fincher
12fff1941e Added a comment. 2003-12-06 14:16:18 +00:00
Jeremy Fincher
6925ecf760 New hostmaskPatternEqual that's a bit more correct and perhaps slightly faster. 2003-12-03 23:13:07 +00:00
Jeremy Fincher
c8de1e8155 Made the string of flags that require an argument an optional argument so you can parse the flags for some other purpose. 2003-12-01 21:59:01 +00:00
Jeremy Fincher
48166f4895 Huge update to the logging infrastructure. 2003-11-26 18:21:12 +00:00
Jeremy Fincher
a4284e7924 Added __revision__ strings. 2003-11-25 08:38:19 +00:00
Jeremy Fincher
eb6e112f70 Changed some maps/filters to imaps/ifilters for efficiency reasons (I was bored, basically). 2003-11-15 04:37:04 +00:00
Jeremy Fincher
6004181695 Fixed bug in banmask when the host doesn't have a dot in it (rare, but possible). 2003-11-13 19:00:35 +00:00
Jeremy Fincher
e0cfe722c7 Added an assert for easier debugging. 2003-11-11 14:06:19 +00:00
Jeremy Fincher
c746f9459b Optimization to hostmaskPatternEqual. 2003-11-05 22:21:43 +00:00
Jeremy Fincher
3f8c149047 Fixed major bugz0rs with IrcSet and IrcDict. 2003-11-04 05:50:19 +00:00
Jeremy Fincher
ff57e4b67b Made proper super calls. 2003-11-03 23:25:04 +00:00
Daniel Berlin
b0fd3f547c Move ircutils.standardsubttext to plugins.standardSubstitute, make it do case insensitive replacement 2003-10-30 05:14:14 +00:00
Daniel Berlin
70be390875 Add standard substitution function 2003-10-29 20:08:34 +00:00
Jeremy Fincher
6077e2896b Cosmetic change to a variable name. 2003-10-25 18:28:36 +00:00
Jeremy Fincher
1168251809 Removed shrinkList and privmsgPayload. 2003-10-23 05:13:51 +00:00
Jeremy Fincher
9c2a8121ec Fixed bug in isNick. 2003-10-22 01:40:27 +00:00
Jeremy Fincher
155aeebe42 Added dccIP and unDccIP. 2003-10-09 16:12:53 +00:00
Jeremy Fincher
8eed3f0982 Stupid __eq__ not being used in __ne__... 2003-10-09 05:46:35 +00:00
Jeremy Fincher
ce0002f454 Made IrcString more efficient/better, added a test for it. 2003-10-09 05:34:44 +00:00
Jeremy Fincher
970c819e79 Changed fix.py to munge __builtins__ rather than requiring a "from fix import *" statement. 2003-10-05 12:47:19 +00:00
Jeremy Fincher
2db658482a Extra docstrings, and indentation problem fixed. 2003-10-04 12:36:48 +00:00
Jeremy Fincher
898a4e2ef1 Added an assert to banmask. 2003-10-02 04:47:33 +00:00
Jeremy Fincher
6084d00067 Added __slots__ to IrcDict and IrcSet for optimization purposes. 2003-09-23 15:53:04 +00:00
Jeremy Fincher
708e8e553b Forget docstring and to remove the old regexp. 2003-09-04 17:33:04 +00:00
Jeremy Fincher
64459c93ec Fixed unColor to be right. 2003-09-04 17:32:27 +00:00
Jeremy Fincher
f0816d56a7 Changed bold and mircColor to use the right ender \x0F. 2003-09-03 09:46:06 +00:00
Jeremy Fincher
f0b533098c Added a return value to shrinkList, the number of things removed from the list. 2003-08-23 09:07:45 +00:00
Jeremy Fincher
ca646716b1 Removed spaces at the end of lines. 2003-08-20 16:26:23 +00:00
Jeremy Fincher
936c1fd85e Re-enabled ircutils.nick under a new name (IrcString) and for a different purpose (to make IrcDict and IrcSet work properly). 2003-08-14 14:15:07 +00:00
Jeremy Fincher
2a4c2ea185 Nuked ircutils.nick. Good riddance. 2003-08-12 19:12:12 +00:00
Jeremy Fincher
199de7e71a Changed the signature of canonicalColor to return an (fg, bg) pair. Also accepts a shift parameter which is the number of bits to >> the hash of the string. Both are used in Relay.py. 2003-08-12 08:50:28 +00:00
Jeremy Fincher
39cce9c3af Changed from 's.find(x) != -1' to 'x in s' 2003-08-11 17:16:03 +00:00
Jeremy Fincher
29f0b638b2 Added some more documentation. 2003-08-02 16:48:43 +00:00
Jeremy Fincher
5ec5b997ca Made safeArgument handle colors correctly. 2003-08-01 23:48:02 +00:00