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

	<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>2021-09-01T23:50:29-04:00</updated>

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

		<entry>
		<author><name><![CDATA[illusionist]]></name></author>
		<updated>2021-09-01T23:50:29-04:00</updated>

		<published>2021-09-01T23:50:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110284#p110284</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110284#p110284"/>
		<title type="html"><![CDATA[Kick Reason Problem (Bot Consider Reason as a Nick)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110284#p110284"><![CDATA[
<strong class="text-strong">Test 1</strong><br><br>Owner: !kick nick1 nick2 nick3 <strong class="text-strong">!Some Lengthy Reason Here</strong><br><br>-eggdrop- (notice) Lengthy Reason Here is not on channel: #test<br><br>** Nick1 has been kicked by eggdrop (Some Lengthy Reason Here)<br>** Nick2 has been kicked by eggdrop (Some Lengthy Reason Here)<br>** Nick3 has been kicked by eggdrop (Some Lengthy Reason Here)<br><br><strong class="text-strong">Test 2<br>With Placing ! Sign with some word of reason and some leave as it is without ! Sign</strong><br><br>Owner: !kick nick1 nick2 nick3 !Some Lengthy !Reason Here<br><br>-eggdrop- (notice) Lengthy Here is not on channel: #test<br><br>** Nick1 has been kicked by eggdrop (Some !Reason)<br>** Nick2 has been kicked by eggdrop (Some !Reason)<br>** Nick3 has been kicked by eggdrop (Some !Reason)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12853">illusionist</a> — Wed Sep 01, 2021 11:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[illusionist]]></name></author>
		<updated>2021-09-01T23:28:40-04:00</updated>

		<published>2021-09-01T23:28:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110283#p110283</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110283#p110283"/>
		<title type="html"><![CDATA[Kick Reason Problem (Bot Consider Reason as a Nick)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110283#p110283"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set jaDu "!"set jaDuSign "jaDuX"bind pub o|o ${jaDu}kick pub_kickbind msg o|o kick msg_kickbind pub o|o ${jaDu}k pub_kickbind msg o|o k msg_kick#Endif {[info exist ban-time]} {# Checking whenever the "ban-time" variable is exist on your bot conf file. (Default)set gbantime ${ban-time}} else {set gbantime 15}#Kick Process#proc msg_kick {nick uhost hand rest} {global botnick jaDuSignif {![matchattr $hand p]} {putquick "NOTICE $nick :$jaDuSign You have +o privelage but you don't have +p, you need +p flag to set your password and authenticate before phrasing commands. Ask my owner/master to set that flag for you =)" ; return 0}set chan [lindex $rest 0] ; set knick [lrange $rest 1 end]if {$chan == "#" || $chan == ""} {putquick "NOTICE $nick :$jaDuSign Command: /msg $botnick kick &lt;#channel&gt; &lt;nickname(s)&gt; \[!reason\]" ; return 0}if {![string match "#*" $chan]} {set chan "#$chan"}if {$knick == ""} {putquick "NOTICE $nick :$jaDuSign Command: /msg $botnick kick $chan &lt;nickname(s)&gt; \[!reason\]" ; return 0}if {![validchan $chan]} {putquick "NOTICE $nick :$jaDuSign I am not on channel: $chan, check out my channel list." ; return 0}if {![botisop $chan]} {putquick "NOTICE $nick :$jaDuSign I appologize, but I am not an Operator on channel: $chan. Your command cannot be perform." ; return 0}set knicks "" ; set ownicks "" ; set nonenicks "" ; set reason ""foreach x $knick {if {(![onchansplit $x $chan]) &amp;&amp; (![isbotnick $x])} {if {[string match "!*" $x]} { set cut [string range $rest [expr [string first ! $rest] +1] end] ; set reason "$cut $jaDuSign "} else {if {[matchattr [nick2hand $x $chan] m]} {append ownicks " $x"} else {if {![onchan $x $chan]} {append nonenicks " $x"} else {append knicks "$x,"}}}}}if {$nonenicks != ""} {putquick "NOTICE $nick :$jaDuSign $nonenicks is not on channel: $chan."}if {$ownicks != ""} {putquick "NOTICE $nick :$jaDuSign $ownicks are my \[Master(s)\], and will I will not Kick them from channel: $chan."}if {$knicks != ""} {if {$reason == ""} {set reason "You Are Not Welcome $jaDuSign"} ; putkick $chan $knicks $reasonputcmdlog "$jaDuSign &lt;&lt;$nick&gt;&gt; !$hand! Kick: ${knicks} from channel: $chan. Reason: $reason."} ; return 0}proc pub_kick {nick uhost hand chan rest} {global jaDu botnick jaDuSignset chans "" ; set channel [lindex $rest 0]if {![string match "#*" $channel]} {set channel $chan ; append chans "$channel $rest "} else {append chans " $rest"}set knicks [lindex $chans 1]if {$knicks == ""} {putquick "NOTICE $nick :$jaDuSign Command: ${jaDu}kick $chan &lt;nickname(s)&gt; \[!reason\]" ; return 0}msg_kick $nick $uhost $hand $chans}############EnD KicK##############</code></pre></div><blockquote class="uncited"><div> I'm stiLL stuck in this Script ... <br>Default trigger for kick is ... !kick Nick !Reason<br> nd <br>!Kick Nick1 Nick2 Nick3 !Reason<br><br>I need help with this code. It works well with the default kick reason, but when given a reason, the word with ! sign is chosen as reason and rest words are considers as nick instead of picking the whole sentence as reason after ! sign.</div></blockquote><div class="codebox"><p>Code: </p><pre><code>if {[string match "!*" $x]} { set cut [string range $rest [expr [string first ! $rest] +1] end] ; set reason "$cut $jaDuSign "} else {if {[matchattr [nick2hand $x $chan] m]} {append ownicks " $x"} else {if {![onchan $x $chan]} {append nonenicks " $x"} else {append knicks "$x,"}}}</code></pre></div><blockquote class="uncited"><div> problem is in these above lines</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12853">illusionist</a> — Wed Sep 01, 2021 11:28 pm</p><hr />
]]></content>
	</entry>
	</feed>
