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

	<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>2005-08-03T01:30:22-04:00</updated>

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

		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-03T01:30:22-04:00</updated>

		<published>2005-08-03T01:30:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53660#p53660</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53660#p53660"/>
		<title type="html"><![CDATA[special seen script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53660#p53660"><![CDATA[
see [duration] in tcl-commands.doc<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Wed Aug 03, 2005 1:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Moonshine]]></name></author>
		<updated>2005-08-03T01:25:17-04:00</updated>

		<published>2005-08-03T01:25:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53659#p53659</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53659#p53659"/>
		<title type="html"><![CDATA[ok... i   R T F M]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53659#p53659"><![CDATA[
after reading several manuels and several sleepless nights, everything works fine so far.<br><br>but now i have a problem.<br><br>i have a unixtime-stamp from the datebase saved in [lindex $column 1] and the time now() .<br><br>how do i get the differenz between these two times like i want<br><br>for example:<br><br>the user was seen 5 days 13 min and 12 seks ago.<br><br>and please if u want to help me, please post more than just a hint <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title="Smile"><br><br>TIA<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3630">Moonshine</a> — Wed Aug 03, 2005 1:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-29T23:58:50-04:00</updated>

		<published>2005-07-29T23:58:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53510#p53510</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53510#p53510"/>
		<title type="html"><![CDATA[special seen script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53510#p53510"><![CDATA[
I'm a little bit puzzled why you require SQL-based seen script, gseen module and bseen script both work pretty well without being SQL-based<br><br>and if, as you stated initially, you want to learn from such a script, I'd recommend you study bseen.tcl or some of the many SQL-aware scripts (or better yet, study the docs and try to write simple code doing single SELECT and displaying the result set)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Jul 29, 2005 11:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Moonshine]]></name></author>
		<updated>2005-07-29T23:46:10-04:00</updated>

		<published>2005-07-29T23:46:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53508#p53508</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53508#p53508"/>
		<title type="html"><![CDATA[special seen script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53508#p53508"><![CDATA[
<img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"> ... this becomes more and more a discussion about nonsense.<br><br>But i make it officially :<br><br>I REQUEST A SCRIPT BASED ON MY FIRST POST!<br><br>(I only posted the code, because u asked what I exactly do need help with.)<br>And btw. i dont want to bather, beg or annoy you.<br><br>Just want such a script. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title="Smile"><br><br>anyway ... have to go to bed now ... it's almost 6 am here in old europe <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title="Smile"> <br>and who knows ... perhaps if i stand up in a few hours somebody helped me.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3630">Moonshine</a> — Fri Jul 29, 2005 11:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-29T23:23:12-04:00</updated>

		<published>2005-07-29T23:23:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53507#p53507</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53507#p53507"/>
		<title type="html"><![CDATA[special seen script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53507#p53507"><![CDATA[
but you didn't request a script, you requested help with what you've done so far... anyway<br><br>btw, you can install mysqltcl locally in your home dir, without being root, and then use it the proper way (with [package require])<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Jul 29, 2005 11:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Moonshine]]></name></author>
		<updated>2005-07-29T22:49:05-04:00</updated>

		<published>2005-07-29T22:49:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53505#p53505</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53505#p53505"/>
		<title type="html"><![CDATA[special seen script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53505#p53505"><![CDATA[
<blockquote class="uncited"><div>so, basically, you want to make your own script without really knowing what you're actually doing, just by copy &amp; paste stuff from other scripts? </div></blockquote>I would say u nailed it.<br><blockquote class="uncited"><div>you are in dire need to R T F M first<br><br>I already told you how to obtain the time difference; what you need to do is read tcl-commands.doc and find out about [duration]<br><br>also, read mysqltcl's docs (google for "mysqltcl"); the way you use it by loading that library directly is wrong, you should use [package require]</div></blockquote>You're right that i should start learn to cide myself, but this is basically a <strong class="text-strong">Script Requests</strong> forum and that is what i did. It's just not need to learn to code if u only need it for one script. I think my request is not really difficult for somebody who is use to program in tcl.<br>Anyway and nevertheless i will also read the docs!<br><br>about the [package require] thing ... not sure if i can use it like that. mysql is not installed on the provider shell i use.<br><br>THX anyway ...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3630">Moonshine</a> — Fri Jul 29, 2005 10:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-29T22:33:07-04:00</updated>

		<published>2005-07-29T22:33:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53504#p53504</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53504#p53504"/>
		<title type="html"><![CDATA[special seen script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53504#p53504"><![CDATA[
so, basically, you want to make your own script without really knowing what you're actually doing, just by copy &amp; paste stuff from other scripts?<br><br>you are in dire need to <strong class="text-strong">R T F M</strong> first<br><br>I already told you how to obtain the time difference; what you need to do is read tcl-commands.doc and find out about [duration]<br><br>also, read mysqltcl's docs (google for "mysqltcl"); the way you use it by loading that library directly is wrong, you should use [package require]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Jul 29, 2005 10:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Moonshine]]></name></author>
		<updated>2005-07-29T20:27:12-04:00</updated>

		<published>2005-07-29T20:27:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53496#p53496</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53496#p53496"/>
		<title type="html"><![CDATA[special seen script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53496#p53496"><![CDATA[
like i wrote, i really copy and pasted that script together without understanding it totaly  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused"> <br>(so sometimes if many ppl leave the chan in a short time i get a message that max connection for that db-user has reached, but that another story <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <br><br>i know the select-statement.<br>should be something like:<br><strong class="text-strong"><br>select nick, leavetime from mydb where nick like '%$user%'<br></strong><br>but i really dont know how to programm the rest.<br><br>i have that  ...<br><div class="codebox"><p>Code: </p><pre><code>#### MySQL variables:##### hostnameset db(host) ""## userset db(id) ""## passwordset db(pass) ""## databaseset db(dbase) ""## table #set db(table) ""load libmysqltcl3.01.soset mysql(libsql) "home/user/libmysqltcl3.01.so"# --------------------------------------------------------------------# binding# --------------------------------------------------------------------bind pubm - !seen seen</code></pre></div>so far so good <br>... but now i mess it up...<br><div class="codebox"><p>Code: </p><pre><code>#### seenproc seen {nick uhost handle channel arg} {   global db   set sqlhand [mysqlconnect -host $db(host) -user $db(id) -password $db(pass)]   mysqluse $sqlhand $db(dbase)   mysqlexec $sqlhand "SELECT NICK, LEAVETIME FROM MYDB WHERE NICK LIKE '%$arg%'" mysqlclose $sqlhand</code></pre></div>How to post the results ?<br>How do i post more than one result.<br>And get the difference between the two times ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3630">Moonshine</a> — Fri Jul 29, 2005 8:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-29T19:59:50-04:00</updated>

		<published>2005-07-29T19:59:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53495#p53495</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53495#p53495"/>
		<title type="html"><![CDATA[special seen script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53495#p53495"><![CDATA[
what exactly do you need help with?<br><br>it seems you are already familiar with interfacing mySQL from Tcl, so just do <em class="text-italics">SELECT time FROM yourtable WHERE nick=$who</em> on a !seen request from [bind pub] and use [duration] to display the time difference between now ([unixtime]) and $time<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Jul 29, 2005 7:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Moonshine]]></name></author>
		<updated>2005-07-29T19:02:41-04:00</updated>

		<published>2005-07-29T19:02:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53494#p53494</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53494#p53494"/>
		<title type="html"><![CDATA[special seen script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53494#p53494"><![CDATA[
hi .. i made a script (by coping parts of several scripts) that saves the nick and the time/date (now()) in a mysql-db if a user leaves my chan.<br>I use libmysqltcl3.01.so to connect to the db.<br><br><br>Now i would like to have another script that tells me the time that user was seen.<br><strong class="text-strong"><br>&lt;user&gt; !seen &lt;nick&gt; &lt;how many leaves you want to get (perhaps max = 5)&gt;</strong><br><br>i have only 3 columns in the sql-db<br>||id||nick||time||<br>for example:<br>||1||John||29.07.2005 00:35:49||<br><br>the answer should look like<br><strong class="text-strong"><br>&lt;bot&gt; User John was seen 0 days 15 min and 54 seks ago.<br></strong><br>If somebody could help me with that i have onle one wish ... please keep it as simple as possible ... i would like to learn from the script.<br><br>TIA<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3630">Moonshine</a> — Fri Jul 29, 2005 7:02 pm</p><hr />
]]></content>
	</entry>
	</feed>
