mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Use reply instead of queueMsg where possible.
This commit is contained in:
parent
445e76bef7
commit
4e2be3a6a3
@ -88,9 +88,9 @@ class DCC(callbacks.Privmsg):
|
||||
port = sock.getsockname()[1]
|
||||
self.log.info('DCC CHAT port opened at (%s, %s)', host, port)
|
||||
sock.listen(1)
|
||||
irc.queueMsg(ircmsgs.privmsg(msg.nick,
|
||||
'\x01DCC CHAT chat %s %s\x01' % \
|
||||
(i, port)))
|
||||
m = ircmsgs.privmsg(msg.nick,
|
||||
'\x01DCC CHAT chat %s %s\x01' % (i, port))
|
||||
irc.queueMsg(m)
|
||||
try:
|
||||
(realSock, addr) = sock.accept()
|
||||
except socket.timeout:
|
||||
|
@ -102,6 +102,7 @@ class Herald(callbacks.Privmsg):
|
||||
|
||||
def doJoin(self, irc, msg):
|
||||
channel = msg.args[0]
|
||||
irc = callbacks.SimpleIrc(irc, msg)
|
||||
if self.registryValue('heralding', channel):
|
||||
try:
|
||||
id = ircdb.users.getUserId(msg.prefix)
|
||||
@ -127,7 +128,7 @@ class Herald(callbacks.Privmsg):
|
||||
return
|
||||
self.lastHerald[channel, id] = now
|
||||
herald = plugins.standardSubstitute(irc, msg, herald)
|
||||
irc.queueMsg(ircmsgs.privmsg(channel, herald))
|
||||
irc.reply(herald)
|
||||
|
||||
def doPart(self, irc, msg):
|
||||
try:
|
||||
|
@ -186,7 +186,7 @@ class Note(callbacks.Privmsg):
|
||||
if len(ids) <= self.registryValue('notify.autoSend'):
|
||||
for id in ids:
|
||||
s = '#%s: %s' % (id, self._formatNote(self.db.get(id), to))
|
||||
irc.queueMsg(ircmsgs.privmsg(msg.nick, s))
|
||||
irc.reply(s, private=True)
|
||||
self.db.setRead(id)
|
||||
return
|
||||
unnotifiedIds = ['#%s' % nid for nid in ids]
|
||||
|
@ -108,6 +108,7 @@ class QuoteGrabs(plugins.ChannelDBHandler, callbacks.Privmsg):
|
||||
return db
|
||||
|
||||
def doPrivmsg(self, irc, msg):
|
||||
irc = callbacks.SimpleProxy(irc, msg)
|
||||
if ircutils.isChannel(msg.args[0]):
|
||||
(channel, payload) = msg.args
|
||||
words = self.registryValue('randomGrabber.minimumWords',
|
||||
@ -153,7 +154,7 @@ class QuoteGrabs(plugins.ChannelDBHandler, callbacks.Privmsg):
|
||||
|
||||
def _sendGrabMsg(self, irc, msg):
|
||||
s = 'jots down a new quote for %s' % msg.nick
|
||||
irc.queueMsg(ircmsgs.action(msg.args[0], s))
|
||||
irc.reply(s, action=True)
|
||||
|
||||
def grab(self, irc, msg, args):
|
||||
"""[<channel>] <nick>
|
||||
|
Loading…
Reference in New Issue
Block a user