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

	<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-29T12:19:27-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2011-09-29T12:19:27-04:00</updated>

		<published>2011-09-29T12:19:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97813#p97813</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97813#p97813"/>
		<title type="html"><![CDATA[Botnet relay script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97813#p97813"><![CDATA[
A few more remarks:<ul><li>putlog only expects one parameter, the text to be logged. You are currently passing two parameters; "YoYo" and the text written in the channel.<br>Enclose both variables within a string if you'd like to prefix the log message with YoYo:<div class="codebox"><p>Code: </p><pre><code>putlog "$leaf $text"</code></pre></div></li><li>All irc command expects the last parameter to be prefixed by a colon : if it's the last command and it may contain spaces. For convenience, you may also use the same prefix with the last parameter even if it does not contain a space<div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG addpre :$text"</code></pre></div></li><li>lrange with ranges 0 - end will return the original list unaltered. Thus, the following piece of code is completely pointless:<div class="codebox"><p>Code: </p><pre><code>join [lrange [split $text] 0 end]</code></pre></div>Eggdrop handles the botnet message as a string, and extracts the first word as the command, leaving the rest as the text. Thus, you don't need to bother with list conversions:<div class="codebox"><p>Code: </p><pre><code>putbot $leaf "output $text"</code></pre></div></li><li>Within your get:msg proc, $text is already a string. Don't use join here.</li></ul>Fixing the above (and arfer's) remarks, the code should look somewhat like this:<div class="codebox"><p>Code: </p><pre><code>bind pubm - "% \$send *" send:msgproc send:msg {nick host handle channel text} {  putlog "YoYo =&gt; $text"  putserv "PRIVMSG addpre :$text"  putbot "output $text"}#####bind bot - "output" get:msgproc get:msg {bot command text} {  putserv "PRIVMSG #channel :$text"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Sep 29, 2011 12:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2011-09-29T04:36:51-04:00</updated>

		<published>2011-09-29T04:36:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97812#p97812</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97812#p97812"/>
		<title type="html"><![CDATA[Botnet relay script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97812#p97812"><![CDATA[
I'm not sure if it's the only problem but the mask in a pubm bind is matched against #channelname followed by channel text. In any event, even if it worked, your proc would only respond to $send and not $send &lt;text here&gt;.<br><div class="codebox"><p>Code: </p><pre><code>bind PUBM - "#% \$send ?*" myprocproc myproc {nick uhost hand chan text} {  # code to execute here}</code></pre></div>The above code would now work in response to $send followed by a space followed by anything at least 1 character in length and in any bot channel. It isn't perfect because presumably that one character could be another space. Adding some form of text checking routine inside the proc could prevent this.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Thu Sep 29, 2011 4:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Fire-Fox]]></name></author>
		<updated>2011-09-23T14:38:06-04:00</updated>

		<published>2011-09-23T14:38:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97769#p97769</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97769#p97769"/>
		<title type="html"><![CDATA[Botnet relay script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97769#p97769"><![CDATA[
Hey!<br><br>I have found and tried to get this to work (IM NOT A TCL GURU!)<br>so it's proberly the wrong way i have done it, but atleast i have tried <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br><strong class="text-strong">Bot 1. where it should grab text from</strong><div class="codebox"><p>Code: </p><pre><code>bind pubm - "\$send" send:msgproc send:msg {nick host hand chan text} {set leaf "YoYo"putlog $leaf $textputserv "privmsg addpre $text"putbot $leaf "output [join [lrange [split $text] 0 end]]"}putlog "output1.tcl - loaded"</code></pre></div><strong class="text-strong">BOT 2. - Where is should output the text</strong><div class="codebox"><p>Code: </p><pre><code>bind bot - "output" get:msgproc get:msg {bot command text} {putserv "privmsg #chan :[join $text]"}putlog "output2.tcl - loaded"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8230">Fire-Fox</a> — Fri Sep 23, 2011 2:38 pm</p><hr />
]]></content>
	</entry>
	</feed>
