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

	<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>2003-09-08T14:49:12-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-09-08T14:49:12-04:00</updated>

		<published>2003-09-08T14:49:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26756#p26756</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26756#p26756"/>
		<title type="html"><![CDATA[Set a ban in 2 channels...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26756#p26756"><![CDATA[
Your subchan_checkban sounds like a proc for a public bind  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"> Check the tcl-commands.doc file as user sugested. <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=187">caesar</a> — Mon Sep 08, 2003 2:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-09-08T14:40:39-04:00</updated>

		<published>2003-09-08T14:40:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26753#p26753</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26753#p26753"/>
		<title type="html"><![CDATA[Re: still confused =(]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26753#p26753"><![CDATA[
<blockquote class="uncited"><div>any ideas on what I'm missing?</div></blockquote>Yeah. How mode binds work. If you'd check <a href="http://www.eggheads.org/support/egghtml/1.6.15/tcl-commands.html#binda" class="postlink">doc/tcl-commands.doc</a> you'd notice the set of arguments passed along from a mode bind is quite different from the ones you have. (the one called "victim" in the docs will be the banmask for your bind)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Sep 08, 2003 2:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-09-08T13:59:15-04:00</updated>

		<published>2003-09-08T13:59:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26749#p26749</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26749#p26749"/>
		<title type="html"><![CDATA[still confused =(]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26749#p26749"><![CDATA[
ok I added this under the rest of the binds... <br><div class="codebox"><p>Code: </p><pre><code>bind mode - "$om_subc(main) +b" subchan_checkban</code></pre></div>then I made a proc at the bottom...<br><br><div class="codebox"><p>Code: </p><pre><code>proc subchan_checkban {nick uhost hand chan text} {    global om_subc   set banmask [subchan_maskban $nick $uhost]   putserv "MODE $om_subc(sub) +b $banmask"   putserv "KICK $om_subc(sub) $nick :$om_subc(mainbanmsg)"}</code></pre></div>but it doesn't seem to be working, any ideas on what I'm missing?<br><br>SF<p>Statistics: Posted by Guest — Mon Sep 08, 2003 1:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-09-08T10:35:54-04:00</updated>

		<published>2003-09-08T10:35:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26743#p26743</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26743#p26743"/>
		<title type="html"><![CDATA[Set a ban in 2 channels...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26743#p26743"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind mode - "#main +b" proc_that_bans_in_subchan</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Sep 08, 2003 10:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-09-07T17:13:53-04:00</updated>

		<published>2003-09-07T17:13:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26717#p26717</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26717#p26717"/>
		<title type="html"><![CDATA[Set a ban in 2 channels...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26717#p26717"><![CDATA[
I have this script that I edited, and I'd like to add some type of checking so if a ban is set on a user in the main channel, it will set the ban in the sub channel also... heres the code that I'm using right now, <br><div class="codebox"><p>Code: </p><pre><code>############################# #  This is the main channel ############################# set om_subc(main) "#mainchannel" ############################# # This is the sub channel ############################# set om_subc(sub) "#subchannel" ############################# #  Warning time, in minutes ############################# set om_subc(warntime) 30 ############################# # Warning Message ############################# set om_subc(warnmsg) "You have $om_subc(warntime) seconds to join $om_subc(main) or you will be banned" ############################# # Kick Message ############################# set om_subc(kickmsg) "You were banned from $om_subc(sub) because you have not joined $om_subc(main).  Please join $om_subc(main) to have the ban removed." ############################# #  Unban message ############################# set om_subc(unbannotice) "You have been unbanned from $om_subc(sub) , if you part $om_subc(main) you while in $om_subc(sub) you will be banned again." ############################# # Set the ban type here:    # # 1 - *!*@host.domain       # # 2 - *!user@host.domain    # # 3 - nick!*@host.domain    # # 4 - nick!user@host.domain # # 5 - *!?user@*.host.domain # ############################# set om_subc(bantype) "1" ################################### # Enable use of bold in DCC chat? # ################################### set om_subc(bold) 1 ######################################### # Prefix "SPLIT:" in DCC chat messages? # ######################################### set om_subc(SUBCHAN:) 1 ############################# #  Code begin ############################# if {![string match 1.6.* $version]} { putlog "\002SUBCHAN:\002 \002WARNING:\002 This script is intended to run on eggdrop 1.6.x or later." } if {[info tclversion] &lt; 8.2} { putlog "\002SUBCHAN:\002 \002WARNING:\002 This script is intended to run on Tcl Version 8.2 or later." } bind join - "$om_subc(sub) *" subchan_checkjoin bind join - "$om_subc(main) *" subchan_checkjoin bind part - "$om_subc(main) *" subchan_checkpart proc subchan_ncm {pattern string} { return [string match [string tolower $pattern] [string tolower $string]] } proc subchan_dopre {} {    global om_subc    if {!$om_subc(SUBCHAN:)} { return "" }    if {!$om_subc(bold)} { return "SUBCHAN: " }    return "\002SUBCHAN:\002 " } proc subchan_maskban {nick uhost} {    global om_subc    switch -- $om_subc(bantype) {       1 { set ban "*!*@[lindex [split $uhost @] 1]" }       2 { set ban "*!$uhost" }       3 { set ban "$nick!*@[lindex [split $uhost @] 1]" }       4 { set ban "$nick!$uhost" }       5 { set ban [maskhost $uhost] }       default { set ban "*!*@[lindex [split $uhost @] 1]" }    }    return $ban } proc subchan_checkjoin {nick uhost hand chan} {    global om_subc    if {![botisop $om_subc(sub)]} { return }    set banmask [subchan_maskban $nick $uhost]    if {[subchan_ncm $chan $om_subc(main)]} {       if {![ischanban $banmask $om_subc(sub)]} { return }              regsub -all -- "%mainchan" $om_subc(unbannotice) $om_subc(main) msg       regsub -all -- "%subchan" $msg $om_subc(sub) msg       pushmode $om_subc(sub) -b $banmask              if {$msg != ""} { puthelp "NOTICE $nick :$msg" }       return }    if {[onchan $nick $om_subc(main)] || [matchattr $hand ov|ov $om_subc(main)] || [matchattr $hand ov|ov $om_subc(sub)] || [isvoice $nick $om_subc(main)] || [isop $nick $om_subc(main)]} { return }                 if {![onchan $nick $om_subc(main)]} {           putserv "NOTICE $nick :$om_subc(warnmsg)" }           utimer $om_subc(warntime) [list subchan_setJoinban $nick $uhost] } proc subchan_checkpart {nick uhost hand chan text} {    global om_subc    set banmask [subchan_maskban $nick $uhost]        if {![botisop $om_subc(sub)] || ![onchan $nick $om_subc(sub)] || [matchattr $hand vo|vo $om_subc(main)] || [matchattr $hand vo|vo $om_subc(sub)] || [isvoice $nick $om_subc(sub)] || [isop $nick $om_subc(sub)]} { return }        if {[onchan $nick $om_subc(sub)] } {           putserv "NOTICE $nick :$om_subc(warnmsg)" }        utimer $om_subc(warntime) [list subchan_setPartban $nick $uhost ] } proc subchan_setPartban {nick uhost} {    global om_subc    set banmask [subchan_maskban $nick $uhost]        if {![botisop $om_subc(sub)] || ![onchan $nick $om_subc(sub)] || [isvoice $nick $om_subc(sub)] || [isop $nick $om_subc(sub)] || [onchan $nick $om_subc(main)] || [isvoice $nick $om_subc(main)] || [isop $nick $om_subc(main)]} { return }              putserv "MODE $om_subc(sub) +b $banmask"    putserv "KICK $om_subc(sub) $nick :$om_subc(kickmsg)" } proc subchan_setJoinban {nick uhost} {    global om_subc    set banmask [subchan_maskban $nick $uhost]        if {![botisop $om_subc(sub)] || ![onchan $nick $om_subc(sub)] || [isvoice $nick $om_subc(sub)] || [isop $nick $om_subc(sub)] || [onchan $nick $om_subc(main)] || [isvoice $nick $om_subc(main)] || [isop $nick $om_subc(main)]} { return }    putserv "MODE $om_subc(sub) +b $banmask"    putserv "KICK $om_subc(sub) $nick :$om_subc(kickmsg)" }         putlog "\002SUBCHAN:\002 OMSubChannel.tcl 1.1 is loaded."</code></pre></div>Any help would be appreciated ... SF<p>Statistics: Posted by Guest — Sun Sep 07, 2003 5:13 pm</p><hr />
]]></content>
	</entry>
	</feed>
