Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
irker
Manage
Activity
Members
Labels
Automate
Agent sessions
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iDB
irker
Commits
c45ac845
Commit
c45ac845
authored
Aug 26, 2012
by
Eric S. Raymond
Browse files
Options
Downloads
Patches
Plain Diff
Change a string to match an IRC command.
parent
623222aa
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
irker.py
+3
-3
3 additions, 3 deletions
irker.py
with
3 additions
and
3 deletions
irker.py
+
3
−
3
View file @
c45ac845
...
...
@@ -2,7 +2,7 @@
"""
irker - a simple IRC multiplexer daemon
Takes JSON objects of the form {
'
channel
'
:<channel-url>,
'
message
'
:<text>}
Takes JSON objects of the form {
'
channel
'
:<channel-url>,
'
privmsg
'
:<text>}
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment