<?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/15137" />

	<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>2007-12-19T12:42:35-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-12-19T12:42:35-04:00</updated>

		<published>2007-12-19T12:42:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=79442#p79442</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=79442#p79442"/>
		<title type="html"><![CDATA[Couple of requests/questions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=79442#p79442"><![CDATA[
I'm not sure if your indenting is simply off, but have you checked that all { and } match up?<br>As for the terminating \003, it's recommended, but not mandatory for most irc clients.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Dec 19, 2007 12:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[YooHoo]]></name></author>
		<updated>2007-12-19T01:52:50-04:00</updated>

		<published>2007-12-19T01:52:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=79427#p79427</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=79427#p79427"/>
		<title type="html"><![CDATA[Couple of requests/questions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=79427#p79427"><![CDATA[
ppslim wrote a pretty good instructional on this, please take a gander at <a href="http://forum.egghelp.org/viewtopic.php?t=3867" class="postlink">Colour and Formatting Codes</a> to get a better idea  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2706">YooHoo</a> — Wed Dec 19, 2007 1:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-12-18T19:24:06-04:00</updated>

		<published>2007-12-18T19:24:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=79424#p79424</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=79424#p79424"/>
		<title type="html"><![CDATA[Couple of requests/questions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=79424#p79424"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>putquick "PRIVMSG $channel :\0033$line\003" ;# GREEN </code></pre></div>Need the closing \003 code.. and a semicolon before the comment if its on the same line.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Tue Dec 18, 2007 7:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Philw]]></name></author>
		<updated>2007-12-18T19:08:02-04:00</updated>

		<published>2007-12-18T19:08:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=79423#p79423</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=79423#p79423"/>
		<title type="html"><![CDATA[Couple of requests/questions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=79423#p79423"><![CDATA[
Hi Back again<br><br>Maybe im doing something wrong here, but<br><br>Ive got the script working, bu im just trying to do a bit of color coding on mirc with some if statements. Thing is when I put my code in the bot doesnt seem to output anything, i see nothign in the log or channel. However when this code is out it works fine. What have I done wrong?<br><div class="codebox"><p>Code: </p><pre><code>           if {[string match {*RECOVERY*} $line]} {               putquick "PRIVMSG $channel :\0033$line" # GREEN           } elseif {[string match {*PROBLEM*} $line]} {               putquick "PRIVMSG $channel :\0034$line" # RED           } else {                putquick "PRIVMSG $channel :$line"}</code></pre></div>Can anyone spot what's wrong with this?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9557">Philw</a> — Tue Dec 18, 2007 7:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Philw]]></name></author>
		<updated>2007-12-18T08:26:07-04:00</updated>

		<published>2007-12-18T08:26:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=79417#p79417</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=79417#p79417"/>
		<title type="html"><![CDATA[Couple of requests/questions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=79417#p79417"><![CDATA[
wow thanks guys working perfectly! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Ok, onto the next one of syslog, how possible is that? <br><br>Many thanks for your help so far!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9557">Philw</a> — Tue Dec 18, 2007 8:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-12-17T18:25:35-04:00</updated>

		<published>2007-12-17T18:25:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=79402#p79402</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=79402#p79402"/>
		<title type="html"><![CDATA[Couple of requests/questions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=79402#p79402"><![CDATA[
Oops, minor mistake...<br>change $line to $text, mixed variable names while coding..<br>Updating my previous post in a moment..<br><br>Also opened the file as readonly, which will cause it to block until another process opens it as writeonly... changed to read-write access, and it should'nt block anymore now.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Mon Dec 17, 2007 6:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2007-12-17T17:38:44-04:00</updated>

		<published>2007-12-17T17:38:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=79400#p79400</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=79400#p79400"/>
		<title type="html"><![CDATA[Couple of requests/questions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=79400#p79400"><![CDATA[
Philw: edit your posts and place the code within <div class="codebox"><p>Code: </p><pre><code></code></pre></div> tags for readability.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Mon Dec 17, 2007 5:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Philw]]></name></author>
		<updated>2007-12-17T11:24:11-04:00</updated>

		<published>2007-12-17T11:24:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=79393#p79393</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=79393#p79393"/>
		<title type="html"><![CDATA[Couple of requests/questions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=79393#p79393"><![CDATA[
Hi<br><br>Thanks for the prompt reply!<br><br>putlog "Nagios IRC BOT Script"<br><br>set file "/usr/local/nagios/etc/objects/scripts/ircbot/ircpipe"<br><br>proc readfifo {file} {<br> if {[gets $file text] &lt; 0} {<br>  if {[eof $file]} {<br>   close $file<br>   putlog "FIFO closed due to eof-condition!"<br>   return<br>  }<br> } {<br>  puthelp "PRIVMSG #chan :$line"<br> }<br>}<br><br>set fid [open "/usr/local/nagios/etc/objects/scripts/ircbot/ircpipe" "RDONLY"]<br>fconfigure $fid -blocking 0<br>fileevent $fid readable [list readfifo $fid]<br><br><br>I did that, (sorry like i said im a novice) but the bot hangs on startup, not doing anything, any ideas?<br><br>With regards to the syslog, it needs to act as a daemon, receiving messages from network devices.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9557">Philw</a> — Mon Dec 17, 2007 11:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-12-17T18:26:21-04:00</updated>

		<published>2007-12-17T09:56:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=79391#p79391</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=79391#p79391"/>
		<title type="html"><![CDATA[Couple of requests/questions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=79391#p79391"><![CDATA[
Reading from a fifo is abit more complicated, as you need an event-driven process to read data as it becomes available on the file interface.<br><br>The following code should point you in the right direction:<div class="codebox"><p>Code: </p><pre><code>proc readfifo {file} { if {[gets $file text] &lt; 0} {  if {[eof $file]} {   close $file   putlog "FIFO closed due to eof-condition!"   return  } } {  puthelp "PRIVMSG #yourchannel :$text" }}set fid [open "/path/to/fifo" "RDWR"]fconfigure $fid -blocking 0fileevent $fid readable [list readfifo $fid]</code></pre></div>As for implementing syslog, would you like your eggdrop to act as a syslog daemon, or simply recieve messages from the system syslogd?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Mon Dec 17, 2007 9:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Philw]]></name></author>
		<updated>2007-12-17T08:49:50-04:00</updated>

		<published>2007-12-17T08:49:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=79388#p79388</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=79388#p79388"/>
		<title type="html"><![CDATA[Couple of requests/questions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=79388#p79388"><![CDATA[
Hi all<br><br>I have a monitoring system setup for our network, currently I have an irc bot written in python that alerts us when there are problems. In essence all it does it check a file and whenever it finds info in there it outputs it to the channel.<br><br>How can this be achieved on tcl? (I'm a complete noivce) or is it possible to run a python script on an eggdrop? I'm just trying to get everything onto one bot so we don't have hundreds of bots in a channel.<br><br>The current bot is located here <a href="http://www.nagiosexchange.org/AddOn_Projects.22.0.html?&amp;tx_netnagext_pi1%5Bp_view%5D=757" class="postlink">http://www.nagiosexchange.org/AddOn_Pro ... iew%5D=757</a><br><br>I'm sure its pretty simple, just a case of timers? I have tried but my efforts failed<br><br>putlog "Nagios IRC BOT Script"<br><br>set MyPipe "/usr/local/nagios/etc/objects/scripts/ircbot/ircpipe"<br>set x 1<br><br>while {$x &lt; 5} {<br>    set f [open $MyPipe]<br>        foreach line [split [read $f \n]] {<br>        if {!$line == ""} { putserv PRIVMSG #channel $line}<br>}<br>}<br><br><br>The pipe is a FIFO.<br><br><br><br>Also as another question, I wondered if anyone knew of a syslog eggdrop script, that could receive syslog info from devices and output it straight to the channel? If not how simple would this be to achieve?<br><br><br>Hope someone can help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9557">Philw</a> — Mon Dec 17, 2007 8:49 am</p><hr />
]]></content>
	</entry>
	</feed>
