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

	<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>2003-10-24T17:32:36-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Clipped]]></name></author>
		<updated>2003-10-24T17:32:36-04:00</updated>

		<published>2003-10-24T17:32:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28898#p28898</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28898#p28898"/>
		<title type="html"><![CDATA[Public Command Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28898#p28898"><![CDATA[
Heh you are correct..Just tested <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>I'm using your code now <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2582">Clipped</a> — Fri Oct 24, 2003 5:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-10-24T17:08:49-04:00</updated>

		<published>2003-10-24T17:08:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28897#p28897</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28897#p28897"/>
		<title type="html"><![CDATA[Public Command Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28897#p28897"><![CDATA[
<blockquote class="uncited"><div>I found this also worked..</div></blockquote>Only because...<br>* the nick did not contain special chars that would make 'lindex' choke on the _string_ recieved from irc<br>* the nick was == the handle of some existing user<br>* the nick was on the channel<br><br>If one of these conditions are not met, your script will either generate a error message or do nothing but log a message about setting mode +q on someone that are not even on the channel <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=2878">user</a> — Fri Oct 24, 2003 5:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Clipped]]></name></author>
		<updated>2003-10-24T16:57:02-04:00</updated>

		<published>2003-10-24T16:57:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28896#p28896</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28896#p28896"/>
		<title type="html"><![CDATA[Public Command Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28896#p28896"><![CDATA[
I found this also worked..<br><div class="codebox"><p>Code: </p><pre><code>proc founder {nick host hand chan text} {  if {$text == ""} {  putquick "MODE $chan +q $nick"putlog "#$hand# has founder themselves in $chan"  } else {  set foundernick [lindex $text 0]if {[matchattr $foundernick n]} {   putquick "MODE $chan +q $foundernick"  putlog "#$hand# has founder $foundernick in $chan"  }  }}</code></pre></div>There is simply no response if the nick does not have n flag...which is ok.<br><br>I got rid of the userdefine flag for the proc..n is easier..<br><br>Thanks guys<br><br>Clipped<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2582">Clipped</a> — Fri Oct 24, 2003 4:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-10-24T16:44:23-04:00</updated>

		<published>2003-10-24T16:44:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28895#p28895</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28895#p28895"/>
		<title type="html"><![CDATA[Public Command Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28895#p28895"><![CDATA[
Like ribot said, use 'matchattr' to determine if the user has the right flags, but flags belong to HANDLES, not nicks. To find the handle from a nick use 'nick2hand', which will return * if no matching user is found (making 'validuser' return 0)...so something like this should do it:<div class="codebox"><p>Code: </p><pre><code>set founder_flags nF|nFbind pub $founder_flags !founder founderproc founder {n u h c a} {if {[string len $a]} {if {[onchan $a $c]&amp;&amp;[validuser [nick2hand $a]]} {if {[matchattr [nick2hand $a] $::founder_flags $c]} {putserv "MODE $c +q $a"putlog "#$hand# foundered $a in $c"} {putserv "PRIVMSG $c :$a doesn't deserve it :)"}} {putserv "PRIVMSG $c :$a who?"}} {putserv "MODE $c +q $n"putlog "#$hand# foundered him/her self in $c"}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Fri Oct 24, 2003 4:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Clipped]]></name></author>
		<updated>2003-10-24T15:59:32-04:00</updated>

		<published>2003-10-24T15:59:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28894#p28894</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28894#p28894"/>
		<title type="html"><![CDATA[Public Command Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28894#p28894"><![CDATA[
! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2582">Clipped</a> — Fri Oct 24, 2003 3:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Clipped]]></name></author>
		<updated>2003-10-24T15:47:13-04:00</updated>

		<published>2003-10-24T15:47:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28893#p28893</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28893#p28893"/>
		<title type="html"><![CDATA[Public Command Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28893#p28893"><![CDATA[
I actually binded it to a User defined flag. The problem is not with users using the founder  command itself.The bot will not respond to users who do not have the flag.The problem im having is that I had a few instances where a peep that has the flag(Is allowed to use the !founder and !admin command) has mistakenly typed !founder nick(Who should not be founder)<br>heh make sense ?<br><br>I was hoping there was a way to make the bot check to see if the user being foundered has the user defined flag before it +q or +a.<br><br>ie<br><br>!founder Billy<br><br>The bot checks to see if Billy has the user defined flag or owner flag.If so it +q them if not it states this user is not a bot owner.<br><br>Im confused now even more..heh<br><br><br>The defounder is for admins etc that /away they can !defounder before they set away.<br><br>Clipped<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2582">Clipped</a> — Fri Oct 24, 2003 3:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ribot]]></name></author>
		<updated>2003-10-24T14:51:04-04:00</updated>

		<published>2003-10-24T14:51:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28891#p28891</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28891#p28891"/>
		<title type="html"><![CDATA[Public Command Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28891#p28891"><![CDATA[
it seems to me that you dont want to founder a nick that isnt +n, so why in that case make a defounder function for that?<br><br>shouldn't something like this be put in the first script:<br>if {[matchattr $foundernick n]} { putquick "MODE $chan +q $nick" }<br><br>or even simpler, why not just make the bind respond to +n users?<br>bind pubm n !founder proc<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3812">ribot</a> — Fri Oct 24, 2003 2:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Clipped]]></name></author>
		<updated>2003-10-24T14:18:09-04:00</updated>

		<published>2003-10-24T14:18:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28888#p28888</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28888#p28888"/>
		<title type="html"><![CDATA[Public Command Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28888#p28888"><![CDATA[
Im having some problems with this script <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> I made some edits and it works but I would like to make it so the bot will not founder or admin anyone but a bot owner. Here is part of code.<br><div class="codebox"><p>Code: </p><pre><code>proc founder {nick host hand chan text} {  if {$text == ""} {  putquick "MODE $chan +q $nick"putlog "#$hand# has founder themselves in $chan"  } else {  set foundernick [lindex $text 0]  putquick "MODE $chan +q $foundernick"  putlog "#$hand# has founder $foundernick in $chan"    }}</code></pre></div>This works..ie<br>!founder <br>or !founder nick<br><br>the problem is with the second command. Any of the current owners can !founder nick and the bot will founder them. I would like it to only be able to founder a nick witht the n flag.<br><br>This part works perfect but im confused on how to to reverse it..heh<br><div class="codebox"><p>Code: </p><pre><code>proc defounder {nick host hand chan text} {  if {$text == ""} {  putquick "MODE $chan -q $nick"putlog "#$hand# has defoundered themselves in $chan"  } else {  set defoundernick [lindex $text 0]  if {[matchattr $defoundernick n]} {  putserv "NOTICE $nick :This user is the bot owner, so you can't defounder them."  } elseif {[isbotnick $defoundernick]} {  putserv "NOTICE $nick :I doubt it...   =D"  } else {    putquick "MODE $chan -q $defoundernick"  putlog "#$hand# has deoped $defoundernick from $chan"  }  }}</code></pre></div><br>As a side note this forum style is extremely well done.Ppslim did a very nice job with it..<br><br>Clipped<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2582">Clipped</a> — Fri Oct 24, 2003 2:18 pm</p><hr />
]]></content>
	</entry>
	</feed>
