mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 22:51:01 +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]
|
port = sock.getsockname()[1]
|
||||||
self.log.info('DCC CHAT port opened at (%s, %s)', host, port)
|
self.log.info('DCC CHAT port opened at (%s, %s)', host, port)
|
||||||
sock.listen(1)
|
sock.listen(1)
|
||||||
irc.queueMsg(ircmsgs.privmsg(msg.nick,
|
m = ircmsgs.privmsg(msg.nick,
|
||||||
'\x01DCC CHAT chat %s %s\x01' % \
|
'\x01DCC CHAT chat %s %s\x01' % (i, port))
|
||||||
(i, port)))
|
irc.queueMsg(m)
|
||||||
try:
|
try:
|
||||||
(realSock, addr) = sock.accept()
|
(realSock, addr) = sock.accept()
|
||||||
except socket.timeout:
|
except socket.timeout:
|
||||||
|
@ -102,6 +102,7 @@ class Herald(callbacks.Privmsg):
|
|||||||
|
|
||||||
def doJoin(self, irc, msg):
|
def doJoin(self, irc, msg):
|
||||||
channel = msg.args[0]
|
channel = msg.args[0]
|
||||||
|
irc = callbacks.SimpleIrc(irc, msg)
|
||||||
if self.registryValue('heralding', channel):
|
if self.registryValue('heralding', channel):
|
||||||
try:
|
try:
|
||||||
id = ircdb.users.getUserId(msg.prefix)
|
id = ircdb.users.getUserId(msg.prefix)
|
||||||
@ -127,7 +128,7 @@ class Herald(callbacks.Privmsg):
|
|||||||
return
|
return
|
||||||
self.lastHerald[channel, id] = now
|
self.lastHerald[channel, id] = now
|
||||||
herald = plugins.standardSubstitute(irc, msg, herald)
|
herald = plugins.standardSubstitute(irc, msg, herald)
|
||||||
irc.queueMsg(ircmsgs.privmsg(channel, herald))
|
irc.reply(herald)
|
||||||
|
|
||||||
def doPart(self, irc, msg):
|
def doPart(self, irc, msg):
|
||||||
try:
|
try:
|
||||||
|
@ -186,7 +186,7 @@ class Note(callbacks.Privmsg):
|
|||||||
if len(ids) <= self.registryValue('notify.autoSend'):
|
if len(ids) <= self.registryValue('notify.autoSend'):
|
||||||
for id in ids:
|
for id in ids:
|
||||||
s = '#%s: %s' % (id, self._formatNote(self.db.get(id), to))
|
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)
|
self.db.setRead(id)
|
||||||
return
|
return
|
||||||
unnotifiedIds = ['#%s' % nid for nid in ids]
|
unnotifiedIds = ['#%s' % nid for nid in ids]
|
||||||
|
@ -108,6 +108,7 @@ class QuoteGrabs(plugins.ChannelDBHandler, callbacks.Privmsg):
|
|||||||
return db
|
return db
|
||||||
|
|
||||||
def doPrivmsg(self, irc, msg):
|
def doPrivmsg(self, irc, msg):
|
||||||
|
irc = callbacks.SimpleProxy(irc, msg)
|
||||||
if ircutils.isChannel(msg.args[0]):
|
if ircutils.isChannel(msg.args[0]):
|
||||||
(channel, payload) = msg.args
|
(channel, payload) = msg.args
|
||||||
words = self.registryValue('randomGrabber.minimumWords',
|
words = self.registryValue('randomGrabber.minimumWords',
|
||||||
@ -153,7 +154,7 @@ class QuoteGrabs(plugins.ChannelDBHandler, callbacks.Privmsg):
|
|||||||
|
|
||||||
def _sendGrabMsg(self, irc, msg):
|
def _sendGrabMsg(self, irc, msg):
|
||||||
s = 'jots down a new quote for %s' % msg.nick
|
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):
|
def grab(self, irc, msg, args):
|
||||||
"""[<channel>] <nick>
|
"""[<channel>] <nick>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user