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

	<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-08-27T14:19:43-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-08-27T14:19:43-04:00</updated>

		<published>2004-08-27T14:19:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40276#p40276</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40276#p40276"/>
		<title type="html"><![CDATA[on|off function]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40276#p40276"><![CDATA[
CREATE TABLE cupbots_channels (<br>  id int(11) NOT NULL auto_increment,<br>  channel varchar(255) NOT NULL default '',<br>  status enum('0','1') NOT NULL default '0',<br>  PRIMARY KEY  (id)<br>) TYPE=MyISAM;<br><br><br>there is the structure..<br><br><br>edit so much you will.. self the lang <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> only english <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 Guest — Fri Aug 27, 2004 2:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-08-26T16:51:45-04:00</updated>

		<published>2004-08-26T16:51:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40231#p40231</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40231#p40231"/>
		<title type="html"><![CDATA[on|off function]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40231#p40231"><![CDATA[
i gues ill see <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Thu Aug 26, 2004 4:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-08-26T08:54:08-04:00</updated>

		<published>2004-08-26T08:54:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40210#p40210</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40210#p40210"/>
		<title type="html"><![CDATA[on|off function]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40210#p40210"><![CDATA[
Ofloo<br><br>if i give you my sql query will you try to make it?<br><br>you can edit all that you want ... self my variables and lang <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by Guest — Thu Aug 26, 2004 8:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-08-25T19:26:03-04:00</updated>

		<published>2004-08-25T19:26:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40183#p40183</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40183#p40183"/>
		<title type="html"><![CDATA[on|off function]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40183#p40183"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>############## sæt default så den automatisk er sat til eller ikke#### 0 =&gt; off#### 1 =&gt; on##########set cup_auto "0"############## Loader mysqltcl##########load /usr/local/lib/mysqltcl-2.50/libmysqltcl2.50.sobind pub m|m ".auto" pub:autoproc pub:auto {nick host hand chan arg} {  global msql cup_auto cup_users  # why catch and not set cause set might return an error  # you could use an if statement and make error handling with this  # check tcl man for more info about catch  catch {mysqlconnect -host $msql(host) -user $msql(user) -password $msql(pass)} sql_hand  mysqluse $sql_hand $msql(db)  if {[string equal {} [lindex $arg 0]]} {    foreach c [mysqlsel $sql_hand "select status from $msql(table)" -list] {      if {!($c)} {        putserv "NOTICE $nick :Automatisk cup er nu sat til \002off\002"      } else {      putserv "NOTICE $nick :Automatisk cup er nu sat til \002on\002"      }    }  } else {    mysqlexec $sql_hand ""    #UPDATE persondata SET age=age+1;     # i do not know how ur tables are build .. or how the table names are well this part u have to do ur self     # but update i think is a good way to go do not insert as this will add new data not update it !!!  }  mysqlclose $sql_hand} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Wed Aug 25, 2004 7:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-08-22T10:50:24-04:00</updated>

		<published>2004-08-22T10:50:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40004#p40004</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40004#p40004"/>
		<title type="html"><![CDATA[on|off function]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40004#p40004"><![CDATA[
can you give me a code for it??<p>Statistics: Posted by Guest — Sun Aug 22, 2004 10:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jil Larner]]></name></author>
		<updated>2004-08-22T10:46:35-04:00</updated>

		<published>2004-08-22T10:46:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40003#p40003</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40003#p40003"/>
		<title type="html"><![CDATA[on|off function]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40003#p40003"><![CDATA[
i'm not sure of what you want but...<br><br>Your command gives you the status avaible in the mysql table. If you want to change this status do default, i think you should make another command. Otherwise you would always set database field to you default variable. So; why check in a database a thing which is defined in a local variable ?<br>In the new command destinated to update mysql status, use an UPDATE more than a INSERT which would add a new row/line each time you trigger the command.<br><br>To my mind, if you want to add a ON/OFF command, just define a couple of commands which bind or unbind events.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5337">Jil Larner</a> — Sun Aug 22, 2004 10:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-08-22T10:00:43-04:00</updated>

		<published>2004-08-22T10:00:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39999#p39999</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39999#p39999"/>
		<title type="html"><![CDATA[on|off function]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39999#p39999"><![CDATA[
i know.. but is the code right if i add a mysql insert line?<br><br>EDIT<br><br>how can i do so it checks the mysql database for the channel?<p>Statistics: Posted by Guest — Sun Aug 22, 2004 10:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jil Larner]]></name></author>
		<updated>2004-08-22T09:57:26-04:00</updated>

		<published>2004-08-22T09:57:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39998#p39998</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39998#p39998"/>
		<title type="html"><![CDATA[on|off function]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39998#p39998"><![CDATA[
Hi,<br><br>this part of the script doesn't add anything in the database... It only selects. Look for a "INSERT INTO" somewhere, and there, modify the default value you want.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5337">Jil Larner</a> — Sun Aug 22, 2004 9:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-08-21T14:42:02-04:00</updated>

		<published>2004-08-21T14:42:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39967#p39967</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39967#p39967"/>
		<title type="html"><![CDATA[on|off function]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39967#p39967"><![CDATA[
hey ppl<br><br>i will bould an on|off function to my scripts..<br><br>but i dont know exactly how..<br><br>i have this code..<br><div class="codebox"><p>Code: </p><pre><code>############## sæt default så den automatisk er sat til eller ikke#### 0 =&gt; off#### 1 =&gt; on##########set cup_auto "0"############## Loader mysqltcl##########load /usr/local/lib/mysqltcl-2.50/libmysqltcl2.50.sobind pub m|m ".auto" pub:autoproc pub:auto {nick host hand chan text} {global msql cup_auto cup_usersset connection [mysqlconnect -host $msql(host) -user $msql(user) -password $msql(pass)]mysqluse $connection $msql(db)set default [mysqlsel $connection "select status from $msql(table)" -list]foreach cup $default {if {$cup == 0} {putserv "NOTICE $nick :Automatisk cup er nu sat til \002off\002"} elseif {$cup == 1} {putserv "NOTICE $nick :Automatisk cup er nu sat til \002on\002"}}}</code></pre></div>an a mysql connection..<br><br>i need to get it like this<br><br>if i add the bot to a channel does it add the channel in the mysql database with the default flags auto_cup<br><br>0  is off<br>1 os on<br><br>the bot set 0 in the mysql database<br><br>then if i write .auto 1<br><br>does it change the settings for the channel to 1<br><br>and then it is on..<p>Statistics: Posted by Guest — Sat Aug 21, 2004 2:42 pm</p><hr />
]]></content>
	</entry>
	</feed>
