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

	<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>2012-08-23T07:35:35-04:00</updated>

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

		<entry>
		<author><name><![CDATA[r00terr0r]]></name></author>
		<updated>2012-08-23T07:35:35-04:00</updated>

		<published>2012-08-23T07:35:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99926#p99926</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99926#p99926"/>
		<title type="html"><![CDATA[Bind RAW Lusers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99926#p99926"><![CDATA[
TNX BROOO!!! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>I need it for stats for my web page.<br>You are clever guy! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br>Tnx again <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>And if i dont wrong, i think i need to global string at rawLusers266 proc? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Here is final code:<div class="codebox"><p>Code: </p><pre><code>bind time - "*" save:lusersbind raw - "250" rawLusers250bind raw - "251" rawLusers251bind raw - "255" rawLusers255bind raw - "265" rawLusers265bind raw - "266" rawLusers266set lusersfile "/var/www/portal/lusers.html"proc rawLusers250 {from cmd text} {regexp {H.*} $text ::lusers250}proc rawLusers251 {from cmd text} {regexp {T.*} $text ::lusers251}proc rawLusers255 {from cmd text} {regexp {I.*} $text ::lusers255}proc rawLusers265 {from cmd text} {regexp {C.*} $text ::lusers265}proc rawLusers266 {from cmd text} {global ::lusers250 ::lusers251 ::lusers255 ::lusers265 lusersfile  set fileId [open $::lusersfile w]  if {[info exists ::lusers250]} {    puts $fileId "$::lusers250 &lt;br&gt;"    unset ::lusers250  }  if {[info exists ::lusers251]} {    puts $fileId "$::lusers251 &lt;br&gt;"    unset ::lusers251  }  if {[info exists ::lusers255]} {    puts $fileId "$::lusers255 &lt;br&gt;"    unset ::lusers255  }  if {[info exists ::lusers265]} {    puts $fileId "$::lusers265 &lt;br&gt;"    unset ::lusers265  }  regexp {C.*} $text ::lusers266  puts $fileId $::lusers266  close $fileId}proc save:lusers {min hour day mon year} {putserv "LUSERS"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12063">r00terr0r</a> — Thu Aug 23, 2012 7:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2012-08-23T07:24:48-04:00</updated>

		<published>2012-08-23T07:24:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99925#p99925</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99925#p99925"/>
		<title type="html"><![CDATA[Bind RAW Lusers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99925#p99925"><![CDATA[
The problem here, is that save:lusers complete before the raw255 (or other) bindings have a chance to trigger (due to the single-threaded nature of eggdrop/tcl).<br><br>What you need to do, is first send the "LUSERS" command, and then wait for the server responses (bind raw). Once the binding triggers, extract the data, and then open and save the file.<br><br><div class="codebox"><p>Code: </p><pre><code>bind time - "*" requestLusersbind raw - "250" rawLusers250bind raw - "251" rawLusers251bind raw - "255" rawLusers255bind raw - "265" rawLusers265bind raw - "266" rawLusers266set lusersfile "/var/www/portal/lusers.html"proc requestLusers {min hour day month year} {  puthelp "LUSERS"}proc rawLusers250 {from cmd text} {  set ::lusers250 $text}proc rawLusers251 {from cmd text} {  set ::lusers251 $text}proc rawLusers255 {from cmd text} {  set ::lusers255 $text}proc rawLusers265 {from cmd text} {  set ::lusers265 $text}proc rawLusers266 {from cmd text} {  set fileId [open $::lusersfile w]  if {[info exists ::lusers250]} {    puts $fileId "$::lusers250 &lt;br&gt;"    unset ::lusers250  }  if {[info exists ::lusers251]} {    puts $fileId "$::lusers251 &lt;br&gt;"    unset ::lusers251  }  if {[info exists ::lusers255]} {    puts $fileId "$::lusers255 &lt;br&gt;"    unset ::lusers255  }  if {[info exists ::lusers265]} {    puts $fileId "$::lusers265 &lt;br&gt;"    unset ::lusers265  }  puts $fileId $text  close $fileId}</code></pre></div>This code will intercept all the listed raw messages, and store their values, up until when 266 is sent. As 266 is received, the previous messages are recalled, and everything is written to file.<br>Thus, this script expects that the server sends the 266 numeric after any of the other ones.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Aug 23, 2012 7:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r00terr0r]]></name></author>
		<updated>2012-08-23T06:01:41-04:00</updated>

		<published>2012-08-23T06:01:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99924#p99924</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99924#p99924"/>
		<title type="html"><![CDATA[Bind RAW Lusers]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99924#p99924"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind time - "*" save:lusersbind raw - "250" lusers0bind raw - "251" lusers1bind raw - "255" lusers5bind raw - "265" lusers65bind raw - "266" lusers66set lusersfile "/var/www/portal/lusers.html"set lusers0 ""; set lusers1 ""; set lusers5 ""; set lusers65 ""; set lusers66 ""; proc lusers0 {from cmd text} {global lusers0set lusers0 "$text"}proc lusers1 {from cmd text} {global lusers1set lusers1 "$text"}proc lusers5 {from cmd text} {global lusers5set lusers65 "$text"}proc lusers65 {from cmd text} {global lusers65set lusers65 "$text"}proc lusers66 {from cmd text} {global lusers66set lusers65 "$text"}proc save:lusers {min hour day mon year} {putserv "LUSERS"global lusersfile lusers0 lusers1 lusers5 lusers65 lusers66  set lusers [open $lusersfile w]  puts $lusers "$lusers0 &lt;br&gt; $lusers1 &lt;br&gt; $lusers5 &lt;br&gt; $lusers65 &lt;br&gt; $lusers66"  close $lusers}</code></pre></div>I made some script to save IRC Lusers, but doesnot work <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> Can anyone help me? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br>If anyone have some idea why dont work <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12063">r00terr0r</a> — Thu Aug 23, 2012 6:01 am</p><hr />
]]></content>
	</entry>
	</feed>
