|
|
@ -7,7 +7,11 @@ def default_event_handler(msg, ctx): |
|
|
|
elif msg.command == "001": |
|
|
|
elif msg.command == "001": |
|
|
|
message.manual("", "JOIN", ["#qrs"]).send(ctx.socket) |
|
|
|
message.manual("", "JOIN", ["#qrs"]).send(ctx.socket) |
|
|
|
elif 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(ctx.socket) |
|
|
|
|
|
|
|
if msg.command == "PRIVMSG": |
|
|
|
|
|
|
|
pm = privmsg.parse(msg) |
|
|
|
|
|
|
|
if pm.bod == ".hello": |
|
|
|
|
|
|
|
privmsg.build(ctx.nick, pm.to, "hello, world!").msg.send(ctx.socket) |
|
|
|
class bot: |
|
|
|
class bot: |
|
|
|
def __init__(self): |
|
|
|
def __init__(self): |
|
|
|
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
|
|
|
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
|
|
|