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

	<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>2016-07-09T18:10:03-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2016-07-09T18:10:03-04:00</updated>

		<published>2016-07-09T18:10:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105242#p105242</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105242#p105242"/>
		<title type="html"><![CDATA[help tcl welcome]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105242#p105242"><![CDATA[
<strong class="text-strong">thanks caesar &amp; Get_A_Fix</strong><br><br>your help is appreciated<br>thanks again......<br><br>gracias a ti tambien juanamores por tratar de ayudar, yo tambien hablo español, saludos cuate.<br><br>I also worked well<div class="codebox"><p>Code: </p><pre><code>set ayuda_chanxp "#tcl #help #mirc"set mymsgs { "Welcome $nick to $chan, thanks for visit. To view rules type !rules"      "come back soon"      " bye bye... " } bind join - * greet:msg proc greet:msg {nick host hand chan} {  global mymsgs ayuda_chanxp botnick  if {(([lsearch -exact [string tolower $ayuda_chanxp] [string tolower $chan]] != -1)  || ($ayuda_chanxp == "")) &amp;&amp; ($nick != $botnick)} {foreach i $mymsgs {puthelp "NOTICE $nick :[subst $i]"} } }</code></pre></div>I also worked well<div class="codebox"><p>Code: </p><pre><code>set ayuda_chanxp "#tcl #help #mirc"set mymsgs {"Welcome %nick to %chan, thanks for visit. To view rules type !rules" "come back soon" " bye bye... " } bind join - * greet:msg proc greet:msg {nick host hand chan} {  global mymsgs ayuda_chanxp botnick if {(([lsearch -exact [string tolower $ayuda_chanxp] [string tolower $chan]] != -1)  || ($ayuda_chanxp == "")) &amp;&amp; ($nick != $botnick)} {foreach line $mymsgs {         set message [string map [list %nick $nick %chan $chan] $line]         puthelp "NOTICE $nick :$message"  } } }</code></pre></div>Thanks again for the help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Sat Jul 09, 2016 6:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-07-09T10:53:43-04:00</updated>

		<published>2016-07-09T10:53:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105241#p105241</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105241#p105241"/>
		<title type="html"><![CDATA[help tcl welcome]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105241#p105241"><![CDATA[
Si <em class="text-italics">-nocase</em> se especifica, entonces las cadenas se comparan de manera mayúsculas y minúsculas. <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=187">caesar</a> — Sat Jul 09, 2016 10:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-07-09T06:08:23-04:00</updated>

		<published>2016-07-09T06:08:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105240#p105240</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105240#p105240"/>
		<title type="html"><![CDATA[help tcl welcome]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105240#p105240"><![CDATA[
<blockquote class="uncited"><div>@juanamores: Por que utilizar <em class="text-italics">-exact</em> y la <em class="text-italics">string tolower</em> cuando se puede ir directamente con <em class="text-italics">-nocase</em>?</div></blockquote>O sea, el <em class="text-italics">-nocase</em> sirve no sólo para minúsculas, sino también para comparar palabras exactas?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Sat Jul 09, 2016 6:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Get_A_Fix]]></name></author>
		<updated>2016-07-09T12:56:33-04:00</updated>

		<published>2016-07-08T08:04:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105238#p105238</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105238#p105238"/>
		<title type="html"><![CDATA[help tcl welcome]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105238#p105238"><![CDATA[
I would probably use caesar's code, due to his expertise, but I did make something exactly like this a while back for someone. This uses a setudef (user defined setting), allowing you to enable/disable per channel.<br>This method allows for you to utilise $nick and $chan like normal, inside your message list.<br><div class="codebox"><p>Code: </p><pre><code># $Id: greeter.tcl,v1.1 18/01/2016 06:20:47am GMT +12 (NZST) IRCSpeed Exp $## SYNTAX:# !greet on|off# Feel free to edit this setting. Change the ! to any character you would like as a trigger.set greettrig "!"# Set here what flags you wish to allow to enable/disable this script. (change them to "-|-" for anyone)set greetflags "ovf|ovf"# Set here the greetings you wish to send each user that joins.set mymsgs {  "Hi, how are you?"  "Hi $nick!"  "Hello $nick, welcome to $chan"  "Hi [$nick], you have to pay $20 to enter here"}### DONT EDIT BELOW ###proc getTrig {} {  global greettrig  return $greettrig}setudef flag autogreet bind join - * greet:msgbind pub - ${greettrig}greet greet:pubproc greet:msg {nick host hand chan} {  global mymsgs  if {[validuser [nick2hand $nick]] &amp;&amp; ![channel get $chan autogreet]} {return}  set greetmsg [lindex $mymsgs [rand [llength $mymsgs]]]  set greetmsg [subst -nocommands $greetmsg]  putserv "NOTICE $nick :$greetmsg"}proc greet:pub {nick uhost hand chan arg} {  global greetflags  if {[matchattr [nick2hand $nick] $greetflags $chan]} {    if {[lindex [split $arg] 0] == ""} {putquick "PRIVMSG $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getTrig]greets on|off"; return}    if {[lindex [split $arg] 0] == "on"} {      if {[channel get $chan autogreet]} {putquick "PRIVMSG $chan :\037ERROR\037: This setting is already enabled."; return}      channel set $chan +autogreet      puthelp "PRIVMSG $chan :Enabled Onjoin Greeter for $chan"      savechannels      return 0    }    if {[lindex [split $arg] 0] == "off"} {      if {![channel get $chan autogreet]} {putquick "PRIVMSG $chan :\037ERROR\037: This setting is already disabled."; return}      channel set $chan -autogreet      puthelp "PRIVMSG $chan :Disabled Onjoin Greeter for $chan"      savechannels      return 0    }  }}putlog ".:greeter.tcl,v1.1:. Loaded!"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6204">Get_A_Fix</a> — Fri Jul 08, 2016 8:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-07-08T07:46:34-04:00</updated>

		<published>2016-07-08T07:46:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105237#p105237</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105237#p105237"/>
		<title type="html"><![CDATA[help tcl welcome]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105237#p105237"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>namespace eval greet {set greet(channels) "#tcl #help #mirc"set greet(messages) {"Welcome %nick to %chan, thanks for visit. To view rules type !rules""come back soon"" bye bye... "}bind join - * [namespace current]::doGreetproc doGreet {nick uhost hand chan} {variable greetif {[isbotnick $nick]} returnif {[lsearch $greet(channels) $chan] == -1} returnforeach line  $greet(messages) {set message [string map [list %nick $nick %chan $chan] $line]puthelp "NOTICE $nick :$message"}}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Jul 08, 2016 7:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2016-07-07T14:55:27-04:00</updated>

		<published>2016-07-07T14:55:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105233#p105233</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105233#p105233"/>
		<title type="html"><![CDATA[help tcl welcome]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105233#p105233"><![CDATA[
cesar is possible to change your tcl to work well<br><div class="codebox"><p>Code: </p><pre><code>set greet(message) {"Welcome %nick to %chan, thanks for visit. To view rules type !rules""come back soon"" bye bye... "}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Thu Jul 07, 2016 2:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2016-07-07T14:34:56-04:00</updated>

		<published>2016-07-07T14:34:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105232#p105232</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105232#p105232"/>
		<title type="html"><![CDATA[help tcl welcome]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105232#p105232"><![CDATA[
very good .. thanks caesar  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>No funciono juan pero gracias por la ayuda <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br>la tcl de caesar si funciona y esta perfecta  <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=8327">Arnold_X-P</a> — Thu Jul 07, 2016 2:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-07-07T04:04:35-04:00</updated>

		<published>2016-07-07T04:04:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105231#p105231</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105231#p105231"/>
		<title type="html"><![CDATA[help tcl welcome]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105231#p105231"><![CDATA[
You achieve that with <a href="http://tcl.activestate.com/man/tcl8.6/TclCmd/lsearch.htm" class="postlink">lsearch</a>.<div class="codebox"><p>Code: </p><pre><code>namespace eval greet {set greet(channels) "#tcl #help #mirc"set greet(message) "Welcome %nick to %chan, thanks for visit. To view rules type !rules"bind join - * [namespace current]::doGreetproc doGreet {nick uhost hand chan} {variable greetif {[isbotnick $nick]} returnif {[lsearch -nocase $greet(channels) $chan] == -1} returnset message [string map [list %nick $nick %chan $chan] $greet(message)]puthelp "NOTICE $nick :$message"}}</code></pre></div>Squeezed the 3 lines in just a single one cos are short.<br><br>@juanamores: Por que utilizar <em class="text-italics">-exact</em> y la <em class="text-italics">string tolower</em> cuando se puede ir directamente con <em class="text-italics">-nocase</em>?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Jul 07, 2016 4:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-07-07T04:00:14-04:00</updated>

		<published>2016-07-07T04:00:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105230#p105230</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105230#p105230"/>
		<title type="html"><![CDATA[help tcl welcome]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105230#p105230"><![CDATA[
Prueba con esto:<br><div class="codebox"><p>Code: </p><pre><code>set ayuda_chanxp "#tcl #help #mirc"set msg_greet($::ayuda_chanxp) {  "welcome $nick to $chan"  "thanks for visit"  "for view rules tipe !rules"}bind join - * chan_greetproc chan_greet {nick uhost hand chan} {  global botnick ayuda_chanxp msg_greet  if {$nick == $botnick} {return 1}if {[lsearch -exact [string tolower $ayuda_chanxp] [string tolower $chan]] != -1} {    set msg_temp $msg_greet($chan)    foreach i $msg_temp {puthelp "NOTICE $nick :[subst $i]"}    return 1  } else {  return 0  }} </code></pre></div>No lo he probado, pero debería funcionarte sin problemas.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Thu Jul 07, 2016 4:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2016-07-07T01:34:53-04:00</updated>

		<published>2016-07-07T01:34:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105229#p105229</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105229#p105229"/>
		<title type="html"><![CDATA[help tcl welcome]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105229#p105229"><![CDATA[
This works well tcl only it works in a channel<div class="codebox"><p>Code: </p><pre><code>set ayuda_chanxp "#tcl" set msg_greet($::ayuda_chanxp) {  "welcome $nick to $chan"   "thanks for visit"   "for view rules tipe !rules" } bind join - * chan_greet proc chan_greet {nick uhost hand chan} {   global botnick ayuda_chanxp msg_greet   if {$nick == $botnick} {return 1}   if {$chan == $ayuda_chanxp} {     set msg_temp $msg_greet($chan)     foreach i $msg_temp {puthelp "NOTICE $nick :[subst $i]"}     return 1   } } </code></pre></div>but my question is<br>You can extend this tcl to operate in several channels?<br><br>example:<div class="codebox"><p>Code: </p><pre><code>set ayuda_chanxp "#tcl #help #mirc"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Thu Jul 07, 2016 1:34 am</p><hr />
]]></content>
	</entry>
	</feed>
