Removed some XXXes.

This commit is contained in:
Jeremy Fincher 2004-12-16 09:50:42 +00:00
parent b9067089b1
commit e91a897f53
8 changed files with 18 additions and 20 deletions

View File

@ -67,7 +67,6 @@ class Cycler(callbacks.Privmsg):
len(irc.state.channels[channel].users) == 1:
if 'i' not in irc.state.channels[channel].modes and \
'k' not in irc.state.channels[channel].modes:
# XXX We should pull these keywords from the registry.
self.log.info('Cycling %s: I\'m the only one left.', channel)
irc.queueMsg(ircmsgs.part(channel))
networkGroup = conf.supybot.networks.get(irc.network)

View File

@ -325,12 +325,11 @@ class Http(callbacks.Privmsg):
Returns the results of querying filext.com for file extensions that
match <ext>.
"""
# XXX This probably ought to be handled in a converter from commands.py
invalid = '|<>\^=?/[]";,*'
for c in invalid:
if c in ext:
irc.error('\'%s\' is an invalid extension character' % c)
return
irc.error('%s is an invalid extension character' %
utils.quoted(c), Raise=True)
s = 'http://www.filext.com/detaillist.php?extdetail=%s&goButton=Go'
text = webutils.getUrl(s % ext)
matches = self._filextre.findall(text)

View File

@ -61,7 +61,6 @@ class ActiveObservers(registry.SpaceSeparatedListOfStrings):
String = callbacks.canonicalName
conf.registerPlugin('Observer')
# XXX These both need to be CanonicalStrings.
conf.registerGlobalValue(conf.supybot.plugins.Observer, 'observers',
Observers([], """Determines what observers are available.""",
orderAlphabetically=True))

View File

@ -128,10 +128,10 @@ class Protector(callbacks.Privmsg):
chanOp = ircdb.makeChannelCapability(channel, 'op')
chanVoice = ircdb.makeChannelCapability(channel, 'voice')
chanhalfop = ircdb.makeChannelCapability(channel, 'halfop')
if not ircdb.checkCapability(msg.prefix, chanop):
irc.sendMsg(ircmsgs.deop(channel, msg.nick))
for (mode, value) in ircutils.separateModes(msg.args[1:]):
if not value:
# XXX We should check whether this person has the right to do
# a mode change like this.
continue
if ircutils.strEqual(value, msg.nick):
# We allow someone to mode themselves to oblivion.

View File

@ -108,7 +108,7 @@ class Scheduler(callbacks.Privmsg):
thereafter). <name> is a name by which the command can be
unscheduled.
"""
name = name.lower() # XXX We should have a "compose" context for this.
name = name.lower()
self.events[name] = command
f = self._makeCommandFunction(irc, msg, command, remove=False)
id = schedule.addPeriodicEvent(f, seconds, name)

View File

@ -126,6 +126,9 @@ class Seen(callbacks.Privmsg):
if irc.isChannel(msg.args[0]):
said = ircmsgs.prettyPrint(msg)
channel = msg.args[0]
channelSpecific = conf.supybot.databases.plugins.channelSpecific
if not conf.get(channelSpecific, channel):
channel = conf.get(channelSpecific.channel, channel)
self.db.update(channel, msg.nick, said)
try:
id = ircdb.users.getUserId(msg.prefix)
@ -164,8 +167,7 @@ class Seen(callbacks.Privmsg):
irc.reply('I haven\'t seen anyone matching %s.' % name)
except KeyError:
irc.reply('I have not seen %s.' % name)
# XXX This should be channeldb, but ChannelUserDictionary does't support it.
seen = wrap(seen, ['channel', 'nick'])
seen = wrap(seen, ['channeldb', 'nick'])
def last(self, irc, msg, args, channel):
"""[<channel>]
@ -179,7 +181,7 @@ class Seen(callbacks.Privmsg):
(channel, utils.timeElapsed(time.time()-when), said))
except KeyError:
irc.reply('I have never seen anyone.')
last = wrap(last, ['channel'])
last = wrap(last, ['channeldb'])
def user(self, irc, msg, args, channel, user):
@ -198,7 +200,7 @@ class Seen(callbacks.Privmsg):
said))
except KeyError:
irc.reply('I have not seen %s.' % name)
user = wrap(user, ['channel', 'otherUser'])
user = wrap(user, ['channeldb', 'otherUser'])
Class = Seen

View File

@ -311,9 +311,8 @@ class Services(callbacks.Privmsg):
# You have been unbanned from (oftc)
irc.sendMsg(networkGroup.channels.join(channel))
elif 'isn\'t registered' in s:
# XXX We should notify the user that this happened as well.
self.log.info('Received "%s isn\'t registered" from ChanServ',
channel)
self.log.warning('Received "%s isn\'t registered" from ChanServ',
channel)
elif 'this channel has been registered' in s:
self.log.debug('Got "Registered channel" from ChanServ.')
elif 'already opped' in s:
@ -321,8 +320,7 @@ class Services(callbacks.Privmsg):
# we already have ops.
self.log.debug('Got "Already opped" from ChanServ.')
elif 'access level' in s and 'is required' in s:
# XXX We should notify the user that this happened.
self.log.debug('Got "Access level required" from ChanServ.')
self.log.warning('Got "Access level required" from ChanServ.')
elif 'inviting' in s:
self.log.debug('Got "Inviting to channel" from ChanServ.')
else:

View File

@ -444,7 +444,7 @@ class ChannelIdDatabasePlugin(callbacks.Privmsg):
def search(self, irc, msg, args, channel, optlist, glob):
"""[<channel>] [--{regexp,by} <value>] [<glob>]
Searches for $types matching the criteria given. XXX
Searches for $types matching the criteria given.
"""
predicates = []
def p(record):
@ -459,8 +459,9 @@ class ChannelIdDatabasePlugin(callbacks.Privmsg):
elif opt == 'regexp':
predicates.append(lambda r, arg=arg: arg.search(r.text))
if glob:
# XXX Case sensitive.
predicates.append(lambda r: fnmatch.fnmatch(r.text, glob))
def globP(r, glob=glob.lower()):
return fnmatch.fnmatch(r.text.lower(), glob)
predicates.append(globP)
L = []
for record in self.db.select(channel, p):
L.append(self.searchSerializeRecord(record))