mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-04 17:22:38 +01:00
Add a warning log.
This commit is contained in:
parent
b11c4f1390
commit
cedcad32e2
@ -61,6 +61,10 @@ conf.registerChannelValue(conf.supybot.plugins.Channel, 'alwaysRejoin',
|
|||||||
rejoin a channel whenever it's kicked from the channel."""))
|
rejoin a channel whenever it's kicked from the channel."""))
|
||||||
|
|
||||||
class Channel(callbacks.Privmsg):
|
class Channel(callbacks.Privmsg):
|
||||||
|
def __init__(self):
|
||||||
|
callbacks.Privmsg.__init__(self)
|
||||||
|
self.invites = {}
|
||||||
|
|
||||||
def doKick(self, irc, msg):
|
def doKick(self, irc, msg):
|
||||||
channel = msg.args[0]
|
channel = msg.args[0]
|
||||||
if msg.args[1] == irc.nick:
|
if msg.args[1] == irc.nick:
|
||||||
@ -420,10 +424,43 @@ class Channel(callbacks.Privmsg):
|
|||||||
sent in the channel itself.
|
sent in the channel itself.
|
||||||
"""
|
"""
|
||||||
self._sendMsg(irc, ircmsgs.invite(nick or msg.nick, channel))
|
self._sendMsg(irc, ircmsgs.invite(nick or msg.nick, channel))
|
||||||
|
self.invites[(irc.getRealIrc(), ircutils.toLower(nick))] = irc
|
||||||
invite = wrap(invite, [('checkChannelCapability', 'op'),
|
invite = wrap(invite, [('checkChannelCapability', 'op'),
|
||||||
('haveOp', 'invite someone'),
|
('haveOp', 'invite someone'),
|
||||||
additional('nick')])
|
additional('nick')])
|
||||||
|
|
||||||
|
def do341(self, irc, msg):
|
||||||
|
(_, nick, channel) = msg.args
|
||||||
|
nick = ircutils.toLower(nick)
|
||||||
|
replyIrc = self.invites.pop((irc, nick), None)
|
||||||
|
if replyIrc is not None:
|
||||||
|
self.log.info('Inviting %s to %s by command of %s.',
|
||||||
|
nick, channel, replyIrc.msg.prefix)
|
||||||
|
replyIrc.replySuccess()
|
||||||
|
else:
|
||||||
|
self.log.info('Inviting %s to %s.', nick, channel)
|
||||||
|
|
||||||
|
def do443(self, irc, msg):
|
||||||
|
(_, nick, channel, _) = msg.args
|
||||||
|
nick = ircutils.toLower(nick)
|
||||||
|
replyIrc = self.invites.pop((irc, nick), None)
|
||||||
|
if replyIrc is not None:
|
||||||
|
replyIrc.error('%s is already in %s.' % (nick, channel))
|
||||||
|
|
||||||
|
def do401(self, irc, msg):
|
||||||
|
nick = msg.args[1]
|
||||||
|
nick = ircutils.toLower(nick)
|
||||||
|
replyIrc = self.invites.pop((irc, nick), None)
|
||||||
|
if replyIrc is not None:
|
||||||
|
replyIrc.error('There is no %s on this network.' % nick)
|
||||||
|
|
||||||
|
def do504(self, irc, msg):
|
||||||
|
nick = msg.args[1]
|
||||||
|
nick = ircutils.toLower(nick)
|
||||||
|
replyIrc = self.invites.pop((irc, nick), NOne)
|
||||||
|
if replyirc is not None:
|
||||||
|
replyIrc.error('There is not %s on this server.' % nick)
|
||||||
|
|
||||||
def lobotomize(self, irc, msg, args, channel):
|
def lobotomize(self, irc, msg, args, channel):
|
||||||
"""[<channel>]
|
"""[<channel>]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user