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 Returns <text> with foreground color <foreground> and background color
<background> (if given) <background> (if given)
""" """
# XXX: We need to fix ircutils.mircColors (note the s) to an IrcDict.
try: try:
fg = args.pop(0) fg = args.pop(0)
if args[0] in ircutils.mircColors: if args[0] in ircutils.mircColors:

View File

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

View File

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

View File

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

View File

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