master
sidekek 4 years ago
parent a0ab8fc0c6
commit 9f20ddcb2d
  1. 4
      bot.py
  2. 1
      ircked.py

@ -4,9 +4,9 @@ def default_event_handler(msg, ctx):
print("<<", str(msg)) print("<<", str(msg))
if msg.command == "PING": if msg.command == "PING":
message.manual("", "PONG", msg.parameters).send(ctx.socket) message.manual("", "PONG", msg.parameters).send(ctx.socket)
if msg.command == "001": elif msg.command == "001":
message.manual("", "JOIN", ["#qrs"]).send(ctx.socket) message.manual("", "JOIN", ["#qrs"]).send(ctx.socket)
if msg.command == "PRIVMSG" and "\x01VERSION\x01" in msg.parameters: elif msg.command == "PRIVMSG" and "\x01VERSION\x01" in msg.parameters:
message.manual(":"+msg.parameters[0], "PRIVMSG", [msg.prefix[1:].split("!")[0], ":\x01dorfl bot\x01"]).send(s) message.manual(":"+msg.parameters[0], "PRIVMSG", [msg.prefix[1:].split("!")[0], ":\x01dorfl bot\x01"]).send(s)
class bot: class bot:
def __init__(self): def __init__(self):

@ -5,4 +5,3 @@ dorfl = bot()
dorfl.connect_register("irc.rizon.net", 7000) dorfl.connect_register("irc.rizon.net", 7000)
dorfl.run() dorfl.run()
s.close()
Loading…
Cancel
Save