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

	<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>2020-07-16T09:43:40-04:00</updated>

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

		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-07-16T09:43:40-04:00</updated>

		<published>2020-07-16T09:43:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108747#p108747</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108747#p108747"/>
		<title type="html"><![CDATA[ChanServ Akick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108747#p108747"><![CDATA[
nice tnx caesar<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Thu Jul 16, 2020 9:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2020-07-16T08:44:34-04:00</updated>

		<published>2020-07-16T08:44:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108744#p108744</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108744#p108744"/>
		<title type="html"><![CDATA[ChanServ Akick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108744#p108744"><![CDATA[
I saw this in another topic and wanted to ask you about it in there but forgot. Anyway, why do you use <em class="text-italics">nick2hand</em> if you already have the handle (the name of the user's account on the bot) set in <em class="text-italics">hand</em> variable when the pub-add-akick process is triggered?<br><br>Right now that first <em class="text-italics">if</em> line will 'return 0' if the user isn't local "operator" or global "operator" AND isn't channel operator (having a @, not necessarily access on the bot) AND isn't a halfop. You sure this is the wanted behavior?<br><br>Anyway, I don't see the point of the <em class="text-italics">matchattr</em> part entirely when you can just change at the flags on the bind directly, I mean changing from:<div class="codebox"><p>Code: </p><pre><code>bind pub -!- .akick pub-add-akick </code></pre></div>to:<div class="codebox"><p>Code: </p><pre><code>bind pub o|o .akick pub-add-akick </code></pre></div>that will basically have the same effect.<br><br>I'll show you a nifty trick with <em class="text-italics">lassign</em>, turning this:<div class="codebox"><p>Code: </p><pre><code>  set who [lindex [split $text] 0]  set reason [join [lrange [split $text] 1 end]] </code></pre></div>into this:<div class="codebox"><p>Code: </p><pre><code>set reason [lassign $text who]</code></pre></div>results:<div class="codebox"><p>Code: </p><pre><code>% set text "user some long reason in here"% set reason [lassign $text who]some long reason in here% puts $whouser% puts $reasonsome long reason in here</code></pre></div>It would be a good idea if you would move the:<div class="codebox"><p>Code: </p><pre><code>if {[llength $items] &lt; 1} {</code></pre></div>higher, preferable after the 1st line and make it into:<div class="codebox"><p>Code: </p><pre><code>if {![llength $text]} {</code></pre></div>that translates if the <em class="text-italics">text</em> variable content's length is 0 (or empty) then do whatever you want.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Jul 16, 2020 8:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-07-16T07:03:47-04:00</updated>

		<published>2020-07-16T07:03:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108743#p108743</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108743#p108743"/>
		<title type="html"><![CDATA[ChanServ Akick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108743#p108743"><![CDATA[
u could try this:<br><div class="codebox"><p>Code: </p><pre><code>bind pub -!- .akick pub-add-akickproc pub-add-akick {nick host hand chan text} {       if {![matchattr [nick2hand $nick] o|o $chan] &amp;&amp; ![isop $nick $chan] &amp;&amp; ![ishalfop $nick $chan]} { return 0  }   global anick    set anick $nick  set who [lindex [split $text] 0]  set reason [join [lrange [split $text] 1 end]]   if {$reason == ""} {set reason "\0032In \00312compliance \0032with the aDministration of \00312$chan\017 \002\037\0037(\017\00312\u00bb\0031\002j\002a\0034\002D\002u\0031\u00ae\00312\u00ab\0037\002\037)\017"   set items [split $text]  if {[llength $items] &lt; 1} {    putserv "NOTICE $nick :Syntax\: .akick \[mask\] \[reason\]"    return  }    putserv "chanserv akick $chan add $who $reason"   putserv "NOTICE $nick :$who added to $chan Akick list." }}bind notc - "*already exists on the AKICK list of*" duplicate-akickproc duplicate-akick {nick uhost hand text dest} {global anickif {[string match -nocase $nick chanserv]} { putserv "notice $anick :\002$text\002"} }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Thu Jul 16, 2020 7:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-07-16T00:51:42-04:00</updated>

		<published>2020-07-16T00:51:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108740#p108740</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108740#p108740"/>
		<title type="html"><![CDATA[ChanServ Akick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108740#p108740"><![CDATA[
Quite hard to do: services use msg or notice (depend on your choice and the default choice of admin) and can use the language you want.<br>So you'll have to bind pubs and notices, and have the correct sentences interesting you.<br><br>Simpliest to do a /msg chanserv akick...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Thu Jul 16, 2020 12:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[illusionist]]></name></author>
		<updated>2020-07-15T22:32:07-04:00</updated>

		<published>2020-07-15T22:32:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108738#p108738</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108738#p108738"/>
		<title type="html"><![CDATA[ChanServ Akick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108738#p108738"><![CDATA[
Hello Everyone This is a small ChanServ TCL and it is working very well. It does not have a check system to show the error message that Nick is already added in akick list of channel or nick is not found in akick list of channel when adding or removing akick.<br><br>If aome one can add a check system .. really appreciated<br>Thanks in advance<div class="codebox"><p>Code: </p><pre><code>set chanserv "chanserv@services.dal.net"setudef flag chanserv###Chanserv Add Akickproc accessakick {nick host handle channel testes} {    global nxg chanservif {[channel get $channel chanserv]} {     set who [lindex $testes 0]    set reason [lrange $testes 1 end]    if {$reason == ""} {set reason "\0032In \00312compliance \0032with the aDministration of \00312$channel\017 \002\037\0037(\017\00312\u00bb\0031\002j\002a\0034\002D\002u\0031\u00ae\00312\u00ab\0037\002\037)\017"    }putserv "PRIVMSG $chanserv :akick $channel add $who $reason"putserv "NOTICE $nick :$who added to $channel Akick list."    putlog "$nick added $who to the Akick list in $channel" }}###End Of Chanserv Add Akick###Chanserv Remove Akickproc accessremoveakick {nick host handle channel testes} {    global nxg chanservif {[channel get $channel chanserv]} { set who [lindex $testes 0]putserv "PRIVMSG $chanserv :akick $channel del $who"putserv "NOTICE $nick :$who deleted from $channel Akick list."    putlog "$nick removed $who from the Akick list in $channel" }}###End Of Chanserv Remove Akick</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12853">illusionist</a> — Wed Jul 15, 2020 10:32 pm</p><hr />
]]></content>
	</entry>
	</feed>
