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

	<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>2007-05-27T05:23:44-04:00</updated>

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

		<entry>
		<author><name><![CDATA[JC^]]></name></author>
		<updated>2007-05-27T05:23:44-04:00</updated>

		<published>2007-05-27T05:23:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73052#p73052</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73052#p73052"/>
		<title type="html"><![CDATA[Thanks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73052#p73052"><![CDATA[
THANKS!!!<br><br>You both are GENIUSES! Tosser^^'s code worked best for me.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9022">JC^</a> — Sun May 27, 2007 5:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2007-05-26T17:28:07-04:00</updated>

		<published>2007-05-26T17:28:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73025#p73025</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73025#p73025"/>
		<title type="html"><![CDATA[Creating an access list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73025#p73025"><![CDATA[
I would believe this would work better than Sir_Fz's code if you want it to display as a list instead of side by side.<br><br>Example:<br><div class="codebox"><p>Code: </p><pre><code>Owners:user1user2user3</code></pre></div>Instead of:<br><div class="codebox"><p>Code: </p><pre><code>Owners:user1, user2, user3</code></pre></div><div class="codebox"><p>Code: </p><pre><code>proc proc_getlist {nick host hand chan arg} {  putserv "NOTICE $nick :Users in $chan access list:"  set owner ""  set sop ""  set aop ""  set total 0  foreach user [userlist $chan |nmo] {    if {[matchattr $user |n $chan]} {      lappend owner $user      incr total    } elseif {[matchattr $user |m $chan]} {      lappend sop $user      incr total    } elseif {[matchattr $user |o $chan]} {      lappend aop $user      incr total    }  }  putserv "NOTICE $nick :Owner(s):"  foreach user $owner {    putserv "NOTICE $nick :$user"  }  putserv "NOTICE $nick :[format %-15s ""]"  putserv "NOTICE $nick :SOP:"  foreach user $sop {    putserv "NOTICE $nick :$user"  }  putserv "NOTICE $nick :[format %-15s ""]"  putserv "NOTICE $nick :AOP:  foreach user $aop {    putserv "NOTICE $nick :$user"  }  putserv "NOTICE $nick :Total: $total, Owner: [llength $owner], SOP: [llength $sop], AOP: [llength $aop]."}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Sat May 26, 2007 5:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-05-26T09:12:15-04:00</updated>

		<published>2007-05-26T09:12:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73019#p73019</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73019#p73019"/>
		<title type="html"><![CDATA[Creating an access list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73019#p73019"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc proc_getlist {nick uhost hand chan arg} { putserv "NOTICE $nick :Users in $chan access list:" array set total {  owner 0  sop 0  aop 0  Total 0 } foreach user [userlist] {  incr total(Total)  if {[matchattr $user |n $chan]} {   lappend users(Owner) $user   incr total(owner)  } elseif {[matchattr $user |m $chan]} {   lappend users(SOp) $user   incr total(sop)  } elseif {[matchattr $user |o $chan]} {   lappend users(AOp) $user   incr total(aop)  } } foreach {t u} [array get users] {  putserv "NOTICE $nick :${t}(s): [join $u {, }]" } putserv "NOTICE $nick :Total: $total(Total) Owner: $total(owner), SOP: $total(sop), AOP: $total(aop)."}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat May 26, 2007 9:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JC^]]></name></author>
		<updated>2007-05-26T06:48:47-04:00</updated>

		<published>2007-05-26T06:48:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73015#p73015</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73015#p73015"/>
		<title type="html"><![CDATA[Creating an access list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73015#p73015"><![CDATA[
Thanks Tosser^^... After looking over some other posts in the forum as well as this one, I've made a list that works, but I'd like the output to be a bit different.<br><br>Here is the code:<div class="codebox"><p>Code: </p><pre><code>proc proc_getlist {nick uhost hand chan arg} {  putserv "NOTICE $nick :Users in $chan access list:"   set total(owner) 0   set total(sop) 0   set total(aop) 0   set total(Total) 0 foreach user [userlist] {  incr total(Total)  if {[matchattr $user |n $chan]} {   lappend users "$user (Owner),"   incr total(owner)  } elseif {[matchattr $user |m $chan]} {   lappend users "$user (SOP),"   incr total(sop)  } elseif {[matchattr $user |o $chan]} {   lappend users "$user (AOP),"   incr total(aop)  } } if {[llength $users]} {   putserv "NOTICE $nick :[string trimright [join $users] ,]"   } putserv "NOTICE $nick :Total: $total(Total) Owner: $total(owner), SOP: $total(sop), AOP: $total(aop)."}</code></pre></div>Currently the output is:<blockquote class="uncited"><div>- Users in #Main access list:<br>- Dorian (Owner), JC^ (AOP)<br>- Total: 2 Owner: 1, SOP: 0, AOP: 1.</div></blockquote>And I'd like to change the output to something a bit more vertical:<br>  Owners:<br>  Dorian<br><br>  SOP:<br>  None<br><br>  AOP:<br>  JC^<br>  Total: 2 Owner: 1, SOP: 0, AOP: 1.<br><br>Can someone assist?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9022">JC^</a> — Sat May 26, 2007 6:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2007-05-25T14:09:02-04:00</updated>

		<published>2007-05-25T14:09:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72992#p72992</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72992#p72992"/>
		<title type="html"><![CDATA[Creating an access list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72992#p72992"><![CDATA[
you can use a foreach loop on the userlist, and use matchattr to determine the modes the user has.<br><div class="codebox"><p>Code: </p><pre><code>foreach user [userlist #channel |(n for owner, m for sop, o for aop, nmo for all)] {#for aopif {[matchattr $user |o #channel] &amp;&amp; ![matchattr $user |n #channel] &amp;&amp; [matchattr $user |m #channel]} {# user has aop access}#for sopif {[matchattr $user |m #channel] &amp;&amp; ![matchattr $user |n #channel]} {# user has sop access}#for ownerif {[matchattr $user |n #channel]} {# user has owner access}}</code></pre></div>Thats just a basebone, you can build on this...<br><br>Hope this helps <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=6300">r0t3n</a> — Fri May 25, 2007 2:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JC^]]></name></author>
		<updated>2007-05-25T13:56:29-04:00</updated>

		<published>2007-05-25T13:56:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72989#p72989</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72989#p72989"/>
		<title type="html"><![CDATA[Creating an access list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72989#p72989"><![CDATA[
I've searched everywhere for the know-how and help, but can't find it, so I am posting here in the hopes that someone can help me.<br><br>I am attempting to write my own script, basically taking over channel access from chanserv, allowing eggy to give AOP, SOP and Owner.<br><br>I've done everything (including auto-op on join) by myself, but now what I want is the ability to list users (or actually user records) that have specific eggy modes (like m n and o).<br><br>I know it involves the match command because I can get what I want in the party line, and if I have to, I can just stick with that, but I would like to have a public command for it.<br><br>Here is an example of the command:<br>   !list aop - displays a list of all user records with the o mode<br>   !list sop - displays a list of all user records with the m mode<br>   !list owner - displays a list of all user records with the n mode<br><br>The output doesn't have to be fancy, just nick and host.<br><br>Can someone assist me?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9022">JC^</a> — Fri May 25, 2007 1:56 pm</p><hr />
]]></content>
	</entry>
	</feed>
