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

	<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-12-28T22:01:54-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-12-28T22:01:54-04:00</updated>

		<published>2004-12-28T22:01:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44645#p44645</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44645#p44645"/>
		<title type="html"><![CDATA[dynamic pages..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44645#p44645"><![CDATA[
hehe ok .. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> just want i wanted to know.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Tue Dec 28, 2004 10:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2004-12-28T21:48:53-04:00</updated>

		<published>2004-12-28T21:48:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44643#p44643</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44643#p44643"/>
		<title type="html"><![CDATA[dynamic pages..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44643#p44643"><![CDATA[
yes, I'm well aware of .htaccess potential hehe, but thanks anyway <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>and yes, I'm the author of hybrid7-bg mod; however, I no longer develop it, lost interest about an year ago after implementing all that I wanted in an ircd<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Dec 28, 2004 9:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-12-28T21:39:36-04:00</updated>

		<published>2004-12-28T21:39:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44639#p44639</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44639#p44639"/>
		<title type="html"><![CDATA[dynamic pages..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44639#p44639"><![CDATA[
not sur if you know .. <br><blockquote class="uncited"><div>cat .htaccess<br>AddType text/plain .tcl .c .cpp .bat .csv .sql</div></blockquote>but you can force the webserver to show ur tcl scripts in txt mode.. instead of application, just saying <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> also did u write/mod that hybrid server ? and if so is it still maintained.. ???<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Tue Dec 28, 2004 9:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2004-12-28T18:57:44-04:00</updated>

		<published>2004-12-28T18:57:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44621#p44621</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44621#p44621"/>
		<title type="html"><![CDATA[dynamic pages..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44621#p44621"><![CDATA[
yep, that was my reasoning; since I had a lot of vars &amp; procs with pretty common names that would otherwise clash with other scripts (even with eggdrop's build-in names) and I didn't feel like introducing a common prefix and delimiter, using namespace was the obvious alternative (albeit a simplistic use; namespaces can be nested and you can build namespace hierarchies)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Dec 28, 2004 6:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-12-28T18:39:41-04:00</updated>

		<published>2004-12-28T18:39:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44617#p44617</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44617#p44617"/>
		<title type="html"><![CDATA[dynamic pages..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44617#p44617"><![CDATA[
hmm its nice script.. but all i can make up from that script is that name spaces won't allow to over write global variables from one to an other script .. like writing all global variables into an array.. then export only the array..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Tue Dec 28, 2004 6:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2004-12-27T16:27:05-04:00</updated>

		<published>2004-12-27T16:27:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44583#p44583</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44583#p44583"/>
		<title type="html"><![CDATA[dynamic pages..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44583#p44583"><![CDATA[
I don't know if this is a good namespace example (surely not better than some professional stuff you'd find on wiki.tcl.tk and elsewhere - after all, I'm primarily C/C++ developer and not scripter), but my ircd bridge/<a href="http://demond.net/ircd.tcl.txt" class="postlink">emulator</a> for eggdrop uses namespace and uplevel<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Mon Dec 27, 2004 4:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-12-27T15:42:49-04:00</updated>

		<published>2004-12-27T15:42:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44582#p44582</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44582#p44582"/>
		<title type="html"><![CDATA[dynamic pages..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44582#p44582"><![CDATA[
i think i understand how to use echo and i like it besides the fact that you make use of global variables but then again it won't matter when you work with name spaces .. i have no clue what void is supposed to do .. what i understood from uplevel is that it is like a pointer in C .. could be wrong there tho.. <br><br>i am currently looking for a good example of how to use name spaces .. i remember i had a website of wiki something for syntax in tcl but lost it while i installed bsd i axidently format everything :/ to use the whole drive was a and quit was q and having a azerty keyboard those 2 keys are switched so when i wanted to quit i was removing the hd .. anyway and i remember you wrote something like a word counter .. or something ..  that i remember was with name spaces ..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Mon Dec 27, 2004 3:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-12-27T15:14:47-04:00</updated>

		<published>2004-12-27T15:14:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44581#p44581</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44581#p44581"/>
		<title type="html"><![CDATA[dynamic pages..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44581#p44581"><![CDATA[
that part i figur .. its like class in php .. i suppose .. kinda .. its like <br><br><blockquote class="uncited"><div>proc  &lt;= name space instead ..<br><br>  proc <br>  }  <br><br>}</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Mon Dec 27, 2004 3:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2004-12-27T14:44:49-04:00</updated>

		<published>2004-12-27T14:44:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44580#p44580</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44580#p44580"/>
		<title type="html"><![CDATA[dynamic pages..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44580#p44580"><![CDATA[
namespaces simply encapsulate names which otherwise would have been global, thus preventing global name space polution - nothing more, nothing less<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Mon Dec 27, 2004 2:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-12-27T14:17:45-04:00</updated>

		<published>2004-12-27T14:17:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44578#p44578</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44578#p44578"/>
		<title type="html"><![CDATA[dynamic pages..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44578#p44578"><![CDATA[
i am trying to understand name space for a while thing i could understand from it was that it was like a script where you put crap in then if you need it you can call upon it and execute the code later on .. <br><br>the name space part is a bit where i am stuck on not sur how to use it ..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Mon Dec 27, 2004 2:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-12-08T19:52:18-04:00</updated>

		<published>2004-12-08T19:52:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43720#p43720</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43720#p43720"/>
		<title type="html"><![CDATA[dynamic pages..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43720#p43720"><![CDATA[
<blockquote class="uncited"><div>i wana read a page like php but then tcl but not overwrite the procs variable when evaluating them..</div></blockquote>Something like this?<br><br>Your httpd recieves a request.<br>You extract the filename from the request uri to determine how to proceed.<br>If the file exists and is of a type where embedded tcl should be executed...<br>1) create environment to execute the code in (child namespace or interpreter) and environment variables you find useful (get/post variables, cookies etc.)<br>2) evaluate the embedded code in this new environment (appending output to output buffer) and output the end result to your client.<br>3) destroy environment<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Dec 08, 2004 7:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-12-08T17:09:32-04:00</updated>

		<published>2004-12-08T17:09:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43711#p43711</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43711#p43711"/>
		<title type="html"><![CDATA[dynamic pages..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43711#p43711"><![CDATA[
hmm i don't wana give a quick reply cause i don't understand it fully ill try to understand first <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> ill post when i got a question..<br><br>no i don't wana overwrite return it was just a quick test<br><br>* i wana read a page like php but then tcl but not overwrite the procs variable when evaluating them..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Wed Dec 08, 2004 5:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-12-07T20:47:58-04:00</updated>

		<published>2004-12-07T20:47:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43655#p43655</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43655#p43655"/>
		<title type="html"><![CDATA[dynamic pages..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43655#p43655"><![CDATA[
The result you got was what you asked for. My version appends what ever the evaluation of the code block returns to the return value, so if you want to OVERWRITE the return variable directly like that, make sure you return an empty value at the end of the code. Take a look at my echo proc (or USE it?) <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>Keeping the whitespace around the code inside the code tag (if that's what you meant) makes no sense...if you want whitespace, add it from within the code or outside the tag.<br><br>Here's another proc that does the same thing but looks better (and it also works with different kinds of whitespace around the code)<br><div class="codebox"><p>Code: </p><pre><code>proc MLeval html {global bufferset buffer ""regsub -all {&lt;\?\s(.*?)\s\?&gt;} $html \0\\1\0 htmlforeach {html code} [split $html \0] {append buffer $htmlcatch {uplevel #0 $code} resultappend buffer $result}set buffer}# helper procs for the embedded codeproc void args {}proc echo what {append ::buffer $what; void}# testMLeval {&lt;HTML&gt;&lt;HEAD&gt;&lt;TITLE&gt;&lt;? echo "huh?" ?&gt;&lt;/TITLE&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;? append buffer "&lt;P&gt;Don't modify the 'buffer' variable unless you understand what will happen.&lt;/P&gt;"; void ?&gt;&lt;/BODY&gt;&lt;/HTML&gt;}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Dec 07, 2004 8:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-12-07T16:42:37-04:00</updated>

		<published>2004-12-07T16:42:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43641#p43641</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43641#p43641"/>
		<title type="html"><![CDATA[dynamic pages..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43641#p43641"><![CDATA[
bah so does mine when it comes to i .. ok gone have to look for a different approach .. on that<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Tue Dec 07, 2004 4:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-12-07T16:11:15-04:00</updated>

		<published>2004-12-07T16:11:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=43639#p43639</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=43639#p43639"/>
		<title type="html"><![CDATA[dynamic pages..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=43639#p43639"><![CDATA[
not exactly but i think i can modify it a bit would have to do some lookups but.. tnx for the answer it might give me some ideas tho..<br><blockquote class="uncited"><div>% evalML "blah &lt;? set return hmm ?&gt;"<br>hmmhmm<br>% evalCode "blah &lt;? set return hmm ?&gt;"<br>blah hmm<br>%</div></blockquote>it overwrites the .. variables &amp; looses white spaces..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Tue Dec 07, 2004 4:11 pm</p><hr />
]]></content>
	</entry>
	</feed>
