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

	<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:08:44-04:00</updated>

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

		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-06-25T16:50:01-04:00</updated>

		<published>2020-06-25T16:50:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108646#p108646</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108646#p108646"/>
		<title type="html"><![CDATA[[SOLVED] Kick Counter HeLp for Kick Via PVT Msg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108646#p108646"><![CDATA[
your welcome and for pub command i would use :<br><div class="codebox"><p>Code: </p><pre><code>bind pub -|- !kick pub:kickproc pub:kick {nick host hand chan text} {  global botnick     if {![isop $nick $chan] &amp;&amp; ![ishalfop $nick $chan] &amp;&amp; ![matchattr [nick2hand $nick] o|o $chan]} { return 0 }if {![botisop $chan]} { puthelp "NOTICE $nick :I'm not oped on $chan." ; return 0 }   set reason [join [lrange [split $text "!"] 1 end] "!"]set text  [lindex [split $text "!"] 0]if {$reason eq ""} { set reason "Reason: You Are Not welcome. Requested by: $nick -[count:kicks]-"  }foreach user $text {if {![onchan $user $chan]} {putserv "NOTICE $nick $user is not on channel $chan"} elseif {![isop $user $chan] &amp;&amp; ![ishalfop $user $chan] &amp;&amp; ![matchattr [nick2hand $user] fnmo|fnmo $chan]} {  putkick $chan  $user $reason }}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Thu Jun 25, 2020 4:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[illusionist]]></name></author>
		<updated>2020-06-25T16:38:20-04:00</updated>

		<published>2020-06-25T16:38:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108645#p108645</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108645#p108645"/>
		<title type="html"><![CDATA[[SOLVED] Kick Counter HeLp for Kick Via PVT Msg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108645#p108645"><![CDATA[
Thanks <strong class="text-strong">Simo</strong> that was a complete script including pub nd msg commands...<br><br>Thats wahy i posted Both... You Change Lots Of things in It but It works Now Thanks ....<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12853">illusionist</a> — Thu Jun 25, 2020 4:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-06-25T17:08:25-04:00</updated>

		<published>2020-06-25T14:41:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108644#p108644</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108644#p108644"/>
		<title type="html"><![CDATA[[SOLVED] Kick Counter HeLp for Kick Via PVT Msg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108644#p108644"><![CDATA[
this lets chanops chanhalfops and   those with access to bot set the command as well if for some reason thats the next thing u seek it to do<br><div class="codebox"><p>Code: </p><pre><code>bind msg - !kick msg_kick proc  msg_kick {nick uhost hand rest} {   global botnick   set chan [lindex $rest 0] if {![botisop $chan]} { puthelp "NOTICE $nick :I'm not oped on $chan." ; return 0 } if {![isop $nick $chan] &amp;&amp; ![ishalfop $nick $chan] &amp;&amp; ![matchattr [nick2hand $nick] o|o $chan]} {     if {$chan == "#" || $chan == ""} {putquick "NOTICE $nick :Command: /msg $botnick !kick \[channel\] \[nick(s)\] \[!reason\]" ; return 0}   if {[lrange $rest 1 end] == ""} {putquick "NOTICE $nick :Command: /msg $botnick !kick \[channel\] \[nick(s)\] \[!reason\]" ; return 0}     set rest [lrange $rest 1 end]     set reason [join [lrange [split $rest "!"] 1 end] "!"]     set rest  [lindex [split $rest "!"] 0]   if {$reason eq ""} { "Reason: You Are Not welcome. Requested by: $nick -[count:kicks]-" }      foreach user $rest {         if {![onchan $user $chan]} {            putserv "NOTICE $nick $user is not on channel $chan"         } elseif {![isop $user $chan] &amp;&amp; ![ishalfop $user $chan] &amp;&amp; ![matchattr [nick2hand $user] fnmo|fnmo $chan]} {  putkick $chan  $user $reason }      }}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Thu Jun 25, 2020 2:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-06-25T09:04:30-04:00</updated>

		<published>2020-06-25T09:04:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108643#p108643</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108643#p108643"/>
		<title type="html"><![CDATA[[SOLVED] Kick Counter HeLp for Kick Via PVT Msg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108643#p108643"><![CDATA[
what i failed to understand is since u asked for kick via private message to bot why u use pub wich is used on channel the code i previously posted uses just that private message as u requested<br><br>few examples in pm of ur eggbot:<br><br>!kick #somechannel nick1 nick2 nick3 nick4 nick35 nick6 !custom reason here<br><br>!kick #somechannel nick1 nick2 nick3 nick4 nick35 nick6 <br><br>!kick #somechannel nick !custom reason here<br><br>!kick #somechannel nick<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Thu Jun 25, 2020 9:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-06-25T14:43:26-04:00</updated>

		<published>2020-06-24T18:23:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108642#p108642</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108642#p108642"/>
		<title type="html"><![CDATA[[SOLVED] Kick Counter HeLp for Kick Via PVT Msg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108642#p108642"><![CDATA[
i forgot u use !reason i usually use .reason<br><br> <div class="codebox"><p>Code: </p><pre><code>bind msg o !kick msg_kick proc  msg_kick {nick uhost hand rest} {   global botnick   set chan [lindex $rest 0]    if {$chan == "#" || $chan == ""} {putquick "NOTICE $nick :Command: /msg $botnick !kick \[channel\] \[nick(s)\] \[!reason\]" ; return 0}   if {[lrange $rest 1 end] == ""} {putquick "NOTICE $nick :Command: /msg $botnick !kick \[channel\] \[nick(s)\] \[!reason\]" ; return 0}        set rest [lrange $rest 1 end]         set reason [join [lrange [split $rest "!"] 1 end] "!"]   set rest  [lindex [split $rest "!"] 0]   if {$reason eq ""} { set reason Requested }      foreach user $rest {         if {![onchan $user $chan]} {            putserv "NOTICE $nick $user is not on channel $chan"         } elseif {![isop $user $chan] &amp;&amp; ![ishalfop $user $chan] &amp;&amp; ![matchattr [nick2hand $user] fnmo|fnmo $chan]} {  putkick $chan  $user $reason }      }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Jun 24, 2020 6:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-06-24T17:59:10-04:00</updated>

		<published>2020-06-24T17:59:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108640#p108640</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108640#p108640"/>
		<title type="html"><![CDATA[[SOLVED] Kick Counter HeLp for Kick Via PVT Msg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108640#p108640"><![CDATA[
that works in pm i tested it and it works flawlessly for the msg bot part<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Jun 24, 2020 5:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[illusionist]]></name></author>
		<updated>2020-06-24T16:29:04-04:00</updated>

		<published>2020-06-24T16:29:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108639#p108639</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108639#p108639"/>
		<title type="html"><![CDATA[[SOLVED] Kick Counter HeLp for Kick Via PVT Msg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108639#p108639"><![CDATA[
i test this above script ... Bot did nothing... Just show the !reason msg is not on channel... No kick no error in partyline<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12853">illusionist</a> — Wed Jun 24, 2020 4:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-06-24T15:34:16-04:00</updated>

		<published>2020-06-24T15:34:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108638#p108638</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108638#p108638"/>
		<title type="html"><![CDATA[[SOLVED] Kick Counter HeLp for Kick Via PVT Msg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108638#p108638"><![CDATA[
this seems to work for me you can add in the kick counter and such<br><div class="codebox"><p>Code: </p><pre><code>bind msg o !kick msg_kick proc  msg_kick {nick uhost hand rest} {   global botnick   set chan [lindex $rest 0]     if {$chan == "#" || $chan == ""} {putquick "NOTICE $nick :Command: /msg $botnick !kick \[channel\] \[nick(s)\] \[!reason\]" ; return 0}   if {[lrange $rest 1 end] == ""} {putquick "NOTICE $nick :Command: /msg $botnick !kick \[channel\] \[nick(s)\] \[!reason\]" ; return 0}        set rest [lrange $rest 1 end]         set reason [join [lrange [split $rest "."] 1 end] "."]set rest  [lindex [split $rest "."] 0]if {$reason eq ""} { set reason Requested }foreach user $rest {if {![onchan $user $chan]} {putserv "NOTICE $nick $user is not on channel $chan"} elseif {![isvoice $user $chan] &amp;&amp; ![isop $user $chan] &amp;&amp; ![ishalfop $user $chan] &amp;&amp; ![matchattr [nick2hand $user] fnmo|fnmo $chan]} {  putkick $chan  $user $reason }}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Jun 24, 2020 3:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[illusionist]]></name></author>
		<updated>2020-06-24T02:37:14-04:00</updated>

		<published>2020-06-24T02:37:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108635#p108635</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108635#p108635"/>
		<title type="html"><![CDATA[[SOLVED] Kick Counter HeLp for Kick Via PVT Msg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108635#p108635"><![CDATA[
Caeser Sir Any Change in above mentioned code ??<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12853">illusionist</a> — Wed Jun 24, 2020 2:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[illusionist]]></name></author>
		<updated>2020-06-24T02:33:37-04:00</updated>

		<published>2020-06-24T02:33:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108634#p108634</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108634#p108634"/>
		<title type="html"><![CDATA[[SOLVED] Kick Counter HeLp for Kick Via PVT Msg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108634#p108634"><![CDATA[
i test this code ... It works but if type !kick somenick and the unfortunately somenick is not on #channel ... Code CounT it as a kick.. and increase the counter ... And in next kick it jumps like <br><blockquote class="uncited"><div>(@eggdrop) ~kick somenick !this is counter test No 1<br>** Somenick has been kicked by eggdrop (Reason: this is counter test No 1  Requested by: eggdrop -631-)<br>(@eggdrop) ~kick SomeNick2 !This is test counter test No2 with no nick<br>-eggdrop-  SomeNick2 is not on channel: #test.<br>(@eggdrop) ~kick somenick !this is counter test No 3<br>** Somenick has been kicked by eggdrop (Reason: this is counter test No 3  Requested by: eggdrop -633-)</div></blockquote>Thanks ...!!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12853">illusionist</a> — Wed Jun 24, 2020 2:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2020-06-24T01:46:55-04:00</updated>

		<published>2020-06-24T01:46:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108633#p108633</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108633#p108633"/>
		<title type="html"><![CDATA[[SOLVED] Kick Counter HeLp for Kick Via PVT Msg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108633#p108633"><![CDATA[
<blockquote class="uncited"><div>Don't use append (a+)<br>Use w or w+</div></blockquote>I guess you missed the "truncate it if it exists" part.<br><br>Anyway, did some testing and looks like with "r+" works as expected.<div class="codebox"><p>Code: </p><pre><code>% proc count:kicks args {set fh [open "~/test.txt" "r+"]set count [expr [read -nonewline $fh] + 1]seek $fh 0puts $fh $countclose $fhreturn $count}% count:kicks11% count:kicks12% count:kicks13% count:kicks14</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Jun 24, 2020 1:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[illusionist]]></name></author>
		<updated>2021-09-01T23:08:44-04:00</updated>

		<published>2020-06-23T18:05:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108632#p108632</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108632#p108632"/>
		<title type="html"><![CDATA[[SOLVED] Kick Counter HeLp for Kick Via PVT Msg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108632#p108632"><![CDATA[
Thanks for help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12853">illusionist</a> — Tue Jun 23, 2020 6:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-06-23T10:40:30-04:00</updated>

		<published>2020-06-23T10:40:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108631#p108631</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108631#p108631"/>
		<title type="html"><![CDATA[[SOLVED] Kick Counter HeLp for Kick Via PVT Msg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108631#p108631"><![CDATA[
I tested without using a proc and it works.<br>In the proc, it fails <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> (using a+, r+ or w+)<div class="codebox"><p>Code: </p><pre><code>% set fh [open "~/axacount.txt" "a+"]file7% seek $fh 0% set count [expr [read -nonewline $fh] + 1] 1% seek $fh 0% puts $fh $count% seek $fh 0% set count [expr [read -nonewline $fh] + 1]2</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Tue Jun 23, 2020 10:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2020-06-23T10:16:34-04:00</updated>

		<published>2020-06-23T10:16:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108630#p108630</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108630#p108630"/>
		<title type="html"><![CDATA[[SOLVED] Kick Counter HeLp for Kick Via PVT Msg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108630#p108630"><![CDATA[
Don't use append (a+)<br><br>Use w or w+<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Tue Jun 23, 2020 10:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2020-06-23T10:13:08-04:00</updated>

		<published>2020-06-23T10:13:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108629#p108629</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108629#p108629"/>
		<title type="html"><![CDATA[[SOLVED] Kick Counter HeLp for Kick Via PVT Msg]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108629#p108629"><![CDATA[
I tried to compress stuff as well, but for some reason it doesn't seem to be working:<div class="codebox"><p>Code: </p><pre><code>% proc count:kicks args {   set file "/home/cezar/test.txt"   set fh [open $file "a+"]   seek $fh 0   set count [expr [read -nonewline $fh] + 1]   seek $fh 0   puts $fh $count   return $count}% count:kicks1% count:kicks1% count:kicks1% puts $tcl_version8.6</code></pre></div>I'm on Ubuntu and my version is:<div class="codebox"><p>Code: </p><pre><code>cezar@Delta:~$ apt list tclListing... Donetcl/bionic,now 8.6.0+9 amd64 [installed]</code></pre></div>Is the code that you posted working for you?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Jun 23, 2020 10:13 am</p><hr />
]]></content>
	</entry>
	</feed>
