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

	<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>2011-09-03T10:31:46-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2011-09-03T10:31:46-04:00</updated>

		<published>2011-09-03T10:31:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97621#p97621</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97621#p97621"/>
		<title type="html"><![CDATA[Need help - Script will not work]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97621#p97621"><![CDATA[
I assume you've arranged for your eggdrop to have Irc Op Privileges on the server, and that your eggdrop indeed attains these privileges (using hte OPER command)?<br><br>For starters, do you see any errors on your partyline console or logfiles?<br><br>Next, don't use list commands (such as lindex) on strings. In this case, use the <strong class="text-strong">split</strong> command to break the string into a proper list.<div class="codebox"><p>Code: </p><pre><code>set killnick [lindex [split $arg] 2]</code></pre></div>Also, I probably wouldn't use multiple regular expressions in this case, as you aren't really using any patterns or such. A list of approved nicks and an lsearch would be faster, and alot easier to maintain... (although I have to use <strong class="text-strong">string tolower</strong> to make the matching case-insensitive). This is not related to your problem though.<div class="codebox"><p>Code: </p><pre><code>set approved [list \  "somenick" \  "othersick" \  "theguy" \  "on3nick" \]proc connect:chk {nick host handle channel text} {  set killnick [lindex [split $text] 2]  if {[lsearch -exact $::approved [string tolower $killnick]] &gt;= 0} {    puthelp "PRIVMSG #chan :$killnick has passed the authorized Connection"  } else {    putserv "KILL $killnick :You are not authorized to connect to this server"  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Sep 03, 2011 10:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[hazzlah]]></name></author>
		<updated>2011-09-02T21:20:31-04:00</updated>

		<published>2011-09-02T21:20:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97607#p97607</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97607#p97607"/>
		<title type="html"><![CDATA[Need help - Script will not work]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97607#p97607"><![CDATA[
Hi @all<br><br>have a prob with the Script.<br>First Line works fine $killnick has passed the authorized Connection.<br><br>But when a nick connect with Nick who not stand in the reqexp Line he do nothing.<br><br>I dont find the error hope somebody can help me.<br><br>Thx<br><br><div class="codebox"><p>Code: </p><pre><code>bind pubm -|- "*SIGNON*user:*" connect:chk#killprocproc connect:chk {nick uhost handle chan arg} {set killnick [lindex $arg 2] if { [regexp -nocase {SomeNick} $killnick] || [regexp -nocase {otherNiCk} $killnick] || [regexp -nocase {TheGuy} $killnick] || [regexp -nocase {On3Nick} $killnick] } {  putnow "PRIVMSG #chan : $killnick has passed the authorized Connection" } else {  putserv "KILL $killnick : You are not authorized to connect to this server"   }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11665">hazzlah</a> — Fri Sep 02, 2011 9:20 pm</p><hr />
]]></content>
	</entry>
	</feed>
