3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 11:39:25 +01:00

protocols/: add outgoing squitServer()

This commit is contained in:
James Lu 2015-09-04 18:55:39 -07:00
parent 47a63cb8d6
commit 759f6c4492
2 changed files with 10 additions and 0 deletions

View File

@ -447,6 +447,11 @@ def spawnServer(irc, name, sid=None, uplink=None, desc='PyLink Server'):
_send(irc, sid, 'ENDBURST')
return sid
def squitServer(irc, source, target, text='No reason given'):
# -> :9PY SQUIT 9PZ :blah, blah
_send(irc, source, 'SQUIT %s :%s' % (target, text))
handle_squit(irc, source, 'SQUIT', [target, text])
def handle_ftopic(irc, numeric, command, args):
# <- :70M FTOPIC #channel 1434510754 GLo|o|!GLolol@escape.the.dreamland.ca :Some channel topic
channel = utils.toLower(irc, args[0])

View File

@ -596,6 +596,11 @@ def spawnServer(irc, name, sid=None, uplink=None, desc='PyLink Server'):
irc.servers[sid] = IrcServer(uplink, name, internal=True)
return sid
def squitServer(irc, source, target, text='No reason given'):
# -> SQUIT 9PZ :blah, blah
irc.send('SQUIT %s :%s' % (target, text))
handle_squit(irc, source, 'SQUIT', [target, text])
def handle_tb(irc, numeric, command, args):
# <- :42X TB 1434510754 #channel GLo|o|!GLolol@escape.the.dreamland.ca :Some channel topic
channel = args[1].lower()