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

	<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-02-14T10:33:50-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-02-14T10:33:50-04:00</updated>

		<published>2003-02-14T10:33:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16592#p16592</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16592#p16592"/>
		<title type="html"><![CDATA[IEKS]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16592#p16592"><![CDATA[
so par is probably a pointer @_o, hihi, sounds logicaly. but does still not answer. but ill try strcmp.<br>this should be descript somewhere here *looks in an old c book*.<br><br>ps: i think its around 8 years ago i learned the diffrenz between C and C++ <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> and i told you i am not used to C ^^.<br><br>pps: shouldnt give me the compiler a warning, when i am trieing to compare pointer with strings? im sure i had seen such things using borland c 4.5 or something like that <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">.<br><br>ppps:<br>hihi, im just stupid, i am still not getting a true value with strcasecmp <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">.<br><br>found a new subfunction in slang_multitext.c depending to prevoius: <div class="codebox"><p>Code: </p><pre><code>static char *slang_multitext_getrandomtext(struct slang_multitext *where){  struct slang_mt_content *content;  unsigned long x;  if (!where)    return NULL;  x = random() % where-&gt;nr;  for (content = where-&gt;contents; content; content = content-&gt;next)    if (!x)      return slang_text_get(content-&gt;text);    else      x--;  // we should never reach this part  debug0("warning: getrandomtext didn't find anything!");  return NULL;}</code></pre></div>PS: ich hab mir mal die entsprechenden ausschnitte in den alten files von  v1.3.3dev1 angeschaut, aber da sich die eine function von dort total aufgespittet hat find ich mich da nicht zurecht, ehrlich gesagt <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad">. aber wäre net, wenn sich das mal einer anschauen könnte...<br><br>PPS: last PS was in german, dont ask me why:<br>i tried to compare the parts with the old files from v1.3.3dev1, but everything is split up and I can't track it ^^. Would be nice someone takes a deeper look.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Fri Feb 14, 2003 10:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-02-14T01:24:12-04:00</updated>

		<published>2003-02-14T01:24:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16564#p16564</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16564#p16564"/>
		<title type="html"><![CDATA[stats.mod v1.40dev20 - bot stucking in loop]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16564#p16564"><![CDATA[
Hi, just a note, eggdrop is written in C and not C++. Also the part you changed is.. well, let's just say you can't test if par == "words" like that. That's basically never true. You're comparing the addresses of par and the string "words". You probably meant to do strcmp or strcasecmp.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Fri Feb 14, 2003 1:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-02-13T18:31:26-04:00</updated>

		<published>2003-02-13T18:31:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16560#p16560</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16560#p16560"/>
		<title type="html"><![CDATA[okok]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16560#p16560"><![CDATA[
i continiued my research and find out the looping stucking lines are<div class="codebox"><p>Code: </p><pre><code>    else if ((tmp = slangtypetoi(par)) != T_ERROR) {      itype = tmp;      if (itype == T_WORD) {        word = newsplit(&amp;params);      }      type = par;</code></pre></div>if you remove them or replace them with somthing like <div class="codebox"><p>Code: </p><pre><code>    else if (par == "words" || par == "lines" || par == "wpl" || par == "actions" || par == "smileys" || par == "kicks" || par == "modes" || par == "topics" || par == "minutes") {      itype = par = tmp;      if (itype == T_WORD) {        word = newsplit(&amp;params);      }      type = par;</code></pre></div>the bot wont react correctly to !top modes or anything like this, but it at least doenst hang up. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>so it seems it stucks in the procedur slangtypetoi which is found in slang.c <div class="codebox"><p>Code: </p><pre><code>#ifndef SLANG_NOTYPESstatic char *getslangtype(char *type){  char *stype;  if (!glob_slang) {    putlog(LOG_MISC, "*", "WARNING! No language selected! (getslangtype())");    return "NOLANG";  }  stype = slang_type_get(glob_slang-&gt;types, type);  if (stype)    return stype;  else    return type;}</code></pre></div> and the slang_type_get is found in slang_type.c <div class="codebox"><p>Code: </p><pre><code>static char *slang_type_get(struct slang_type *where, char *type){  while (where) {    if (!strcasecmp(where-&gt;type, type))      return slang_multitext_getrandomtext(where-&gt;mtext);    where = where-&gt;next;  }  return NULL;}</code></pre></div>here is a loop the bot could get stucking in. to be honset, i have no clue what "where = where-&gt;next" does and it seems return is never called...<br><br>eh yes, i have loaded the de langpack and alternavly the en. but i cant find thinds like words etc. in there...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Thu Feb 13, 2003 6:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-02-07T08:42:48-04:00</updated>

		<published>2003-02-07T08:42:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16286#p16286</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16286#p16286"/>
		<title type="html"><![CDATA[stats.mod v1.40dev20 - bot stucking in loop]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16286#p16286"><![CDATA[
cause im not really used to C++ i thought one of you guy could help me (and probably a lot of other peoples). the latest version of stats.mod is a bit time ago, it doenst seem there is something in progress, so i decided to get a fix by myself.<br>it seems to stuck in this section: <div class="codebox"><p>Code: </p><pre><code>  while (params[0]) {    par = newsplit(&amp;params);    // check if param is a timerange    if ((tmp = get_timerange(par)) != T_ERROR)      timerange = tmp;    // still no match? Then lets check if the param    // is a range (top10, top20, etc...)    else if ((tmp = atoi(par)))      range = tmp;    // still no match? Uhm... ok, maybe this is a    else if ((tmp = slangtypetoi(par)) != T_ERROR) {      itype = tmp;      if (itype == T_WORD) {        word = newsplit(&amp;params);      }      type = par;    } else      debug1("Unknown parameter: %s", par);  }</code></pre></div>it begins on line 125 in file pubcmd.c<br>the cause why i think it is here, is when i use !top without any options, it will normal output. if i use !top today it still gives output, but when i use !top top10 oder !top modes oder something like this, the bot will stuck in loop and timeout so i have to kill the prozess.<br><br>PS: uncomment the 2 lines <div class="codebox"><p>Code: </p><pre><code>    else if ((tmp = atoi(par)))      range = tmp;</code></pre></div> doesnt help.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Fri Feb 07, 2003 8:42 am</p><hr />
]]></content>
	</entry>
	</feed>
