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

	<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>2010-10-15T18:46:28-04:00</updated>

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

		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2010-10-15T18:46:28-04:00</updated>

		<published>2010-10-15T18:46:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94739#p94739</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94739#p94739"/>
		<title type="html"><![CDATA[Re: [solved] best way to apprach this]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94739#p94739"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>namespace eval mp3_time_add {proc get_mp3_time {nick host hand chan text} {set add_time_mp3 [::mysql::connect -host $reqs::sett::db_host -port $reqs::sett::db_port -user $reqs::sett::db_user -password $reqs::sett::db_pass -db $reqs::sett::db_pre_name];set added_mp3 [::mysql::sel $mp3_pre "SELECT $reqs::sett::db_pre_time FROM $reqs::sett::db_pre_table where $reqs::sett::db_pre_rls = '$add_rls'" -flatlist];::mysql::endquery $add_time_mp3::mysql::close $add_time_mp3if {![string length $added_mp3]} {set time_pred "unknown"} else {set now [unixtime]incr now -$pre_mp3foreach {val short} [split [duration $now] " "] { append time_pred "$val[string index $short 0] " }putquick "PRIVMSG $reqs::sett::add_chan :[string trim $time_pred]"}#END NAMESPACE mp3_time_add}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Fri Oct 15, 2010 6:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[doggo]]></name></author>
		<updated>2010-10-15T06:25:32-04:00</updated>

		<published>2010-10-15T06:25:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94730#p94730</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94730#p94730"/>
		<title type="html"><![CDATA[[solved] best way to apprach this]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94730#p94730"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>namespace eval mp3_time_add { proc get_mp3_time {nick host hand chan text} {    set time_pre ""    set add_time_mp3 [::mysql::connect -host $reqs::sett::db_host -port $reqs::sett::db_port -user $reqs::sett::db_user -password $reqs::sett::db_pass -db $reqs::sett::db_pre_name];    set added_mp3 [::mysql::sel $mp3_pre "SELECT $reqs::sett::db_pre_time FROM $reqs::sett::db_pre_table where $reqs::sett::db_pre_rls = '$add_rls'" -flatlist];    ::mysql::endquery $add_time_mp3    ::mysql::close $add_time_mp3    if {$added_mp3 == ""} {set time_pred "unknown"} else {    set now [unixtime]    incr now -$pre_mp3    set time_pre [duration $now]     regsub -nocase -all -- { seconds|seconds} $time_pre "s" time_pre    regsub -nocase -all -- { minutes|minutes} $time_pre "m" time_pre    regsub -nocase -all -- { hours|hours} $time_pre "h" time_pre    regsub -nocase -all -- { days|days} $time_pre "d" time_pre    regsub -nocase -all -- { weeks|weeks} $time_pre "w" time_pre    regsub -nocase -all -- { months|months} $time_pre "m" time_pre    regsub -nocase -all -- { years|years} $time_pre "y" time_pre   putquick "PRIVMSG $reqs::sett::add_chan :$time_pred"    } #END NAMESPACE mp3_time_add } </code></pre></div>i just needed to read more <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>returns <br><br><div class="codebox"><p>Code: </p><pre><code>[Pred 27y 50w 5d 22m 46s ago]</code></pre></div>just how i wanted<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11046">doggo</a> — Fri Oct 15, 2010 6:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[doggo]]></name></author>
		<updated>2010-10-15T04:24:57-04:00</updated>

		<published>2010-10-15T04:24:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94729#p94729</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94729#p94729"/>
		<title type="html"><![CDATA[[solved] best way to apprach this]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94729#p94729"><![CDATA[
grabs a added time from a db in unix time<br><br>but im having a right time getting it to return what i want in channel :/<br><br>heres the proc<br><br><div class="codebox"><p>Code: </p><pre><code>namespace eval mp3_time_add {proc get_mp3_time {nick host hand chan text} {set time_pred ""set add_time_mp3 [::mysql::connect -host $reqs::sett::db_host -port $reqs::sett::db_port -user $reqs::sett::db_user -password $reqs::sett::db_pass -db $reqs::sett::db_pre_name];set added_mp3 [::mysql::sel $mp3_pre "SELECT $reqs::sett::db_pre_time FROM $reqs::sett::db_pre_table where $reqs::sett::db_pre_rls = '$add_rls'" -flatlist];::mysql::endquery $add_time_mp3::mysql::close $add_time_mp3if {$added_mp3 == ""} {set time_pred "unknown"} else {set now [unixtime]incr now -$pre_mp3set time_pred [duration $now]    regsub -nocase {seconds} $time_pred "s" time_pred    regsub -nocase {second} $time_pred "s" time_pred    regsub -nocase {minutes} $time_pred "m" time_pred    regsub -nocase {minute} $time_pred "m" time_pred    regsub -nocase {hours} $time_pred "h" time_pred    regsub -nocase {hour} $time_pred "h" time_pred    regsub -nocase {days} $time_pred "d" time_pred    regsub -nocase {day} $time_pred "d" time_pred    regsub -nocase {weeks} $time_pred "w" time_pred    regsub -nocase {week} $time_pred "w" time_pred   regsub -nocase {months} $time_pred "m" time_pred    regsub -nocase {month} $time_pred "m" time_pred    regsub -nocase {years} $time_pred "y" time_pred    regsub -nocase {year} $time_pred "y" time_pred#regsub -all { |\*} $time_pred {} time_predputquick "PRIVMSG $reqs::sett::add_chan :$time_pred"}#END NAMESPACE mp3_time_add}</code></pre></div><br>currently returns <br><br>[Pred 1 d 12 h 56 m 59 s ago]<br><br>if i use the regsub to remove the spaces it returns<br><br>[Pred 1d13h27m8s ago]<br><br>but i realy realy want it to return like this <br><br>[Pred 1d 12h 56m 59s ago]<br><br>if anyone has any better way to achieve this id be most interested, thanks <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11046">doggo</a> — Fri Oct 15, 2010 4:24 am</p><hr />
]]></content>
	</entry>
	</feed>
