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

	<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>2010-09-29T14:47:32-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-09-29T14:47:32-04:00</updated>

		<published>2010-09-29T14:47:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94575#p94575</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94575#p94575"/>
		<title type="html"><![CDATA[TCM.tcl..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94575#p94575"><![CDATA[
Step 1: Learn to handle strings and lists properly.<br>$arg is a string in this context, don't use lindex on strings!<br>Use the split command to split a string into a list..<div class="codebox"><p>Code: </p><pre><code>proc someproc1 {from key text} {  set arg [split $text " "]  if {[string equal [lindex $arg 4] "Flooder"]} {    #...    set temp [split [lindex $arg 5 {[]}]]    set thenick [lindex $temp 0]    set thehost [lindex $temp 1]  }}</code></pre></div>Alternate Step 2: Use regexp to extract the value using regular expressions:<br>This should fetch all the values from the string in a single pass (without the need to convert the string to a list...)<div class="codebox"><p>Code: </p><pre><code>proc someproc2 {from key text} {  #...  if {[regexp -- {^\*\*\* Notice -- Possible Flooder ([^[ ]+)\[([^] ]+)\] on ([^ ]+) target: ([^ ]+)$} $text match fnick fhost onserver target]} {    #...  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Sep 29, 2010 2:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2010-09-29T13:18:45-04:00</updated>

		<published>2010-09-29T13:18:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94574#p94574</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94574#p94574"/>
		<title type="html"><![CDATA[TCM.tcl..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94574#p94574"><![CDATA[
<blockquote class="uncited"><div>can we help me.. ? :/</div></blockquote>I'd like to try, but I'm afraid I don't fully understand the question.<br><br>Can you re-state it?    Perhaps provide another example of what you want?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Wed Sep 29, 2010 1:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[erotism]]></name></author>
		<updated>2010-09-29T12:36:02-04:00</updated>

		<published>2010-09-29T12:36:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94573#p94573</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94573#p94573"/>
		<title type="html"><![CDATA[TCM.tcl..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94573#p94573"><![CDATA[
can we help me.. ? :/<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11311">erotism</a> — Wed Sep 29, 2010 12:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[erotism]]></name></author>
		<updated>2010-09-28T21:34:28-04:00</updated>

		<published>2010-09-28T21:34:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94561#p94561</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94561#p94561"/>
		<title type="html"><![CDATA[TCM.tcl..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94561#p94561"><![CDATA[
Hi, I play with a script and something I can not understand how to take the receiver only the variable ..<br><div class="codebox"><p>Code: </p><pre><code>#Flood relayproc *raw:flooder {from key arg} {  global botnick servername fnick ochan fhost onserver target whatdoing  if {[lindex $arg 5] == "Flooder"} {  set fnick [lindex $arg 6]  set fhost [lindex $arg 6]  set onserver [lindex $arg 8]  set target [lindex $arg 10]  set whatdoing [lrange $arg 4 end]putquick "PRIVMSG $ochan :$whatdoing"putquick "PRIVMSG $fnick :$fnick, detect flood from your host ($fhost) Please stop flooding $target. Thank You!"    return 0  }}</code></pre></div><blockquote class="uncited"><div>Server notice is:<br>irc.server.com *** Notice -- Possible Flooder nick[id@0.0.0.0] on irc.server.com target: nick1</div></blockquote>Can you tell me how to give nick ident@host from them last in the different values to allow the bot to send PRIMSG of that nickname and tell him that it has detected a violation by ident@host<br><br>I am writing here because I have no idea how to do this separation, since nick and hostname are held in arg 6<br><blockquote class="uncited"><div>To summarize:<br>1 = ***<br>2 = Notice<br>3 = -<br>4 = Possible<br>5 = Flooder<br>6 = nick [id@0.0.0.0]<br>........<br>10 = nick1</div></blockquote>in tcl I need these values: $target $nickflooder $nickflooderID@HOST...<br><br>Thanks in advance and apologize for bad English<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11311">erotism</a> — Tue Sep 28, 2010 9:34 pm</p><hr />
]]></content>
	</entry>
	</feed>
