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

	<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>2010-01-21T13:56:36-04:00</updated>

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

		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2010-01-21T13:56:36-04:00</updated>

		<published>2010-01-21T13:56:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91773#p91773</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91773#p91773"/>
		<title type="html"><![CDATA[Simple Channel Manager]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91773#p91773"><![CDATA[
Yeah, very agreeable  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> would shorted the code alot too in this case.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8130">TCL_no_TK</a> — Thu Jan 21, 2010 1:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2010-01-21T09:20:09-04:00</updated>

		<published>2010-01-21T09:20:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91771#p91771</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91771#p91771"/>
		<title type="html"><![CDATA[Simple Channel Manager]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91771#p91771"><![CDATA[
Yeah...I meant str <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> It's been a while since I did any eggdrop related coding. I don't see how learning to use custom channel settings would be a bad idea, though. It's not much harder to grasp than the logic you use to do the channel name checking IMO. (You could move the 'set' part out of the 'if' to make it more readable)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Jan 21, 2010 9:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2010-01-21T06:11:11-04:00</updated>

		<published>2010-01-21T06:11:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91769#p91769</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91769#p91769"/>
		<title type="html"><![CDATA[Simple Channel Manager]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91769#p91769"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>setudef str ...</code></pre></div> Probably what i would use if i was using the script, but this way it keeps it simple and give's the user a good base/idea of how to change and modify the script later on to do what he needs it to <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8130">TCL_no_TK</a> — Thu Jan 21, 2010 6:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2010-01-21T09:21:02-04:00</updated>

		<published>2010-01-21T04:56:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91768#p91768</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91768#p91768"/>
		<title type="html"><![CDATA[Why use hardcoded channel names?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91768#p91768"><![CDATA[
Here's an idea:<div class="codebox"><p>Code: </p><pre><code>setudef str destchan</code></pre></div>Then '.chanset #foo.priv destchan #foo' and use something like this in the procs:<div class="codebox"><p>Code: </p><pre><code>if {![validchan [set dest [channel get $chan destchan]]]} {return}</code></pre></div>This will make the script work on any number of channels.<br><br>EDIT: flag-&gt;str<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Jan 21, 2010 4:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2010-01-20T07:55:28-04:00</updated>

		<published>2010-01-20T07:55:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91759#p91759</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91759#p91759"/>
		<title type="html"><![CDATA[Simple Channel Manager]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91759#p91759"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code> bind pub -|- !op pub:op bind pub -|- !voice pub:voice bind pub -|- !ban pub:ban bind pub -|- !unban pub:unban proc pub:op {nick uhost hand chan text} {   set chan [string tolower $chan]   if {![regexp {^(#hunters.priv|#otlws.priv)$} "$chan"]} {    return   }   if {$chan == "#hunters.priv"} {    set dest "#hunters"   } else {    set dest "#otlws"   }   set target [lindex [split $text] 0]   if {($target != "")&amp;&amp;([onchan "$target" "$dest"])} {    pushmode $dest +o $target   } } proc pub:voice {nick uhost hand chan text} {   set chan [string tolower $chan]   if {![regexp {^(#hunters.priv|#otlws.priv)$} "$chan"]} {    return   }   if {$chan == "#hunters.priv"} {    set dest "#hunters"   } else {    set dest "#otlws"   }   set target [lindex [split $text] 0]   if {($target != "")&amp;&amp;([onchan "$target" "$dest"])} {    pushmode $dest +v $target   } } proc pub:ban {nick uhost hand chan text} {  global tmp3   set chan [string tolower $chan]   if {![regexp {^(#hunters.priv|#otlws.priv)$} "$chan"]} {    return   }   if {$chan == "#hunters.priv"} {    set dest "#hunters"   } else {    set dest "#otlws"   }   set target [lindex [split $text] 0]   set reason [lrange [split $text] 1 end]    if {$reason == ""} {     set reason "requested"    }    if {($target != "")&amp;&amp;(![isbotnick $target])&amp;&amp;([onchan "$target" "$dest"])} {     if {![info exists tmp3($target)]} {      set tmp3($target) "[getchanhost $target $dest]"     } else {      # I've added this incase someone's IP or host changes      if {![string match "$tmp3($target)" "[getchanhost $target $dest]"]} {       set tmp3($target) "[getchanhost $target $dest]"      }     }      putserv "KICK $dest $target :$reason"      putserv "MODE $dest +b *!*@[lindex [split [getchanhost $target $dest] @] 1]"    } } proc pub:unban {nick uhost hand chan text} {  global tmp3   set chan [string tolower $chan]   if {![regexp {^(#hunters.priv|#otlws.priv)$} "$chan"]} {    return   }   if {$chan == "#hunters.priv"} {    set dest "#hunters"   } else {    set dest "#otlws"   }   set target [lindex [split $text] 0]   if {($target != "")} {    if {[info exists tmp3($target)]} {     putserv "MODE $dest -b *!*@[lindex [split $tmp3($target) @] 1]"    } else {     puthelp "PRIVMSG $chan :I dont remenber banning '$target'"    }   } }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8130">TCL_no_TK</a> — Wed Jan 20, 2010 7:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GRapple5]]></name></author>
		<updated>2010-01-19T15:38:12-04:00</updated>

		<published>2010-01-19T15:38:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91750#p91750</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91750#p91750"/>
		<title type="html"><![CDATA[Simple Channel Manager]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91750#p91750"><![CDATA[
Worked like a charm, I've just been talking to another clan who is a friend of ours and they would also like to use the bot (my bot) on their set of channels <strong class="text-strong">#otlws</strong> and <strong class="text-strong">#otlws.priv</strong> I know I could setup another set of binds such as !ban2, so it will work on their channels too however is their some easy way to make the all the commands !ban, !voice, !op etc work with both our sets of channels (#hunters, #hunters.priv) and (#otlws, #otlws.priv), I presume there is a string search function that will allow you to search the variable to see which set of channels it is supposed to be executing on. I saw this thread (<a href="http://forum.egghelp.org/viewtopic.php?t=17513" class="postlink">http://forum.egghelp.org/viewtopic.php?t=17513</a>) in the recent threads and that is pretty much exactly what I want to do except obviously for 2 different sets of channels and for it to ban, voice, op people rather than just saying something to the channel. Thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11066">GRapple5</a> — Tue Jan 19, 2010 3:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2010-01-19T14:04:55-04:00</updated>

		<published>2010-01-19T14:04:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91747#p91747</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91747#p91747"/>
		<title type="html"><![CDATA[Simple Channel Manager]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91747#p91747"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code> # Private Ops Channel where the commands can be used from set private_channel "#hunters.priv" # Main Channel where the commands will be sent to set main_channel "#hunters" bind pub -|- !op pub:op bind pub -|- !voice pub:voice bind pub -|- !ban pub:ban bind pub -|- !unban pub:unban proc pub:op {nick uhost hand chan text} {  global private_channel main_channel   set chan [string tolower $chan]   set target [lindex [split $text] 0]    if {($chan == $private_channel)&amp;&amp;($target != "")&amp;&amp;([onchan "$target" "$main_channel"])} {       pushmode $main_channel +o $target    } } proc pub:voice {nick uhost hand chan text} {  global private_channel main_channel   set chan [string tolower $chan]   set target [lindex [split $text] 0]    if {($chan == $private_channel)&amp;&amp;($target != "")&amp;&amp;([onchan "$target" "$main_channel"])} {       pushmode $main_channel +v $target    } } proc pub:ban {nick uhost hand chan text} {  global private_channel main_channel tmp3   set chan [string tolower $chan]   set target [lindex [split $text] 0]   set reason [lrange [split $text] 1 end]   if {$reason == ""} {    set reason "requested"   }    if {($chan == $private_channel)&amp;&amp;($target != "")&amp;&amp;(![isbotnick $target])&amp;&amp;([onchan $target "$main_channel"])} {     if {![info exists tmp3($target)]} {      set tmp3($target) "[getchanhost $target $main_channel]"     }     putserv "KICK $main_channel $target :$reason"     putserv "MODE $main_channel +b *!*@[lindex [split [getchanhost $target $main_channel] @] 1]"    } } proc pub:unban {nick uhost hand chan text} {  global private_channel main_channel tmp3   set chan [string tolower $chan]   set target [lindex [split $text] 0]   if {($chan == $private_channel)&amp;&amp;($target != "")} {    if {[info exists tmp3($target)]} {     putserv "MODE $main_channel -b *!*@[lindex [split $tmp3($target) @] 1]"    } else {     puthelp "PRIVMSG $chan :I dont remenber banning '$target'"    }   } }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8130">TCL_no_TK</a> — Tue Jan 19, 2010 2:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GRapple5]]></name></author>
		<updated>2010-01-19T11:38:38-04:00</updated>

		<published>2010-01-19T11:38:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91745#p91745</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91745#p91745"/>
		<title type="html"><![CDATA[Simple Channel Manager]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91745#p91745"><![CDATA[
No the nick should always be there, the only optional text should be the !ban reason, I had the idea that of someone wants to op themself they can just use "!op their own nick"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11066">GRapple5</a> — Tue Jan 19, 2010 11:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2010-01-19T03:02:15-04:00</updated>

		<published>2010-01-19T03:02:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91741#p91741</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91741#p91741"/>
		<title type="html"><![CDATA[Simple Channel Manager]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91741#p91741"><![CDATA[
is [nick] optional? i.e if someone uses !op in the admin channel, it will op <strong class="text-strong">them</strong> in the "normal" channel?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8130">TCL_no_TK</a> — Tue Jan 19, 2010 3:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GRapple5]]></name></author>
		<updated>2010-01-18T21:00:18-04:00</updated>

		<published>2010-01-18T21:00:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91740#p91740</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91740#p91740"/>
		<title type="html"><![CDATA[Simple Channel Manager]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91740#p91740"><![CDATA[
Hi,<br><br>I have a very simple issue, I have 2 channels <strong class="text-strong">#hunters</strong> and <strong class="text-strong">#hunters.priv</strong>. I want to make the following commands work in the #hunters.priv channel:<br>- !ban [NICK] (optional reason displayed in kickmessage)<br>- !unban [NICK]<br>- !op [NICK]<br>- !voice [NICK]<br><br>I want all these commands to only work for the channels local banlist so not for them to get placed on the bots internal banlist. I must stress that I want all these commands to be send FROM the .priv channel and to be executed in the standard (#hunters) channel. So an admin in #hunters.vip can type "!ban IdiotNick Generally being an idiot" and it will remove him from the #hunters channel. I am fully aware there are channel management scripts out there however they seem too advanced and almost do "too much" I just want a basic script that can do the stated commands and when I improve my TCL skills I can easily edit it laster as once I have a core to work from I am sure I will easily be able to add other commands such as !limit etc.<br><br>Cheers guys!  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11066">GRapple5</a> — Mon Jan 18, 2010 9:00 pm</p><hr />
]]></content>
	</entry>
	</feed>
