mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-30 23:09:23 +01:00
pr/insp: Servers should use FTOPIC, not TOPIC to send topics
This commit is contained in:
parent
4078cef3e4
commit
bf444f3f6a
@ -235,21 +235,17 @@ def noticeClient(irc, numeric, target, text):
|
|||||||
raise LookupError('No such PyLink PseudoClient exists.')
|
raise LookupError('No such PyLink PseudoClient exists.')
|
||||||
_send(irc, numeric, 'NOTICE %s :%s' % (target, text))
|
_send(irc, numeric, 'NOTICE %s :%s' % (target, text))
|
||||||
|
|
||||||
def _sendTopic(irc, numeric, target, text):
|
|
||||||
"""<irc object> <numeric> <text>
|
|
||||||
|
|
||||||
Sets the topic for <channel> to <text>."""
|
|
||||||
_send(irc, numeric, 'TOPIC %s :%s' % (target, text))
|
|
||||||
|
|
||||||
def topicClient(irc, numeric, target, text):
|
def topicClient(irc, numeric, target, text):
|
||||||
if not utils.isInternalClient(irc, numeric):
|
if not utils.isInternalClient(irc, numeric):
|
||||||
raise LookupError('No such PyLink PseudoClient exists.')
|
raise LookupError('No such PyLink PseudoClient exists.')
|
||||||
_sendTopic(irc, numeric, target, text)
|
_send(irc, numeric, 'TOPIC %s :%s' % (target, text))
|
||||||
|
|
||||||
def topicServer(irc, numeric, target, text):
|
def topicServer(irc, numeric, target, text):
|
||||||
if not utils.isInternalServer(irc, numeric):
|
if not utils.isInternalServer(irc, numeric):
|
||||||
raise LookupError('No such PyLink PseudoServer exists.')
|
raise LookupError('No such PyLink PseudoServer exists.')
|
||||||
_sendTopic(irc, numeric, target, text)
|
ts = int(time.time())
|
||||||
|
servername = irc.servers[numeric].name
|
||||||
|
_send(irc, numeric, 'FTOPIC %s %s %s :%s' % (target, ts, servername, text))
|
||||||
|
|
||||||
def inviteClient(irc, numeric, target, channel):
|
def inviteClient(irc, numeric, target, channel):
|
||||||
"""<irc object> <client numeric> <text>
|
"""<irc object> <client numeric> <text>
|
||||||
|
Loading…
Reference in New Issue
Block a user