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

	<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-12-24T04:16:40-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Buffy_25]]></name></author>
		<updated>2005-12-24T04:16:40-04:00</updated>

		<published>2005-12-24T04:16:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58630#p58630</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58630#p58630"/>
		<title type="html"><![CDATA[String tolower]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58630#p58630"><![CDATA[
I found the problem Sir_Fz !  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <br><br>Thanks for the notice !<br><br>Buffy<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4178">Buffy_25</a> — Sat Dec 24, 2005 4:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-12-20T16:40:13-04:00</updated>

		<published>2005-12-20T16:40:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58514#p58514</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58514#p58514"/>
		<title type="html"><![CDATA[String tolower]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58514#p58514"><![CDATA[
If the variable isn't global, you can only apply string tolower inside the proc.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue Dec 20, 2005 4:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Buffy_25]]></name></author>
		<updated>2005-12-20T16:23:48-04:00</updated>

		<published>2005-12-20T16:23:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58512#p58512</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58512#p58512"/>
		<title type="html"><![CDATA[String tolower]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58512#p58512"><![CDATA[
Hi Sir_Fz,<br><br>This could be an option, but the problem is that my variables are used kindly everywhere in my scripts, and i would prefer to avoid to modify whole my scripts.<br>Therefor i tried to keep my nicks as they are, but just wanted to check between the nick registered in database and the nick that left.<br><br>Is there a way that i could make it being applied to all the variables?<br><br>Thanks.<br><br>Buffy<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4178">Buffy_25</a> — Tue Dec 20, 2005 4:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-12-19T16:59:43-04:00</updated>

		<published>2005-12-19T16:59:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58494#p58494</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58494#p58494"/>
		<title type="html"><![CDATA[String tolower]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58494#p58494"><![CDATA[
<strong class="text-strong">string tolower</strong> is not applied on all the <strong class="text-strong">$user</strong> variables in your code. Why don't you initialize it as lower case<div class="codebox"><p>Code: </p><pre><code>set user [string tolower [lindex [split $arg] 0]]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Mon Dec 19, 2005 4:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Buffy_25]]></name></author>
		<updated>2005-12-19T14:47:27-04:00</updated>

		<published>2005-12-19T14:47:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58492#p58492</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58492#p58492"/>
		<title type="html"><![CDATA[String tolower]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58492#p58492"><![CDATA[
Hi,<br><br>I have a problem with the following code.<br>When a user joins and leaves after a certain period, i add (if not created yet in mysql-DB) or update his uptime in mysql-DB (if already created).<br><br>My problem is, when a person leaves (i.e. MaRkO) and he was already created as marko, then the database will create a new user in stead of updating his actual ID.<br><br>Does any one have an idea why the <span style="text-decoration:underline">string tolower</span> isn't working?<br><br>Thanks.<br><br>Buffy<br><div class="codebox"><p>Code: </p><pre><code>proc userleft {nick uhost hand dest key arg} {set fs1 [open /home/account/eggdrop/logs/timeon.txt a+]puts $fs1 "$arg"close $fs1set user [lindex [split $arg] 0]set time [join [lrange $arg 1 end]]mysql_connect datab localhost account passw /var/lib/mysql/mysql.sockset listuser [mysql_query "SELECT name FROM Userinfo"]foreach a $listuser { lappend list1 [string tolower $a] } if {[lsearch -exact $list1 [string tolower $user]] == -1} {   set insert_command [mysql_query "INSERT INTO Userinfo (name) VALUES ('$user')"]   set newtime [mysql_query "UPDATE Userinfo SET timeon='$time' WHERE name='$user'"]   set time [convert_online $time]   set timesec [mysql_query "UPDATE Userinfo SET timeonsec='$time' WHERE name='$user'"]  } else {  set presenttime [mysql_query "SELECT timeon FROM Userinfo WHERE name='$user'"]  set convpresenttime [convert_online $presenttime] #the convert_online is working ok !  set convuseronline [convert_online $time]  set useronline [expr $convuseronline+$convpresenttime]  set onlinetime [duration $useronline]  set newtime [mysql_query "UPDATE Userinfo SET timeon='$onlinetime' WHERE name='$user'"]  set newtime [mysql_query "UPDATE Userinfo SET timeonsec='$useronline' WHERE name='$user'"] }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4178">Buffy_25</a> — Mon Dec 19, 2005 2:47 pm</p><hr />
]]></content>
	</entry>
	</feed>
