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

	<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>2008-08-22T19:47:23-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-08-22T19:47:23-04:00</updated>

		<published>2008-08-22T19:47:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84783#p84783</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84783#p84783"/>
		<title type="html"><![CDATA[generate a list of users with certain flag.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84783#p84783"><![CDATA[
This is "Scripting Help", not "Script Request"...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri Aug 22, 2008 7:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nor7on]]></name></author>
		<updated>2008-08-22T19:04:48-04:00</updated>

		<published>2008-08-22T19:04:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84781#p84781</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84781#p84781"/>
		<title type="html"><![CDATA[generate a list of users with certain flag.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84781#p84781"><![CDATA[
thanks nml375.<br><br>but can make the code pls.?<br><br><br>thanks again.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8762">Nor7on</a> — Fri Aug 22, 2008 7:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-08-22T12:53:34-04:00</updated>

		<published>2008-08-22T12:53:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84769#p84769</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84769#p84769"/>
		<title type="html"><![CDATA[generate a list of users with certain flag.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84769#p84769"><![CDATA[
Nor7ton:<br>First off, you'd have to store a timestamp with the user record whenever T is set... I'd suggest using some XTRA-field for this ("<strong class="text-strong">setuser</strong> <em class="text-italics">handle</em> XTRA Ttime [clock seconds]" should do the trick). This would make it trivial retrieving the timestamp later on.<br><br>For your user listing, create a list of handles using the <strong class="text-strong">userlist</strong> command (<strong class="text-strong">userlist</strong> &amp;+T <em class="text-italics">channel</em>) and iterate through this using foreach. To generate the time, retrieve the stored timestamp (<strong class="text-strong">getuser</strong> <em class="text-italics">handle</em> XTRA Ttime), gather the time delta from now, and use the <strong class="text-strong">duration</strong> command to convert it to human readable form.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri Aug 22, 2008 12:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[eXtremer]]></name></author>
		<updated>2008-08-22T03:00:39-04:00</updated>

		<published>2008-08-22T03:00:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84757#p84757</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84757#p84757"/>
		<title type="html"><![CDATA[Re: generate a list of users with certain flag.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84757#p84757"><![CDATA[
<blockquote class="uncited"><div>hi a lot.<br><br>have a script that put chattr +T $chan.<br><br>so, can helpme with a code for generate a list only with flags +T in my channel. (can be added an accountant of minutes?)<br><br>maybe add other proc more with this functions.<br><br>ex:<br>if have 3 users with flag with +T. (user1, testuser, usertest)<br>!list<br>eggdrop say via notice: there are in the chan 3 users with +T, are: User1 (20min) - testuser (2hours 7min) - usertest (45seg).<br><br>the times are for knowing how long has user with flag +T in the channel.<br><br>here paste my code.<br><div class="codebox"><p>Code: </p><pre><code>proc pub:flags {nick uhost hand chan text} { global simtemop   if {![channel get $chan simtemop]} { return }set cnick [lindex [split $text] 0]set bnick [nick2hand $cnick]          if {([string length $text]) &gt; 0} {if {([matchattr $bnick "*" $chan])} { if {([onchan $cnick $chan])} {  chattr $cnick |+T $chanputhelp "privmsg $chan :Enhorabuena $cnick!! ahora eres Op-Temporal."if {([botisop $chan])} {putserv "MODE $chan +v $cnick"puthelp "notice $cnick :Ahora eres Op-Temporal, porfavor para que veas tus comandos, escribe: !comandos."} else {  putserv "privmsg X :voice $chan $cnick" }} else {  puthelp "NOTICE $nick :$cnick no se encuentra dentro de $chan." }} else {  puthelp "NOTICE $nick :$cnick Ya está como Op-Temporal, quizás no tenga voice, es necesário que lo tenga." }} else {  puthelp "NOTICE $nick :Usa !+optemp &lt;nick&gt;" }}</code></pre></div>thanks in advance.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"></div></blockquote>Usage : .userlist flags &lt;#chan&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9905">eXtremer</a> — Fri Aug 22, 2008 3:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nor7on]]></name></author>
		<updated>2008-08-21T18:59:55-04:00</updated>

		<published>2008-08-21T18:59:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84748#p84748</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84748#p84748"/>
		<title type="html"><![CDATA[generate a list of users with certain flag.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84748#p84748"><![CDATA[
hi a lot.<br><br>have a script that put chattr +T $chan.<br><br>so, can helpme with a code for generate a list only with flags +T in my channel. (can be added an accountant of minutes?)<br><br>maybe add other proc more with this functions.<br><br>ex:<br>if have 3 users with flag with +T. (user1, testuser, usertest)<br>!list<br>eggdrop say via notice: there are in the chan 3 users with +T, are: User1 (20min) - testuser (2hours 7min) - usertest (45seg).<br><br>the times are for knowing how long has user with flag +T in the channel.<br><br>here paste my code.<br><div class="codebox"><p>Code: </p><pre><code>proc pub:flags {nick uhost hand chan text} { global simtemop   if {![channel get $chan simtemop]} { return }set cnick [lindex [split $text] 0]set bnick [nick2hand $cnick]          if {([string length $text]) &gt; 0} {if {([matchattr $bnick "*" $chan])} { if {([onchan $cnick $chan])} {  chattr $cnick |+T $chanputhelp "privmsg $chan :Enhorabuena $cnick!! ahora eres Op-Temporal."if {([botisop $chan])} {putserv "MODE $chan +v $cnick"puthelp "notice $cnick :Ahora eres Op-Temporal, porfavor para que veas tus comandos, escribe: !comandos."} else {  putserv "privmsg X :voice $chan $cnick" }} else {  puthelp "NOTICE $nick :$cnick no se encuentra dentro de $chan." }} else {  puthelp "NOTICE $nick :$cnick Ya está como Op-Temporal, quizás no tenga voice, es necesário que lo tenga." }} else {  puthelp "NOTICE $nick :Usa !+optemp &lt;nick&gt;" }}</code></pre></div>thanks in advance.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8762">Nor7on</a> — Thu Aug 21, 2008 6:59 pm</p><hr />
]]></content>
	</entry>
	</feed>
