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

	<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>2004-06-13T08:37:32-04:00</updated>

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

		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-06-13T08:37:32-04:00</updated>

		<published>2004-06-13T08:37:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37287#p37287</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37287#p37287"/>
		<title type="html"><![CDATA[how to modify this script to apply in all channels]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37287#p37287"><![CDATA[
I am not aware with Undernet services, however I do know<br>about ChanServ on DALnet.<br><br>You just need to identify your nick with NickServ and if your bot<br>has a higher access suppose SOp and the person has<br>AOp then you can remove him from the access list.<br><br>If your bot and the person have the same level of access<br>then he/she will not be removed from the access lists.<br><br>I don't think so you would need to loop the VERIFY command<br>for the services, would cause a flood, plus there is no mention<br>of channels in it.<br><br>If your services require to verify/identify for each channel to<br>gain access, then you might have too.<br><br>***<br>I haven't changed any variables or string split style, just modified<br>for it to work on all the channels to bot is in... to my logic it should<br>work, rest depends upon your networks services and they style they<br>use to remove users.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sun Jun 13, 2004 8:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dollar]]></name></author>
		<updated>2004-06-13T04:39:49-04:00</updated>

		<published>2004-06-13T04:39:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37281#p37281</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37281#p37281"/>
		<title type="html"><![CDATA[how to modify this script to apply in all channels]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37281#p37281"><![CDATA[
Please use the CODE tags when pasting code... this way everything gets unreadable... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4046">dollar</a> — Sun Jun 13, 2004 4:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[laynuks]]></name></author>
		<updated>2004-06-13T02:28:03-04:00</updated>

		<published>2004-06-13T02:28:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37276#p37276</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37276#p37276"/>
		<title type="html"><![CDATA[how to modify this script to apply in all channels]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37276#p37276"><![CDATA[
caesar wrote:<br>bind kick - "*" the<img alt=":x:" class="emoji smilies" draggable="false" src="//cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/274c.svg">kick <br><br>proc the<img alt=":x:" class="emoji smilies" draggable="false" src="//cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/274c.svg">kick {nick uhost hand chan vict reas} { <br>  if {![isbotnick $vict] || $nick != "X"} { <br>    return <br>  } <br>  set kicker [string trim [lindex [split $reas] 0] {()}] <br>  putquick "PRIVMSG X :remuser $chan $kicker" <br>} <br> <br><br>What's the point to add the verify thing when you just want it's access removed? <br><br>&lt;--- hmmmm<br><br>the point of the script is this.  If an abusive op kicks the bot using<br>/kick #channel botnick" <br><br>then in order to remuse we need to get the username of the op bye doing<br>/msg x verify JohnnyOP<br><br>then once the username is known remuse the access<br>/msg x remuser #channel JohnnyOp's_username<br><br>Thank You<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3126">laynuks</a> — Sun Jun 13, 2004 2:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2004-06-13T02:12:42-04:00</updated>

		<published>2004-06-13T02:12:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37274#p37274</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37274#p37274"/>
		<title type="html"><![CDATA[how to modify this script to apply in all channels]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37274#p37274"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>if {[string match -nocase "*$chan*" $mychans]} {<br>  # got a match! let's do something..<br>}</div></blockquote>This will cause problems if for example,<br>$mychans == "#this #is #my #channel #list"<br>and<br>$chan == "#th"</div></blockquote>Oups.. indeed. Duno at was I was thinking..<br><br>And for kicks via X something like this:<div class="codebox"><p>Code: </p><pre><code>bind kick - "*" the:x:kickproc the:x:kick {nick uhost hand chan vict reas} {   if {![isbotnick $vict] || $nick != "X"} {    return  }   set kicker [string trim [lindex [split $reas] 0] {()}]   putquick "PRIVMSG X :remuser $chan $kicker"}</code></pre></div>What's the point to add the verify thing when you just want it's access removed?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sun Jun 13, 2004 2:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[laynuks]]></name></author>
		<updated>2004-06-12T17:00:01-04:00</updated>

		<published>2004-06-12T17:00:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37260#p37260</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37260#p37260"/>
		<title type="html"><![CDATA[how to modify this script to apply in all channels]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37260#p37260"><![CDATA[
<blockquote class="uncited"><div>This should be it if I am correct.<br>I haven't tested it though.<br><br>Give it a try and let me know!<br><div class="codebox"><p>Code: </p><pre><code>bind kick - * kick:remove bind notc - "* logged in as *" check:verify proc kick:remove {nick uhost hand chan target reason} {global botnickif {($target == $botnick)} {putserv "PRIVMSG X :verify $nick" }}proc check:verify {nick host hand arg dest} {global botnickif {[string equal $dest $botnick]} { foreach i [channels] {putserv "PRIVMSG X :remuser $i [lindex [split $arg] end]" }} } #Mind you this might flood your network services, if your bot is#on alot of channels and it tries to delete alot of access entries.putlog "Eggdrop remove access if op kicks the bot using /kick #channel kicker" </code></pre></div>You mentioned for the script to work on all channels the bot is on<br>so it would do this with a loop with for [channels].<br><br>You can also convert this script to work on multiple channels the bot is on which you can define, but it would work on only the channels you specify and not on all the channels the bot is on.</div></blockquote> &lt;-----<br><br>i tried it many times and it seems like it applies to all channels the bot is in, but is seems like the lower command doesnt execute<br>putserv "PRIVMSG X :remuser $i [lindex [split $arg] end]" <br><br><br>only this command was executed<br>putserv "PRIVMSG X :verify $nick" <br><br><br><br>bots console view:<br>[19:26] AdoBOT kicked from #channel by Eric: AdoBOT<br>[19:26] #channel: mode change '+o AdoBOT' by X!<a href="mailto:cservice@undernet.org">cservice@undernet.org</a><br>[19:27] -X (<a href="mailto:cservice@undernet.org">cservice@undernet.org</a>)- Eric <a href="mailto:pirch@username.users.undernet.org">pirch@username.users.undernet.org</a> is logged in as LAYNUKS<br>[19:27] -X (<a href="mailto:cservice@undernet.org">cservice@undernet.org</a>)- USER: LAYNUKS ACCESS: 499 LU<br>[19:27] -X (<a href="mailto:cservice@undernet.org">cservice@undernet.org</a>)- CHANNEL: #channel -- AUTOMODE: None<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3126">laynuks</a> — Sat Jun 12, 2004 5:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-06-12T16:54:09-04:00</updated>

		<published>2004-06-12T16:54:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37259#p37259</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37259#p37259"/>
		<title type="html"><![CDATA[how to modify this script to apply in all channels]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37259#p37259"><![CDATA[
This is the code I use for almost all of the tcls<br>which have multiple channel support.<br><div class="codebox"><p>Code: </p><pre><code>#Set the channels on which you would like this script active onset mychannels "#mychan1 #mychan2 #chan3 #chat4"if {(([lsearch -exact [split [string tolower $mychannels]] [string tolower $chan]] != -1) || ($mychannels == "*"))} {</code></pre></div><br>This should work if you would want to test this script on<br>multiple channels and for making it work on all channels<br>you can use "*".<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sat Jun 12, 2004 4:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-06-12T14:30:45-04:00</updated>

		<published>2004-06-12T14:30:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37258#p37258</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37258#p37258"/>
		<title type="html"><![CDATA[how to modify this script to apply in all channels]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37258#p37258"><![CDATA[
<blockquote class="uncited"><div>if {[string match -nocase "*$chan*" $mychans]} {<br>  # got a match! let's do something..<br>}</div></blockquote>This will cause problems if for example,<br>$mychans == "#this #is #my #channel #list"<br>and<br>$chan == "#th"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sat Jun 12, 2004 2:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2004-06-12T14:04:48-04:00</updated>

		<published>2004-06-12T14:04:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37255#p37255</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37255#p37255"/>
		<title type="html"><![CDATA[how to modify this script to apply in all channels]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37255#p37255"><![CDATA[
In order to *test* if a chan is in the list you have specified use the lsearch function. Example:<blockquote class="uncited"><div>if {[lsearch -exact $mychans $chan] != -1)} {<br>  # got a match! let's do something..<br>}</div></blockquote>Also, you will encount problems when the channel is with upper case or something like this and the there will not be a match. So, either make the test lower case like:<blockquote class="uncited"><div>if {[lsearch -exact [string tolower $mychans] [string tolower $chan]] != -1)} {<br>  # got a match! let's do something..<br>}</div></blockquote>or just use something like<blockquote class="uncited"><div>if {[string match -nocase "*$chan*" $mychans]} {<br>  # got a match! let's do something..<br>}</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sat Jun 12, 2004 2:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-06-12T07:25:59-04:00</updated>

		<published>2004-06-12T07:25:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37241#p37241</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37241#p37241"/>
		<title type="html"><![CDATA[how to modify this script to apply in all channels]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37241#p37241"><![CDATA[
This should be it if I am correct.<br>I haven't tested it though.<br><br>Give it a try and let me know!<br><div class="codebox"><p>Code: </p><pre><code>bind kick - * kick:remove bind notc - "* logged in as *" check:verify proc kick:remove {nick uhost hand chan target reason} {global botnickif {($target == $botnick)} {putserv "PRIVMSG X :verify $nick" }}proc check:verify {nick host hand arg dest} {global botnickif {[string equal $dest $botnick]} { foreach i [channels] {putserv "PRIVMSG X :remuser $i [lindex [split $arg] end]" }} } #Mind you this might flood your network services, if your bot is#on alot of channels and it tries to delete alot of access entries.putlog "Eggdrop remove access if op kicks the bot using /kick #channel kicker" </code></pre></div>You mentioned for the script to work on all channels the bot is on<br>so it would do this with a loop with for [channels].<br><br>You can also convert this script to work on multiple channels the bot is on which you can define, but it would work on only the channels you specify and not on all the channels the bot is on.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sat Jun 12, 2004 7:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[laynuks]]></name></author>
		<updated>2004-06-11T04:02:51-04:00</updated>

		<published>2004-06-11T04:02:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37198#p37198</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37198#p37198"/>
		<title type="html"><![CDATA[how to modify this script to apply in all channels]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37198#p37198"><![CDATA[
set thechannel "#channel" <br>bind kick - * kick:remove <br><br>proc kick:remove { nick uhost hand chan targ rsn } { <br>if {$targ == $::botnick &amp;&amp; [string tolower $chan] == [string tolower $::thechannel]} { <br>putserv "PRIVMSG X :verify $nick" <br>   } <br>} <br><br>bind notc - "* logged in as *" check_verify <br><br>proc check_verify {nick host hand arg dest} { <br>if {[string equal $dest $::botnick]} { <br>putserv "PRIVMSG X :remuser $::thechannel [lindex [split $arg] end]" <br>   } <br>}<br>putlog "Eggdrog  remove access if op kicks the bot using /kick #channel kicker"<br><br><br>######<br><br>Hi all, in line one of the script<br><br>set thechannel "#channel" <br><br>this script will only run in specified channel, how do I modify this script so it will run in all channels the bot is in? <br><br>I tried setting this<br><br>set thechannel "*"  <br><br>but it did not work, <br><br><br>I also tried<br><br>set thechannel "#channel #channel2 #channel3" <br><br>but it only recognizes #channel1<br><br><br>Thank You<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3126">laynuks</a> — Fri Jun 11, 2004 4:02 am</p><hr />
]]></content>
	</entry>
	</feed>
