mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-02 07:34:08 +01:00
Added functionality to protect private commands from being @more <nicked>, and fixed the fact that it doesn't work across the Relay.
This commit is contained in:
parent
89d5f7a088
commit
61a0142265
@ -165,6 +165,8 @@ class MiscCommands(callbacks.Privmsg):
|
||||
messages = pprint.pformat(irc.state.history[-10:])
|
||||
email = textwrap.dedent("""
|
||||
Subject: %s
|
||||
From: jemfinch@users.sourceforge.net
|
||||
To: supybot-bugs@lists.sourceforge.net
|
||||
Date: %s
|
||||
|
||||
Bug report for Supybot %s.
|
||||
@ -247,10 +249,12 @@ class MiscCommands(callbacks.Privmsg):
|
||||
userHostmask = msg.prefix.split('!', 1)[1]
|
||||
if nick:
|
||||
try:
|
||||
hostmask = irc.state.nickToHostmask(nick)
|
||||
otherUserHostmask = hostmask.split('!', 1)[1]
|
||||
L = self._mores[otherUserHostmask][:]
|
||||
self._mores[userHostmask] = L
|
||||
(public, L) = self._mores[nick]
|
||||
if public:
|
||||
self._mores[userHostmask] = L[:]
|
||||
else:
|
||||
irc.error(msg, '%s has no public mores.' % nick)
|
||||
return
|
||||
except KeyError:
|
||||
irc.error(msg, 'Sorry, I can\'t find a hostmask for %s' % nick)
|
||||
return
|
||||
|
@ -385,6 +385,7 @@ class IrcObjectProxy:
|
||||
utils.nItems(len(msgs), 'message', 'more')
|
||||
mask = msg.prefix.split('!', 1)[1]
|
||||
Privmsg._mores[mask] = msgs
|
||||
Privmsg._mores[msg.nick]=(ircutils.isChannel(msg.args[0]),msgs)
|
||||
self.irc.queueMsg(reply(msg, response, self.prefixName))
|
||||
else:
|
||||
self.args[self.counter] = s
|
||||
|
Loading…
Reference in New Issue
Block a user