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

	<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-04-16T07:25:47-04:00</updated>

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

		<entry>
		<author><name><![CDATA[benzon]]></name></author>
		<updated>2004-04-16T07:25:47-04:00</updated>

		<published>2004-04-16T07:25:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35608#p35608</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35608#p35608"/>
		<title type="html"><![CDATA[Dynamic Var :|]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35608#p35608"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set mysql(host) "***"set mysql(port) "3306"set mysql(user) "***"set mysql(pass) "***"set mysql(data) "***"set mysql(vers) "2.1" package require mysqltcl $mysql(vers)set channel "#onedaycup #sucsa"set time 60if {[string compare [string index $time 0] "!"] == 0} { set timer [string range $time 1 end] } { set timer [expr $time * 60] }if {[lsearch -glob [utimers] "* gos *"] == -1} { utimer $timer gos }proc gos {} {global mysql channel time timerforeach chan $channel { set mysql(conn) [mysqlconnect -host $mysql(host) -port $mysql(port) -user $mysql(user) -password $mysql(pass)] mysqluse $mysql(conn) $mysql(data)foreach query [mysqlsel $mysql(conn) "SELECT * FROM cup_reklame ORDER BY id;" -list] { putserv "PRIVMSG $chan :[lindex $query 1] " } }if {[lsearch -glob [utimers] "* gos *"] == -1} { utimer $timer gos }mysqlclose $mysql(conn)}putlog "\002Mysql advertising 1.0\002"</code></pre></div><br>This is working grate for me but one problem is that i need to make the set time 60 dynamic, so i eg can type !cuprek on then it will type every 30 min and if it´s !cuprek off it will type every 60 min is that posible and is ther one ther can help me yoused a lot of time looking in here last night<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4808">benzon</a> — Fri Apr 16, 2004 7:25 am</p><hr />
]]></content>
	</entry>
	</feed>
