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

	<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-08-24T20:29:34-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-08-24T20:29:34-04:00</updated>

		<published>2006-08-24T20:29:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65785#p65785</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65785#p65785"/>
		<title type="html"><![CDATA[Help: nick filter]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65785#p65785"><![CDATA[
<blockquote class="uncited"><div>Yeah,... but i really need "nick filter", that bot wount let to add new admin if he has "[ ]" in his nick, because after game, bot writes [admin] to pwf_stats like this - {[admin]}, and when gstat command is used, bot craches while trying to read {[admin]} from pwf_stats.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"></div></blockquote>You were given a "nick filter":<div class="codebox"><p>Code: </p><pre><code>set victime [lindex [split $rest] 0]</code></pre></div>or..<div class="codebox"><p>Code: </p><pre><code>set victime [lindex [split [string trim $rest]] 0]</code></pre></div>Edit your code accordingly and rehash the the bot.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Thu Aug 24, 2006 8:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[[Lt]im]]></name></author>
		<updated>2006-08-24T18:05:10-04:00</updated>

		<published>2006-08-24T18:05:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65782#p65782</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65782#p65782"/>
		<title type="html"><![CDATA[Help: nick filter]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65782#p65782"><![CDATA[
Yeah,... but i really need "nick filter", that bot wount let to add new admin if he has "[ ]" in his nick, because after game, bot writes [admin] to pwf_stats like this - {[admin]}, and when gstat command is used, bot craches while trying to read {[admin]} from pwf_stats.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7473">[Lt]im</a> — Thu Aug 24, 2006 6:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2006-08-24T17:35:43-04:00</updated>

		<published>2006-08-24T17:35:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65777#p65777</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65777#p65777"/>
		<title type="html"><![CDATA[Help: nick filter]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65777#p65777"><![CDATA[
I'd use some regexp check for that..<br><br>One thing I did notice tho, in the beginning of your code, you are using lindex improperly. That is, you're using it on a string. To make matters even worse, it's a string supplied by a person..<br><br>what you'll have to do is something like this:<div class="codebox"><p>Code: </p><pre><code>set victime [lindex [split $rest] 0]</code></pre></div>Instead of this:<div class="codebox"><p>Code: </p><pre><code>set victime [lindex $rest 0]</code></pre></div>Most likely, that'll take care of atleast some issues with usernames containing [] aswell..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Aug 24, 2006 5:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[[Lt]im]]></name></author>
		<updated>2006-08-24T17:08:06-04:00</updated>

		<published>2006-08-24T17:08:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65776#p65776</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65776#p65776"/>
		<title type="html"><![CDATA[Help: nick filter]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65776#p65776"><![CDATA[
Hello, i have this proccess:<div class="codebox"><p>Code: </p><pre><code>proc pwf_addadmin {nick uhost hand channel rest} {  global pwf_pickupchan pwf_qauthnick pwf_qauthnick_timers pwf_qauth     set channel [string tolower $channel]  if { $channel == $pwf_pickupchan } {    set victime [lindex $rest 0]    if { [matchattr $hand H] } {      if [matchattr $hand m|m $channel] {        if [onchan $victime $channel] {          if {($pwf_qauth=="Q")||($pwf_qauth=="T")} {            set pwf_qauthnick_timers($victime) [utimer 20 "set pwf_qauthnick($victime) 0"]            trace variable pwf_qauthnick($victime) w pwf_addadmincheck            putserv "WHOIS $victime"          }          set victhand [nick2hand $victime]          if [string compare $victhand "*"] {            if [matchattr $victhand GL|GL $channel] {              putserv "NOTICE $nick :[pwf_txt right1]"            } else {              chattr $victhand +|GL $channel              putserv "NOTICE $nick :[pwf_txt right2] $victime"              putserv "NOTICE $victime :[pwf_txt right3] $channel [pwf_txt right4a]"              return 1            }          } else {            adduser $victime [maskhost [getchanhost $victime $channel]]            chattr [nick2hand $victime] +|GL $channel            putserv "NOTICE $nick :[pwf_txt right2] $victime"            putserv "NOTICE $victime :[pwf_txt right3] $channel [pwf_txt right4b]"            return 1          }        } else {          putserv "NOTICE $nick :[pwf_txt right5]"        }      } else {        putserv "NOTICE $nick :[pwf_txt right6]"      }    } else {      putserv "NOTICE $nick :[pwf_txt noauth]"    }  }}</code></pre></div>Can anyone help to edit this script, that eggdrop would not let to add new admin if he has "[" "]" in his nick?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7473">[Lt]im</a> — Thu Aug 24, 2006 5:08 pm</p><hr />
]]></content>
	</entry>
	</feed>
