From c45ac845155ef49934c586b987b1b469d2da38ec Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 26 Aug 2012 13:59:50 -0400 Subject: [PATCH] Change a string to match an IRC command. --- irker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/irker.py b/irker.py index 0876412..7bd3d3b 100755 --- a/irker.py +++ b/irker.py @@ -2,7 +2,7 @@ """ irker - a simple IRC multiplexer daemon -Takes JSON objects of the form {'channel':, 'message':} +Takes JSON objects of the form {'channel':, 'privmsg':} and relays messages to IRC channels. Run this as a daemon in order to maintain stateful connections to IRC @@ -111,11 +111,11 @@ class Irker: "Perform a JSON relay request." try: request = json.loads(line.strip()) - if "channel" not in request or "message" not in request: + if "channel" not in request or "privmsg" not in request: self.logerr("ill-formed reqest") else: channel = request['channel'] - message = request['message'] + message = request['privmsg'] if channel not in self.sessions: self.sessions[channel] = Session(self, channel) self.sessions[channel].enqueue(message) -- 2.26.2