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

	<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>2003-12-08T11:22:01-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-12-08T11:22:01-04:00</updated>

		<published>2003-12-08T11:22:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31192#p31192</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31192#p31192"/>
		<title type="html"><![CDATA[extra characters after close-quote]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31192#p31192"><![CDATA[
Thanks for your help ]Kami[, user, arcane. problem solved now <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">. that invoke with [channels]. hehe weird.<br><br>Regards,<br>danzai<p>Statistics: Posted by Guest — Mon Dec 08, 2003 11:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arcane]]></name></author>
		<updated>2003-11-27T14:38:50-04:00</updated>

		<published>2003-11-27T14:38:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30788#p30788</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30788#p30788"/>
		<title type="html"><![CDATA[extra characters after close-quote]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30788#p30788"><![CDATA[
naaah... and could you please use code-tags and format your code? i _hate_ looking at such code...<br><br>btw: if you format your code its easy to find missing brackets.<br><br>@]Kami[: with your bracket it would become a quite useless proc, dont you think so? <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=2617">arcane</a> — Thu Nov 27, 2003 2:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-11-27T13:06:32-04:00</updated>

		<published>2003-11-27T13:06:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30775#p30775</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30775#p30775"/>
		<title type="html"><![CDATA[extra characters after close-quote]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30775#p30775"><![CDATA[
<blockquote class="uncited"><div>I THINK HERE IS MISSING -&gt; } &lt;-</div></blockquote>I still think you don't think.<br><br><strong class="text-strong">Danzai:</strong> you didn't paste the entire proc. There's two }'s missing at the end and probably some lines of code too.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Nov 27, 2003 1:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[]Kami[]]></name></author>
		<updated>2003-11-27T08:58:00-04:00</updated>

		<published>2003-11-27T08:58:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30766#p30766</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30766#p30766"/>
		<title type="html"><![CDATA[extra characters after close-quote]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30766#p30766"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>the code for tmcquiz_ask is: ## ask a question, start game proc tmcquiz_ask {nick host handle channel arg} { global qlist quizstate botnick global tipno tiplist global userqnumber usergame userqlist global timeasked qnumber qlistorder theq global qnum_thisgame global userlist timerankreset global quizconf variable anum 0 variable txt [b]I THINK HERE IS MISSING -&gt; } &lt;- ...[/b]## only accept chatter on quizchannel if {![mx_str_ieq $channel $quizconf(quizchannel)]} { return } </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3559">]Kami[</a> — Thu Nov 27, 2003 8:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-11-27T05:58:11-04:00</updated>

		<published>2003-11-27T05:58:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30763#p30763</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30763#p30763"/>
		<title type="html"><![CDATA[extra characters after close-quote]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30763#p30763"><![CDATA[
Hi all, <br><br>i need help about tcl scripting. i've been loaded some tcl game into my eggie but when i trying type !start, bot response on via DCC tell "Tcl error [tmcquiz_ask]: extra characters after close-quote"<br><br>the code for tmcquiz_ask is:<br>                                ## ask a question, start game<br>                                proc tmcquiz_ask {nick host handle channel arg} {<br>                                  global qlist quizstate botnick<br>                                  global tipno tiplist<br>                                  global userqnumber usergame userqlist<br>                                  global timeasked qnumber qlistorder theq<br>                                  global qnum_thisgame<br>                                  global userlist timerankreset<br>                                  global quizconf<br>                                  variable anum 0<br>                                  variable txt<br><br>                                  ## only accept chatter on quizchannel<br>                                  if {![mx_str_ieq $channel $quizconf(quizchannel)]} {<br>                                    return<br>                                  }<br><br>                                  #   switch -exact $quizstate {<br>                                    #"paused" {<br>                                      #    mxirc_notc $nick "1,0 Game is paused. "<br>                                      #    return 1<br>                                      #}<br>                                      #"stopped" {<br>                                        #    mxirc_notc $nick "1,0 Game is stopped. "<br>                                        #    return 1<br>                                        #}<br>                                      #    }<br><br>                                      ## record that $nick spoke (prevents desert detection from stopping,<br>                                      ## when an user joins and starts the game with !ask)<br>                                      if {![mx_str_ieq $nick $botnick]} {<br>                                        mx_getcreate_userentry $nick $host<br>                                      }<br><br>                                      ## any questions available?<br>                                      if {[llength $qlist] == 0 &amp;&amp; [mx_userquests_available] == 0} {<br>                                        mxirc_say $channel "15,4 Sorry.. 15,2 my database is empty. "<br>                                        } elseif {$quizstate == "asked"} {<br>                                        ## game runs, tell user the question via msg<br>                                        set txt "Current"<br>                                        if {[info exists theq(Level)]} {<br>                                              set txt "$txt level $theq(Level)"<br>                                          }<br>                                          if {$usergame == 1} {<br>                                                set txt "$txt user"<br>                                            }<br>                                            set txt "$txt question no. $qnum_thisgame is \""<br>                                            if {[info exists theq(Category)]} { <br>                                                  set txt "${txt}\($theq(Category)\) "<br>                                              }<br>                                              set txt "$txt$theq(Question)\" open for [mx_duration $timeasked]"<br>                                              if {$theq(Score) &gt; 1} {<br>                                                    set txt "$txt, worth $theq(Score) points."<br>                                                } else {<br>                                                    set txt "$txt."<br>                                                }<br>                                                mxirc_notc $nick $txt<br>                                                } elseif {$quizstate == "waittoask" &amp;&amp; ![mx_str_ieq $nick $botnick]} {<br>                                                ## no, user has to be patient<br>                                                mxirc_notc $nick "Please stand by, the next question comes in less than $quizconf(askdelay) seconds."<br>                                                } else {<br>                                                ##<br>                                                ## ok, now lets see, which question to ask (normal or user)<br>                                                ##<br><br>                                                ## clear old question<br>                                                foreach k [array names theq] {<br>                                                      unset theq($k)<br>                                                  }<br><br>                                                  if {[mx_userquests_available]} {<br>                                                        ## select a user question<br>                                                        array set theq [lindex $userqlist $userqnumber]<br>                                                        set usergame 1<br>                                                        incr userqnumber<br>                                                        mx_log "--- asking a user question: $theq(Question)"<br>                                                    } else {<br>                                                          variable ok 0<br>                                                          while {!$ok} {<br>                                                        ## select a normal question<br>                                                        if {$qnumber &gt;= [llength $qlistorder]} {<br>                                                              set qnumber 0<br>                                                              set qlistorder [mx_mixedlist [llength $qlist]]<br>                                                          }<br>                                                          array set theq [lindex $qlist [lindex $qlistorder $qnumber]]<br>                                                          set usergame 0<br><br>                                                          # skip question if author is about to win<br>                                                          if {[info exists theq(Author)] &amp;&amp; [info exists userlist($theq(Author))]} {<br>                                                                array set auser $userlist($theq(Author))<br>                                                                if {$auser(score) &gt;= [expr $quizconf(winscore) - 5]} {<br>                                                              mx_log "--- skipping question number $qnumber ([lindex $qlistorder $qnumber]), author is about to win"<br>                                                              ## clear old question<br>                                                              foreach k [array names theq] {<br>                                                                    unset theq($k)<br>                                                                }<br>                                                                    } else {<br>                                                                mx_log "--- asking question number $qnumber ([lindex $qlistorder $qnumber]): $theq(Question)"<br>                                                                set ok 1<br>                                                                  }<br>                                                              } else {<br>                                                                    mx_log "--- asking question number $qnumber ([lindex $qlistorder $qnumber]): $theq(Question)"<br>                                                                    set ok 1<br>                                                                }<br>                                                                incr qnumber<br>                                                                  }<br>                                                              }<br>                                                              incr qnum_thisgame<br>                                                              if {$qnum_thisgame == 1} {<br>                                                                    set timerankreset [unixtime]<br>                                                                    mx_log "---- it's the no. $qnum_thisgame in this game, rank timer started."<br>                                                                } else {<br>                                                                      mx_log "---- it's the no. $qnum_thisgame in this game."<br>                                                                  }<br><br>                                                                  ##<br>                                                                  ## ok, set some minimal required fields like score, regexp and the tiplist.<br>                                                                  ##<br><br>                                                                  ## set regexp to match<br>                                                                  if {![info exists theq(Regexp)]} {<br>                                                                        ## mask all regexp special chars except "."<br>                                                                        set aexp [mx_tweak_umlauts $theq(Answer)]<br>                                                                        regsub -all "(\\+|\\?|\\*|\\^|\\$|\\(|\\)|\\\[|\\\]|\\||\\\\)" $aexp "\\\\\\1" aexp<br>                                                                        # get #...# area tags for tipgeneration as regexp<br>                                                                        regsub -all ".*\#(\[^\#\]*\)\#.*" $aexp "\\1" aexp<br>                                                                        set theq(Regexp) $aexp <br>                                                                    } else {<br>                                                                          set theq(Regexp) [mx_tweak_umlauts $theq(Regexp)]<br>                                                                      }<br><br>                                                                      # protect embedded numbers<br>                                                                      if {[regexp "\[0-9\]+" $theq(Regexp)]} {<br>                                                                            set newexp ""<br>                                                                            set oldexp $theq(Regexp)<br>                                                                            set theq(Oldexp) $oldexp<br><br>                                                                            while {[regexp -indices "(\[0-9\]+)" $oldexp pair]} {<br>                                                                          set subexp [string range $oldexp [lindex $pair 0]  [lindex $pair 1]]<br>                                                                          set newexp "${newexp}[string range $oldexp -1 [expr [lindex $pair 0] - 1]]"<br>                                                                          if {[regexp -- $theq(Regexp) $subexp]} {<br>                                                                                set newexp "${newexp}(^|\[^0-9\])${subexp}(\$|\[^0-9\])"<br>                                                                            } else {<br>                                                                                  set newexp "${newexp}${subexp}"<br>                                                                              }<br>                                                                              set oldexp "[string range $oldexp [expr [lindex $pair 1] + 1] [string length $oldexp]]"<br>                                                                                }<br>                                                                                set newexp "${newexp}${oldexp}"<br>                                                                                set theq(Regexp) $newexp<br>                                                                                mx_log "---- replaced regexp '$theq(Oldexp)' with '$newexp' to protect numbers."<br>                                                                            }<br><br><br>hope you all can solved my problem in here <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>i dont know what happened.<br>and i'm using eggdrop 1.6.13<br>Thank you.<br><br>Regards,<p>Statistics: Posted by Guest — Thu Nov 27, 2003 5:58 am</p><hr />
]]></content>
	</entry>
	</feed>
