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
2acf42b8
Commit
2acf42b8
authored
4 years ago
by
Eric S. Raymond
Browse files
Options
Downloads
Patches
Plain Diff
Address GitLab issue #14: Automatically split long lines in irk
parent
2d9aceca
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
irk
+7
-2
7 additions, 2 deletions
irk
with
7 additions
and
2 deletions
irk
+
7
−
2
View file @
2acf42b8
...
...
@@ -43,10 +43,15 @@ def main():
target
=
sys
.
argv
[
1
]
message
=
"
"
.
join
(
sys
.
argv
[
2
:])
# Allows pretty formatting of irker messages
message
=
message
.
decode
(
'
string_escape
'
)
if
str
==
bytes
:
message
=
message
.
decode
(
'
string_escape
'
)
# The actual IRC limit is 512. Avoid any off-by-ones
chunksize
=
511
try
:
irk
(
target
,
message
)
while
message
[:
chunksize
]:
irk
(
target
,
message
[:
chunksize
])
message
=
message
[
chunksize
:]
except
socket
.
error
as
e
:
sys
.
stderr
.
write
(
"
irk: write to server failed: %r
\n
"
%
e
)
sys
.
exit
(
1
)
...
...
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