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

	<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>2006-03-21T13:14:15-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-03-21T13:14:15-04:00</updated>

		<published>2006-03-21T13:14:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61245#p61245</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61245#p61245"/>
		<title type="html"><![CDATA[help news]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61245#p61245"><![CDATA[
Alchera I think he means he wants to add different news for each channel not let the script work on all channels (as I see in the code, it already does).<br><br>pilouuu you can do something like this:<div class="codebox"><p>Code: </p><pre><code>set mynews [split [read [set newsf [open news]]][close $newf] \n][unset newsf]bind pub - .news do_newsbind pub m|m .setnews do_makenewsproc do_news {nick userhost handle channel args} { set gotnews 0 foreach news $::mynews {  if {[string equal -nocase $channel [lindex [split $news] 0]]} {   putserv "privmsg $channel :News: [join [lrange [split $news] 1 end]]"   putlog "(**Command: news by '$nick' on '$channel'**)"   set gotnews 1 ; break  } } if {!$gotnews} {  putserv "privmsg $channel :No news for this channel." }}proc do_makenews {nick userhost handle channel test} { global mynews set test [string tolower $test] set chan [string tolower $channel] if {[set ci [lsearch -glob $mynews "$channel *"]] != -1} {  set mynews [lreplace $mynews $ci $ci] } lappend mynews "$chan $test" set newsf [open news w] foreach news $mynews {  if {$news != ""} {   puts $newsf $news  } } close $newsf putserv "NOTICE $channel :Done.: $test"  putlog "(**Command: setnews by '$nick' on '$channel'**)"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue Mar 21, 2006 1:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pilouuu]]></name></author>
		<updated>2006-03-21T11:34:49-04:00</updated>

		<published>2006-03-21T11:34:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61239#p61239</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61239#p61239"/>
		<title type="html"><![CDATA[help news]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61239#p61239"><![CDATA[
it good <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> thx u for infos et redirection <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7153">pilouuu</a> — Tue Mar 21, 2006 11:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-03-21T09:10:51-04:00</updated>

		<published>2006-03-21T09:10:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61232#p61232</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61232#p61232"/>
		<title type="html"><![CDATA[help news]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61232#p61232"><![CDATA[
This is the <em class="text-italics">Scripting Help</em> forum; you have been helped. You have implied you wrote that Tcl code; that being the case then you should understand my post and code accordingly.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Tue Mar 21, 2006 9:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pilouuu]]></name></author>
		<updated>2006-03-21T09:00:19-04:00</updated>

		<published>2006-03-21T09:00:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61231#p61231</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61231#p61231"/>
		<title type="html"><![CDATA[...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61231#p61231"><![CDATA[
forum for help? or redirection? ...<br><br>thx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7153">pilouuu</a> — Tue Mar 21, 2006 9:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-03-20T22:48:42-04:00</updated>

		<published>2006-03-20T22:48:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61226#p61226</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61226#p61226"/>
		<title type="html"><![CDATA[help news]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61226#p61226"><![CDATA[
For use in more than one channel use the following (from tcl-commands.doc):<div class="codebox"><p>Code: </p><pre><code>  setudef &lt;flag/int/str&gt; &lt;name&gt;    Description: initializes a user defined channel flag, string or integer      setting. You can use it like any other flag/setting. IMPORTANT: Don't      forget to reinitialize your flags/settings after a restart, or it'll be      lost.    Returns: nothing    Module: channels</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Mon Mar 20, 2006 10:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pilouuu]]></name></author>
		<updated>2006-03-20T17:45:28-04:00</updated>

		<published>2006-03-20T17:45:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61225#p61225</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61225#p61225"/>
		<title type="html"><![CDATA[help news]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61225#p61225"><![CDATA[
Hi<br><br>My code<br><div class="codebox"><p>Code: </p><pre><code>bind pub - .news do_newsbind pub m|m .setnews do_makenewsproc do_news {nick userhost handle channel args} {   set newsfile [open "news" r]   set news [gets $newsfile]     putserv "privmsg $channel :News: $news"     putlog "(**Command: news by '$nick' on '$channel'**)"}proc do_makenews {nick userhost handle channel test} {    set newsfile [open "news" w]    puts $newsfile $test     putserv "NOTICE $channel :Done.: $test"    close $newsfile     putlog "(**Command: setnews by '$nick' on '$channel'**)"}</code></pre></div>types: .setnews bla bla<br><br>&lt;nick&gt;.news<br>&lt;bot&gt; News: bla bla<br><br>code it good for 1 chan. Possible to add multi-chan? ( all chan bot is oN )<br><br>expl:<br><br>#chan1                                 <br>                                     <br>.setnews bla bla                      <br>                                     <br>&lt;nick chan1&gt;.news               <br>&lt;bot&gt; News: bla bla        <br><br><br>#chan2 <br> .setnews iop iop<br>&lt;nick chan2&gt;.news<br>&lt;bot&gt; News: iop iop<br><br>Thx for all help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7153">pilouuu</a> — Mon Mar 20, 2006 5:45 pm</p><hr />
]]></content>
	</entry>
	</feed>
