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

	<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>2006-06-07T06:34:09-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-06-07T06:34:09-04:00</updated>

		<published>2006-06-07T06:34:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63790#p63790</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63790#p63790"/>
		<title type="html"><![CDATA[adding numeric values.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63790#p63790"><![CDATA[
With a "didnt understand" I am unable to help you. You must be more specific about the part you did not understand. If you did not understand at all, I suggest visiting some English lessons... though you wouldn't be able to understand then that suggestion, either <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">.<br>I make a wild guess and give the link to the <a href="http://www.tcl.tk/man/tcl8.4/TclCmd/string.htm#M34" class="postlink">string map manual</a>.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Wed Jun 07, 2006 6:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamdeath]]></name></author>
		<updated>2006-06-07T05:20:03-04:00</updated>

		<published>2006-06-07T05:20:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63788#p63788</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63788#p63788"/>
		<title type="html"><![CDATA[adding numeric values.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63788#p63788"><![CDATA[
Did'nt understand I am sorry ;/<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5982">iamdeath</a> — Wed Jun 07, 2006 5:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-06-06T18:50:29-04:00</updated>

		<published>2006-06-06T18:50:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63776#p63776</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63776#p63776"/>
		<title type="html"><![CDATA[adding numeric values.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63776#p63776"><![CDATA[
advice: don't use regsub on simple string replaces without regular expressions. String map does fine in both cases. Though I am not sure why there should be an error, because of that line. Get the complete errorInfo (refer <a href="http://forum.egghelp.org/viewtopic.php?t=10215" class="postlink">Help us to help you</a>).<br><br>About the NICK_NICK_ thing... I advice you to actually try what such statements do:<div class="codebox"><p>Code: </p><pre><code>% set list [split NICK_NICK_ _]NICK NICK {}% llength $list3</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Tue Jun 06, 2006 6:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamdeath]]></name></author>
		<updated>2006-06-06T13:42:14-04:00</updated>

		<published>2006-06-06T13:42:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63766#p63766</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63766#p63766"/>
		<title type="html"><![CDATA[adding numeric values.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63766#p63766"><![CDATA[
Question 1:<div class="codebox"><p>Code: </p><pre><code>proc relay:text {nick uhost handle chan text} {  global relay  if {[isop $nick $chan] == "1"} {    if {[string range "$nick" 0 0] != "^"} {return 0}#    if {[string match "*m*" [getchanmode $chan]] == "0"} { return 0 }    foreach badpub $relay(badpubs) { if {[string match "$badpub" [string tolower $text]] == "1"} { return 0 } }    regsub -all {FOUR} $text "10,09FOUR" text    regsub -all {SIX} $text "11,12SIX" text    regsub -all {OUT} $text "04,01OUT" text    if {[string range "$nick" 0 0] == "^"} { set nick "[string range "$nick" 1 end]" }    if {[llength [split $nick "_"]] == "2" &amp;&amp; [lindex [split $nick "_"] 0] != "" &amp;&amp; [lindex [split $nick "_"] 1] != ""} { set nick "[lindex [split $nick "_"] 0] VS [lindex [split $nick "_"] 1]" }    relay:send "PRIVMSG $relay(channel_out) :$nick: $text"}</code></pre></div><blockquote class="uncited"><div>   regsub -all {FOUR} $text "10,09FOUR" text<br>   regsub -all {SIX} $text "11,12SIX" text<br>   regsub -all {OUT} $text "04,01OUT" text</div></blockquote>When the bot recieves the word FOUR SIX AND OUT, it changes the color pattern of it and shows in the channel. The way "FOUR, SIX &amp; OUT" are added, I want something like:<br><blockquote class="uncited"><div>regsub -all {0} $text "NO RUN" text<br>regsub -all {1} $text "ONE RUN" text<br>regsub -all {2} $text "TWO RUNS" text</div></blockquote>I tried that but giving me error.. What could be the best way adding numeric values?<br><br>Question 2:<br><br>If you get a Nickname like :<br><br><strong class="text-strong">NICK_NICK_</strong> and I want to make it <strong class="text-strong">NICK VS NICK</strong>: how will you do that? can you help me out ?<br>Somethign like this:?<br><div class="codebox"><p>Code: </p><pre><code>    if {[llength [split $nick "_"]] == "2" &amp;&amp; [lindex [split $nick "_"] 0] != "" &amp;&amp; [lindex [split $nick "_"] 1] != ""} { set nick "[lindex [split $nick "_"] 0] VS [lindex [split $nick "_"] 1]" }</code></pre></div>Thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5982">iamdeath</a> — Tue Jun 06, 2006 1:42 pm</p><hr />
]]></content>
	</entry>
	</feed>
