Send a PONG event, use the right arg when sending a WHO
This commit is contained in:
parent
0ff36444d4
commit
f2b2ac52e7
1 changed files with 6 additions and 2 deletions
|
@ -61,11 +61,15 @@ def handle(line, prefix, command, args, is_final, _bot, server):
|
||||||
bot = _bot
|
bot = _bot
|
||||||
handler_function(data)
|
handler_function(data)
|
||||||
|
|
||||||
@handler(description="reply to a ping")
|
@handler(description="received a ping from the server")
|
||||||
def handle_PING(data):
|
def handle_PING(data):
|
||||||
nonce = data.args[0]
|
nonce = data.args[0]
|
||||||
data.server.send_pong(nonce)
|
data.server.send_pong(nonce)
|
||||||
bot.events.on("received").on("ping").call(nonce=nonce, server=data.server)
|
bot.events.on("received").on("ping").call(nonce=nonce, server=data.server)
|
||||||
|
@handler(description="received a pong from the server")
|
||||||
|
def handle_PONG(data):
|
||||||
|
nonce = data.args[1]
|
||||||
|
bot.events.on("recevied").on("pong").call(nonce=nonce, server=data.server)
|
||||||
|
|
||||||
@handler(description="the first line sent to a registered client", default_event=True)
|
@handler(description="the first line sent to a registered client", default_event=True)
|
||||||
def handle_001(data):
|
def handle_001(data):
|
||||||
|
@ -143,7 +147,7 @@ def handle_353(data):
|
||||||
channel.add_mode(mode, nickname)
|
channel.add_mode(mode, nickname)
|
||||||
@handler(description="on-join user list has finished", default_event=True)
|
@handler(description="on-join user list has finished", default_event=True)
|
||||||
def handle_366(data):
|
def handle_366(data):
|
||||||
data.server.send_who(data.args[2])
|
data.server.send_who(data.args[1])
|
||||||
|
|
||||||
@handler(description="on user joining channel")
|
@handler(description="on user joining channel")
|
||||||
def handle_JOIN(data):
|
def handle_JOIN(data):
|
||||||
|
|
Loading…
Reference in a new issue