mirror of
git://git.psyced.org/git/psyced
synced 2024-08-15 03:25:10 +00:00
back to old irc splitting code that works with OTR
This commit is contained in:
parent
2646840a52
commit
f8231d64d8
2 changed files with 9 additions and 3 deletions
|
@ -283,6 +283,8 @@ echo "[binary directory is $ARCH_DIR]"
|
||||||
## uname -m returns "Power Macintosh" on macosx. very unuseful.
|
## uname -m returns "Power Macintosh" on macosx. very unuseful.
|
||||||
##get ARCH_DIR "$BASE_DIR/bin-`uname -m`"
|
##get ARCH_DIR "$BASE_DIR/bin-`uname -m`"
|
||||||
## why did we call uname twice anyway? uname -s returns such a nice "darwin"
|
## why did we call uname twice anyway? uname -s returns such a nice "darwin"
|
||||||
|
## on linux it returns the actual processor type (i686, x86_64, etc)
|
||||||
|
## which these days needs to be considered.. FIXME
|
||||||
##
|
##
|
||||||
#get ARCH_DIR "$BASE_DIR/bin-$arch"
|
#get ARCH_DIR "$BASE_DIR/bin-$arch"
|
||||||
#ask "Binary installation directory" ARCH_DIR
|
#ask "Binary installation directory" ARCH_DIR
|
||||||
|
|
|
@ -336,7 +336,11 @@ emit(string output) {
|
||||||
}
|
}
|
||||||
foreach(line : outlines) if (strlen(line)) {
|
foreach(line : outlines) if (strlen(line)) {
|
||||||
while (strlen(line) > cut) {
|
while (strlen(line) > cut) {
|
||||||
#if 1
|
#if 0 //{{{
|
||||||
|
// this is supposed to be the more elegant
|
||||||
|
// message continuation strategy but it
|
||||||
|
// breaks OTR over IRC! thx alice
|
||||||
|
//
|
||||||
// we shall look for last whitespace instead
|
// we shall look for last whitespace instead
|
||||||
t = rindex(line, ' ', cut);
|
t = rindex(line, ' ', cut);
|
||||||
if (t > 9) {
|
if (t > 9) {
|
||||||
|
@ -364,7 +368,7 @@ emit(string output) {
|
||||||
// we might aswell use the old
|
// we might aswell use the old
|
||||||
// backslash splitting code below here
|
// backslash splitting code below here
|
||||||
}
|
}
|
||||||
#else //{{{
|
#else //}}}
|
||||||
t = line[cut] == '\r' ? cut-1 : cut;
|
t = line[cut] == '\r' ? cut-1 : cut;
|
||||||
|
|
||||||
// msa's CTCP character
|
// msa's CTCP character
|
||||||
|
@ -382,7 +386,7 @@ emit(string output) {
|
||||||
+ "\\\r\n");
|
+ "\\\r\n");
|
||||||
line = line[cut+1..];
|
line = line[cut+1..];
|
||||||
}
|
}
|
||||||
#endif //}}}
|
#endif
|
||||||
}
|
}
|
||||||
P4(("irc:emit each %O\n", line))
|
P4(("irc:emit each %O\n", line))
|
||||||
EMIT(split_prefix + line +"\r\n");
|
EMIT(split_prefix + line +"\r\n");
|
||||||
|
|
Loading…
Reference in a new issue