mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-09 02:54:13 +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:])
|
messages = pprint.pformat(irc.state.history[-10:])
|
||||||
email = textwrap.dedent("""
|
email = textwrap.dedent("""
|
||||||
Subject: %s
|
Subject: %s
|
||||||
|
From: jemfinch@users.sourceforge.net
|
||||||
|
To: supybot-bugs@lists.sourceforge.net
|
||||||
Date: %s
|
Date: %s
|
||||||
|
|
||||||
Bug report for Supybot %s.
|
Bug report for Supybot %s.
|
||||||
@ -247,10 +249,12 @@ class MiscCommands(callbacks.Privmsg):
|
|||||||
userHostmask = msg.prefix.split('!', 1)[1]
|
userHostmask = msg.prefix.split('!', 1)[1]
|
||||||
if nick:
|
if nick:
|
||||||
try:
|
try:
|
||||||
hostmask = irc.state.nickToHostmask(nick)
|
(public, L) = self._mores[nick]
|
||||||
otherUserHostmask = hostmask.split('!', 1)[1]
|
if public:
|
||||||
L = self._mores[otherUserHostmask][:]
|
self._mores[userHostmask] = L[:]
|
||||||
self._mores[userHostmask] = L
|
else:
|
||||||
|
irc.error(msg, '%s has no public mores.' % nick)
|
||||||
|
return
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error(msg, 'Sorry, I can\'t find a hostmask for %s' % nick)
|
irc.error(msg, 'Sorry, I can\'t find a hostmask for %s' % nick)
|
||||||
return
|
return
|
||||||
|
@ -385,6 +385,7 @@ class IrcObjectProxy:
|
|||||||
utils.nItems(len(msgs), 'message', 'more')
|
utils.nItems(len(msgs), 'message', 'more')
|
||||||
mask = msg.prefix.split('!', 1)[1]
|
mask = msg.prefix.split('!', 1)[1]
|
||||||
Privmsg._mores[mask] = msgs
|
Privmsg._mores[mask] = msgs
|
||||||
|
Privmsg._mores[msg.nick]=(ircutils.isChannel(msg.args[0]),msgs)
|
||||||
self.irc.queueMsg(reply(msg, response, self.prefixName))
|
self.irc.queueMsg(reply(msg, response, self.prefixName))
|
||||||
else:
|
else:
|
||||||
self.args[self.counter] = s
|
self.args[self.counter] = s
|
||||||
|
Loading…
Reference in New Issue
Block a user