<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/7787" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2004-06-26T11:55:35-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/7787</id>

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-06-26T11:55:35-04:00</updated>

		<published>2004-06-26T11:55:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37902#p37902</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37902#p37902"/>
		<title type="html"><![CDATA[BSD linebreaks issue revisited]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37902#p37902"><![CDATA[
Hello I have asked and received much help from this forum on this and similar topics however i am still stumped by an issue my eggdrop has on bsd (mandrake works fine) with a script I pieced together to echo the contents of a file in my irc channel.<br><div class="codebox"><p>Code: </p><pre><code>set cmd "!netstat"bind pub -|- $cmd log:pubproc htmltotext {text} {  regsub -all -- {&lt;br&gt;} $text "\n" text  regsub -all -- {&lt;/b&gt;|&lt;/font&gt;} $text { } text  regsub -all -- {&lt;[^&gt;]*&gt;} $text {} text  regsub -all -- { |[&lt;*&gt;]} $text { } text  return $text}proc log:pub {nick handle host chan text } {  set foo [open "/www/message.txt" "r"]  foreach line [split [read $foo] \n] {  if {($line == "") || ($line == "\n") || ($line == "\r")} { continue }    putserv "PRIVMSG $nick :[htmltotext \002$line\002]"  }  close $foo}bind time - "*6 % % % %" displayechoproc displayecho {min hour day month year} {  set foo [open "/www/message.txt" "r"]  foreach line [split [read $foo] \n] {  if {($line == "") || ($line == "\n") || ($line == "\r")} { continue }    putserv "PRIVMSG #isg :[htmltotext \002$line\002]"  }  close $foo}</code></pre></div>This is what the file it echos looks like in vi<br><div class="codebox"><p>Code: </p><pre><code>Iplanet BL, MT 2382446.^MIt's NetCool son, NetCool. It ain't that hard.^MBaltimore edge 4 will be rebooted sometime within the next hour (4-5pm).^M^M ^M ^M ^M ^M ^M ^M ^M ^M ^M ^M ^M ^M ^M ^M ^M ^M ^M ^M ^M~</code></pre></div>I have used eggdrop.conf to prevent dupe messages in queue to keep it from going crazy on all the windows linebreaks but I would love to keep it from pasting the one empty line I am still getting. I am thinking my issue may be the leading space on most of the ^M lines but I cant get it to stop adding one blank line at the end of its spew. Can anyone provide any additional assistance in this regard?<p>Statistics: Posted by Guest — Sat Jun 26, 2004 11:55 am</p><hr />
]]></content>
	</entry>
	</feed>
