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

	<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>2023-09-09T12:07:38-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Leon--]]></name></author>
		<updated>2023-09-09T12:07:38-04:00</updated>

		<published>2023-09-09T12:07:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112151#p112151</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112151#p112151"/>
		<title type="html"><![CDATA[mrc to tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112151#p112151"><![CDATA[
Thanks for this script <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13024">Leon--</a> — Sat Sep 09, 2023 12:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2023-09-09T07:25:43-04:00</updated>

		<published>2023-09-09T07:25:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112150#p112150</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112150#p112150"/>
		<title type="html"><![CDATA[mrc to tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112150#p112150"><![CDATA[
Just add the following code in the script (before the bind lines):<div class="codebox"><p>Code: </p><pre><code>   proc money {nick uhost handle chan text} {      set fi [open $::leon::ulist r]      set users [split [read -nonewline $fi] "\n"]      close $fi      set uid [lsearch -glob -nocase $users "$nick|*"]      if {$uid == -1} {         putserv "NOTICE $nick :Sorry, maar u bent niet bekend"         return      }      putserv "NOTICE $nick :Je hebt momenteel €[lindex [split [lindex $users $uid] "|"] 1] in je portemonnee"   }      bind pub - ${trigger}money ::leon::money</code></pre></div>The final tcl is not optimised as some pieces of code a used in different places<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sat Sep 09, 2023 7:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Leon--]]></name></author>
		<updated>2023-09-08T15:01:28-04:00</updated>

		<published>2023-09-08T15:01:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112149#p112149</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112149#p112149"/>
		<title type="html"><![CDATA[mrc to tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112149#p112149"><![CDATA[
Can you also made a little script to see how much money some one have with the command !money and from the same users.txt Thanks alot for this, the script you made i like it very much.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13024">Leon--</a> — Fri Sep 08, 2023 3:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Leon--]]></name></author>
		<updated>2023-09-08T04:20:32-04:00</updated>

		<published>2023-09-08T04:20:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112148#p112148</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112148#p112148"/>
		<title type="html"><![CDATA[mrc to tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112148#p112148"><![CDATA[
Thanks for this <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13024">Leon--</a> — Fri Sep 08, 2023 4:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2023-09-07T10:24:04-04:00</updated>

		<published>2023-09-07T10:24:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112141#p112141</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112141#p112141"/>
		<title type="html"><![CDATA[mrc to tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112141#p112141"><![CDATA[
Here is a little version:<br><div class="codebox"><p>Code: </p><pre><code>namespace eval leon {   variable ulist "users.txt"   variable items   set items(topic) {10 ""}   set items(cola) {2.50 "geeft %nick% een lekker koud glas cola, met ijsklontjes."}   set items(sigaret) {0.50 "geeft %nick% een peuk"}   variable trigger "!"      variable lastuse 0      proc reguser {nick uhost handle chan text} {      set fi [open $::leon::ulist r]      set users [split [read -nonewline $fi] "\n"]      close $fi      set uid [lsearch -glob -nocase $users "$nick|*"]      if {$uid &gt;= 0} {         putserv "NOTICE $nick :Je bent al een keer hier geweest."      } else {         set fo [open $::leon::ulist a]         puts $fo "[string tolower $nick]|50"         close $fo         putserv "NOTICE $nick :U heeft 50 euro gekregen om uit te geven aan de bar."      }   }      proc pay {nick uhost handle chan text} {      set now [clock seconds]      if {[expr $now - $::leon::lastuse]&lt;90} {         putserv "NOTICE $nick :De cmd is momenteel uitgeschakeld."         return 0      }      set item [join [lindex [split $text] 0]]      set rest [join [lrange [split $text] 1 end]]      if {![info exists ::leon::items($item)]} {         putserv "NOTICE $nick :Sorry, I don't know what $item is"         return 0      }      set val [lindex $::leon::items($item) 0]      set utext [lindex $::leon::items($item) 1]      set utext [string map [list "%nick%" $nick] $utext]      set fi [open $::leon::ulist r]      set users [split [read -nonewline $fi] "\n"]      close $fi      set uid [lsearch -glob -nocase $users "$nick|*"]      if {$uid == -1 || [lindex [split [lindex $users $uid] "|"] 1]&lt;$val} {         putserv "NOTICE $nick :U heeft niet genoeg geld."         return 0      }      if {$item eq "topic"} {         putserv "TOPIC $chan :$rest"      } else {         putserv "NOTICE $nick :Er wordt €$val afgeschreven."         putserv "PRIVMSG $chan :\001ACTION $utext\001"      }      ::leon::debt $nick $val      set ::leon::lastuse [clock seconds]   }      proc debt {nick val} {      set fi [open $::leon::ulist r]      set users [split [read -nonewline $fi] "\n"]      close $fi      set fo [open $::leon::ulist w]      foreach e $users {         if {[string match -nocase "$nick|*" $e]} {            lassign [split $e "|"] u v            set v [expr $v - $val]            puts $fo "$nick|$v"         } else {            puts $fo $e         }      }      close $fo   }      bind pub - ${trigger}register ::leon::reguser   bind pub - ${trigger}pay ::leon::pay}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Thu Sep 07, 2023 10:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Leon--]]></name></author>
		<updated>2023-09-06T11:34:12-04:00</updated>

		<published>2023-09-06T11:34:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112136#p112136</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112136#p112136"/>
		<title type="html"><![CDATA[mrc to tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112136#p112136"><![CDATA[
<blockquote class="uncited"><div>Ok, I don't think using .ini files is the best solution with eggdrop script, unless you really want it.<br>How are users added in the users.ini ?</div></blockquote>How would you do it then, yes it's beter by host. but i have no idea how.[/quote]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13024">Leon--</a> — Wed Sep 06, 2023 11:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Leon--]]></name></author>
		<updated>2023-09-06T11:17:29-04:00</updated>

		<published>2023-09-06T11:17:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112134#p112134</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112134#p112134"/>
		<title type="html"><![CDATA[mrc to tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112134#p112134"><![CDATA[
This is in tcl script<br><div class="codebox"><p>Code: </p><pre><code>bind pub - ${trigger}register pub:registerproc pub:register {nick host hand chan arg} {  set fname "money.txt"  set fp [open $fname "r"]  set data [read -nonewline $fp]  close $fp  set lines [split $data "\n"]  set searchresult ""  foreach line $lines {     if {[string match *$nick* [join $line]]} {        lappend searchresult $line     }     if {[$nick == "[lindex [split [join $searchresult] "|"] 0]"} {        putserv "NOTICE $nick :Je bent al een keer hier geweest."        return 0     }     set linetoadd "$nick|50"     set fname "money.txt"     set fp [open $fname "a"]     puts $fp $linetoadd     close $fp     putserv "NOTICE $nick :U heeft 50 euro gekregen om uit te geven aan de bar."     return 0  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13024">Leon--</a> — Wed Sep 06, 2023 11:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2023-09-06T10:12:38-04:00</updated>

		<published>2023-09-06T10:12:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112130#p112130</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112130#p112130"/>
		<title type="html"><![CDATA[mrc to tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112130#p112130"><![CDATA[
Ok, I don't think using .ini files is the best solution with eggdrop script, unless you really want it.<br>How are users added in the users.ini ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Wed Sep 06, 2023 10:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Leon--]]></name></author>
		<updated>2023-09-06T10:02:19-04:00</updated>

		<published>2023-09-06T10:02:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112129#p112129</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112129#p112129"/>
		<title type="html"><![CDATA[mrc to tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112129#p112129"><![CDATA[
This is in the bar.ini <div class="codebox"><p>Code: </p><pre><code>[bar]topic=10cola=2.50sigaret=0.50</code></pre></div>and the users.ini is<br><div class="codebox"><p>Code: </p><pre><code>[users]Leon=470.5</code></pre></div>This means i have 470.5 euro's, the topic costs 10 euro's and so on<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13024">Leon--</a> — Wed Sep 06, 2023 10:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2023-09-06T08:25:27-04:00</updated>

		<published>2023-09-06T08:25:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112125#p112125</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112125#p112125"/>
		<title type="html"><![CDATA[mrc to tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112125#p112125"><![CDATA[
<blockquote class="uncited"><div>And even if I can read mIRC's code, <strong class="text-strong">without the users.ini and the bar.ini, I can't really help</strong>.</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Wed Sep 06, 2023 8:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Leon--]]></name></author>
		<updated>2023-09-06T04:41:50-04:00</updated>

		<published>2023-09-06T04:41:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112121#p112121</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112121#p112121"/>
		<title type="html"><![CDATA[mrc to tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112121#p112121"><![CDATA[
If this scripts works and some one type .pay topic that er will be removed 10 euro's from the user account and if they type !register they will be added to the userlist and get 50 euro to expand by this robot. This is a little bit the intention to work. I hope you can help me <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13024">Leon--</a> — Wed Sep 06, 2023 4:41 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2023-09-04T11:36:12-04:00</updated>

		<published>2023-09-04T11:36:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112113#p112113</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112113#p112113"/>
		<title type="html"><![CDATA[mrc to tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112113#p112113"><![CDATA[
And even if I can read mIRC's code, without the users.ini and the bar.ini, I can't really help.<br><br>As willyw said, it's probably better to describe what your script does<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Mon Sep 04, 2023 11:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2023-09-02T10:09:59-04:00</updated>

		<published>2023-09-02T10:09:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112107#p112107</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112107#p112107"/>
		<title type="html"><![CDATA[Re: mrc to tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112107#p112107"><![CDATA[
<blockquote class="uncited"><div>Hi,<br>The next text i want it in tcl. i tried but it is not done for me.<br>I don't no why but for me it's complicated.<br>...</div></blockquote><br>As it is right now, the number of people here that even can respond to your request is limited to those that can interpret the code that you have posted.<br><br>Many here know TCL.     <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I don't know how many know that code that you posted.   I _think_ that it is mIRC code.   Not sure.<br><br>So -<br>If you don't get a response here within a couple days, perhaps you could describe - line by line might be best -  just what that code is doing.   Your post implies that you do understand that code,  so you can do this.    <br><br>Let's see what other replies you get in here.      <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Sat Sep 02, 2023 10:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Leon--]]></name></author>
		<updated>2023-09-02T08:39:00-04:00</updated>

		<published>2023-09-02T08:39:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112106#p112106</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112106#p112106"/>
		<title type="html"><![CDATA[mrc to tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112106#p112106"><![CDATA[
Hi,<br>The next text i want it in tcl. i tried but it is not done for me.<br>I don't no why but for me it's complicated.<br><div class="codebox"><p>Code: </p><pre><code>on users:text:!pay*:#: {  if (%cmd == on) { goto begin }  if (%cmd == off) { goto end | halt }  :begin  if ($2 == topic) { goto topic }  if ($2 == cola) { goto cola }  :topic  if ( $readini(users.ini,users,$nick) &lt;= 10) { /notice $nick U heeft niet genoeg geld. }  else { /set %nick $nick | /notice $nick Er wordt €10.00 afgeschreven. | /msg $me calc $readini(users.ini,users,$nick) - $readini(bar.ini,bar,topic) | /topic $chan $3- | /timer 1 300 topic $chan $readini(topic.ini,topic,1) | /set %cmd off | /timer 1 90 /set %cmd on | halt }  :cola  if ( $readini(users.ini,users,$nick) &lt;= 2.50) { /notice $nick U heeft niet genoeg geld. }  else { /set %nick $nick | /notice $nick Er wordt €2.50 afgeschreven. | /msg $me calc $readini(users.ini,users,$nick) - $readini(bar.ini,bar,cola) | /ame geeft $nick een lekker koud glas cola, met ijsklontjes. | /set %cmd off | /timer 1 90 /set %cmd on | halt }  :end  /notice $nick De cmd is momenteel uitgeschakeld.}</code></pre></div>Thanks for some help.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13024">Leon--</a> — Sat Sep 02, 2023 8:39 am</p><hr />
]]></content>
	</entry>
	</feed>
