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

	<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>2009-07-17T19:40:17-04:00</updated>

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

		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-07-17T19:40:17-04:00</updated>

		<published>2009-07-17T19:40:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89586#p89586</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89586#p89586"/>
		<title type="html"><![CDATA[Check if someone is the founder of a channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89586#p89586"><![CDATA[
Sorry, maybe I should have enquired first.<br><br>I was assuming you meant IRC channel and not a partyline chat channel.<br><br>In any event, if my assumption is correct, I would suggest you make the IRC channels static by setting them in the bot's .conf file. That way they cannot be removed by others.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Fri Jul 17, 2009 7:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-07-17T19:25:21-04:00</updated>

		<published>2009-07-17T19:25:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89585#p89585</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89585#p89585"/>
		<title type="html"><![CDATA[Check if someone is the founder of a channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89585#p89585"><![CDATA[
You could send an ACC request to chanserv services and interpret the response using a NOTC bind. However, things like this tend to be network specific. Unfortunately I don't know a better way that is reliable accross many networks.<br><br>This is a script I wrote for DALnet. I would not for a minute suggest it will work unmodified on other networks.<br><br>There is also a FLUD bind in the script to prevent the bot from ignoring messages from the network or network services. This is obviously network specific.<br><div class="codebox"><p>Code: </p><pre><code># eggtcl-snippet-csacc.txt# send a /cs ACC by public command and capture/interpret the response# syntax# !csacc &lt;#channel&gt; &lt;nick&gt;bind FLUD - * prcCsaccFludServicesbind PUB - !csacc prcCsaccPubCommandbind NOTC - * prcCsaccNotcReceiveproc prcCsaccFludServices {nick uhost hand type channel} {  scan $uhost {%[^@]@%s} user host  if {[string match -nocase "*dal.net" $host]} {return 1}}proc prcCsaccPubCommand {nick uhost hand channel txt} {  global varCsaccSourceChan varCsaccSourceNick varCsaccTargetChan varCsaccTargetNick  set arguments [string trim $txt]  if {[llength [split $arguments]] == 2} {    set tchan [lindex [split $arguments] 0]    set tnick [lindex [split $arguments] 1]    if {[regexp {^#} $tchan]} {      if {[regexp -- {^[\x41-\x7D][-\d\x41-\x7D]*$} $tnick]} {        set varCsaccSourceChan $channel        set varCsaccSourceNick $nick        set varCsaccTargetChan $tchan        set varCsaccTargetNick $tnick        putserv "PRIVMSG chanserv@services.dal.net :ACC $varCsaccTargetChan $varCsaccTargetNick"      } else {putserv "PRIVMSG $channel :-error - ($nick) - $tnick is not in the format of a valid nick"}    } else {putserv "PRIVMSG $channel :-error- ($nick) - $tchan is not in the format of a valid channel name"}  } else {putserv "PRIVMSG $channel :-error- ($nick) - correct syntax is !csacc &lt;#channel&gt; &lt;nick&gt;"}  return 0}proc prcCsaccNotcReceive {nick uhost hand txt dest} {  global varCsaccSourceChan varCsaccSourceNick varCsaccTargetChan varCsaccTargetNick  if {[string equal -nocase $nick chanserv]} {    if {[info exists varCsaccSourceChan]} {      set arguments [stripcodes bcruag $txt]      if {([string match -nocase "*$varCsaccTargetChan*" $arguments]) || ([string match -nocase "*$varCsaccTargetNick*" $arguments])} {        if {![string match -nocase "*the user*is not online*" $arguments]} {          if {![string match -nocase "*the channel*is not registered*" $arguments]} {            if {![string match -nocase "*you do not have enough access on*to perform that command*" $arguments]} {              if {([llength [split $arguments]] == 4) || ([llength [split $arguments]] == 5)} {                set target [lindex [split $arguments] 0]                set type [lindex [split $arguments] 1]                set channel [lindex [split $arguments] 2]                set access [lindex [split $arguments] 3]                if {[string equal -nocase $type acc ]} {                  if {([string equal -nocase $target $varCsaccTargetNick]) &amp;&amp; ([string equal -nocase $channel $varCsaccTargetChan])} {                    switch -- $access {                      -2 {set output "channel frozen or closed"}                      -1 {set output "akicked from the channel"}                       0 {set output "basic"}                       1 {set output "aop"}                       2 {set output "sop"}                       3 {set output "founder via a nickserv access list mask"}                       4 {set output "founder via identification to nickserv"}                       5 {set output "founder via identification to chanserv"}                    }                    putserv "PRIVMSG $varCsaccSourceChan :$varCsaccTargetNick has chanserv access level $access in $varCsaccTargetChan ($output)"                    unset varCsaccSourceChan                    unset varCsaccSourceNick                    unset varCsaccTargetChan                    unset varCsaccTargetNick                  }                }              }            } else {putserv "PRIVMSG $varCsaccSourceChan :-error- ($varCsaccSourceNick) - I have insufficient access in $varCsaccTargetChan to carry out that command"}          } else {putserv "PRIVMSG $varCsaccSourceChan :-error- ($varCsaccSourceNick) the channel $varCsaccTargetChan is not registered"}        } else {putserv "PRIVMSG $varCsaccSourceChan :-error- ($varCsaccSourceNick) - the user $varCsaccTargetNick is not online"}      }    }  }  return 0}putlog "&lt;eggTCL&gt; eggtcl-snippet-csacc.txt loaded"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Fri Jul 17, 2009 7:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[jackyyll]]></name></author>
		<updated>2009-07-17T17:04:48-04:00</updated>

		<published>2009-07-17T17:04:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89582#p89582</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89582#p89582"/>
		<title type="html"><![CDATA[Check if someone is the founder of a channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89582#p89582"><![CDATA[
When someone executes a command on my eggdrop bot, say "remove #channel" I need the bot to check if the person executing that command is the owner of #channel... How would i go about doing this? I can't really think of a good way.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10761">jackyyll</a> — Fri Jul 17, 2009 5:04 pm</p><hr />
]]></content>
	</entry>
	</feed>
