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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iDB
irker
Commits
87c73ff0
Commit
87c73ff0
authored
12 years ago
by
Eric S. Raymond
Browse files
Options
Downloads
Patches
Plain Diff
More steps towards actual IRC.
parent
aa4a469c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
irker.py
+6
-1
6 additions, 1 deletion
irker.py
with
6 additions
and
1 deletion
irker.py
+
6
−
1
View file @
87c73ff0
...
...
@@ -41,7 +41,8 @@ class Session():
self
.
port
=
6667
(
self
.
servername
,
self
.
channel
)
=
parts
[
0
].
split
(
"
/
"
,
1
)
# Client setup
#self.ircserver.connect(self.servername, self.port, "irk"+str(Session.count))
#self.ircserver.connect(self.servername, self.port, self.name())
# Also must join the channel.
Session
.
count
+=
1
def
enqueue
(
self
,
message
):
"
Enque a message for transmission.
"
...
...
@@ -52,11 +53,15 @@ class Session():
message
=
self
.
queue
.
get
()
self
.
ship
(
self
.
channel
,
message
)
self
.
queue
.
task_done
()
def
name
(
self
):
"
Generate a unique name for this session.
"
return
"
irk
"
+
str
(
Session
.
count
)
def
await
(
self
):
"
Block until processing of the queue is done.
"
self
.
queue
.
join
()
def
ship
(
self
,
channel
,
message
):
"
Ship a message to the channel.
"
# self.ircserver.privmsg(self.name(), message)
print
"
%s: %s
"
%
(
channel
,
message
)
class
Irker
:
...
...
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