Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
irker
Manage
Activity
Members
Labels
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
f51c7345
Commit
f51c7345
authored
Nov 30, 2013
by
Eric S. Raymond
Browse files
Options
Downloads
Patches
Plain Diff
I think this would work to terminate immediaate mode...
...if we could see message traffic!
parent
a6bbbb2b
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
irkerd
+5
-1
5 additions, 1 deletion
irkerd
with
5 additions
and
1 deletion
irkerd
+
5
−
1
View file @
f51c7345
...
...
@@ -684,6 +684,7 @@ class Irker:
self
.
irc
.
add_event_handler
(
"
kick
"
,
self
.
_handle_kick
)
self
.
irc
.
add_event_handler
(
"
every_raw_message
"
,
self
.
_handle_every_raw_message
)
self
.
servers
=
{}
self
.
until
=
None
def
thread_launch
(
self
):
thread
=
threading
.
Thread
(
target
=
self
.
irc
.
spin
)
thread
.
setDaemon
(
True
)
...
...
@@ -749,6 +750,9 @@ class Irker:
with
open
(
logfile
,
"
a
"
)
as
logfp
:
logfp
.
write
(
"
%03f|%s|%s
\n
"
%
\
(
time
.
time
(),
event
.
source
,
event
.
arguments
[
0
]))
if
self
.
until
is
not
None
:
if
self
.
until
==
event
.
arguments
[
0
]:
raise
SystemExit
,
1
def
pending
(
self
):
"
Do we have any pending message traffic?
"
return
[
k
for
(
k
,
v
)
in
self
.
servers
.
items
()
if
v
.
pending
()]
...
...
@@ -870,8 +874,8 @@ if __name__ == '__main__':
if
immediate
:
(
to
,
privmsg
)
=
val
.
split
(
"
,
"
)
irker
.
handle
(
'
{
"
to
"
:
"
%s
"
,
"
privmsg
"
:
"
%s
"
}
'
%
(
to
,
privmsg
))
irker
.
until
=
privmsg
irker
.
irc
.
spin
()
# FIXME: This mode does not yet terminate
else
:
irker
.
thread_launch
()
try
:
...
...
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
register
or
sign in
to comment