Handled some XXXs.

This commit is contained in:
Jeremy Fincher 2004-07-31 00:46:26 +00:00
parent 78b2fc86e4
commit a3e04ea9e8
5 changed files with 4 additions and 9 deletions

View File

@ -87,7 +87,6 @@ class Format(callbacks.Privmsg):
Returns <text> with foreground color <foreground> and background color
<background> (if given)
"""
# XXX: We need to fix ircutils.mircColors (note the s) to an IrcDict.
try:
fg = args.pop(0)
if args[0] in ircutils.mircColors:

View File

@ -176,10 +176,9 @@ class Relay(callbacks.Privmsg):
group = conf.supybot.networks.get(network)
(server, port) = group.servers()[0]
except (registry.NonExistentRegistryEntry, IndexError):
# XXX: This should be a real error.
if serverPort is None:
raise ValueError, '_connect requires a (server, port) if ' \
'the network is not registered.'
raise callbacks.Error, '_connect requires a (server, port) ' \
'if the network is not registered.'
conf.registerNetwork(network, servers=('%s:%s' % serverPort,))
if makeNew:
self.log.info('Creating new Irc for relaying to %s.', network)
@ -192,7 +191,6 @@ class Relay(callbacks.Privmsg):
self._addIrc(newIrc)
networks = self.registryValue('networks')
networks.add(network)
# XXX: Should set the value here, but I'm lazy, this'll work for now.
def disconnect(self, irc, msg, args):
"""<network>

View File

@ -139,7 +139,6 @@ class Words(callbacks.Privmsg):
Gives the possible crossword completions for <word>; use underscores
('_') to denote blank spaces.
"""
# XXX: Should we somehow disable this during a hangman game?
word = privmsgs.getArgs(args).lower()
word = re.escape(word)
word = word.replace('\\_', '_') # Stupid re.escape escapes underscores!

View File

@ -70,10 +70,10 @@ class AsyncoreDriver(asynchat.async_chat, object):
self.servers = servers
self.networkGroup = conf.supybot.networks.get(self.irc.network)
self.set_terminator('\n')
# XXX: Use utils.getSocket.
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
try:
server = self._getNextServer()
sock = utils.getSocket(server[0])
self.set_socket(sock)
log.info('Connecting to %s.', self.currentServer)
self.connect(server)
except socket.error, e:

View File

@ -390,7 +390,6 @@ class FormatParser(object):
context.reset()
elif c == '\x03':
self.getColor(context)
# XXX: Underline and reverse.
c = self.getChar()
return context