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

	<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>2022-10-02T08:07:14-04:00</updated>

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

		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-10-02T08:07:14-04:00</updated>

		<published>2022-10-02T08:07:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111446#p111446</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111446#p111446"/>
		<title type="html"><![CDATA[channel mode restrictions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111446#p111446"><![CDATA[
Thanks CrazyCat<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun Oct 02, 2022 8:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2022-10-02T07:37:26-04:00</updated>

		<published>2022-10-02T07:37:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111445#p111445</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111445#p111445"/>
		<title type="html"><![CDATA[channel mode restrictions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111445#p111445"><![CDATA[
Ok, understoud your error.<br>Your proc is defined with:<div class="codebox"><p>Code: </p><pre><code>proc raw:modeCheck {from key text} {</code></pre></div>And after you use a variable with the same name (<strong class="text-strong">key</strong>:<div class="codebox"><p>Code: </p><pre><code>set key [lindex $items 2]...if {[info exists key]} {    putserv "privmsg $target -k $key "</code></pre></div>Rename the variable to ckey (as Channel Key) or anything you want and it will work<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sun Oct 02, 2022 7:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-10-01T21:11:31-04:00</updated>

		<published>2022-10-01T21:11:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111444#p111444</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111444#p111444"/>
		<title type="html"><![CDATA[channel mode restrictions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111444#p111444"><![CDATA[
Inspircd server <br><br>  #test :+i<br>  #test -v :Campbell<br>  #test +k :keyword<br>  #test +l :67<br><br>Bahamut ircd (Dalnet server) <br><br> #test +k keyword<br> #test +v Campbell<br> #test +i <br> #test +l 293<br><br>These are the ircds we generally use<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sat Oct 01, 2022 9:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2022-10-01T16:27:08-04:00</updated>

		<published>2022-10-01T16:27:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111443#p111443</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111443#p111443"/>
		<title type="html"><![CDATA[channel mode restrictions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111443#p111443"><![CDATA[
Ok, i think you don't read what I propose to help you.<br><br>1. add a f***ing <strong class="text-strong">putlog $text</strong> in your proc<br>2. copy here what you see in PL (so the f***ing <strong class="text-strong">$text</strong>)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sat Oct 01, 2022 4:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-10-01T15:57:40-04:00</updated>

		<published>2022-10-01T15:57:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111442#p111442</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111442#p111442"/>
		<title type="html"><![CDATA[channel mode restrictions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111442#p111442"><![CDATA[
i used this :<br><div class="codebox"><p>Code: </p><pre><code>namespace eval modecontrol {  variable enforceModes "nt"  #Always keep these set  variable restrictModes "+ikl" #Never permit these to be set  proc raw:modeCheck {from key text} {    variable enforceModes    variable restrictModes    set from [split $from "!"]    set nick [lindex $from 0]    set handle [nick2hand $nick]    #Sanity check  #  if {[isbotnick $nick] || [matchattr $handle "+mnb"]} { return 0 }    set items [split $text]    set enforce [split $enforceModes ""]    set restrict [split $restrictModes ""]    set target [lindex $items 0]    set add 1    set act 0#     putserv "privmsg $target :$restrict"#      putserv "privmsg $target :[split [lindex $items 1] ""]"    #   if {[matchattr [nick2hand $nick] n $target] || [isbotnick $nick]} { return 0 }    foreach mode [split [lindex $items 1] ""] {     # putserv "privmsg $target :$mode"      switch -- $mode {        "+" {          set add 1        }        "-" {          set add 0        }        "I" -        "e" -        "b" {          set items [lreplace $items 2 2]        }        "k" {          if {$add} {            set key [lindex $items 2]            set items [lreplace $items 2 2]           putserv "privmsg $target :$key - $items"           }        }        "l" {          if {$add} {            set limit [lindex $items 2]            set items [lreplace $items 2 2]          }        }        default {          if {[lsearch $enforce $mode] &gt;= 0 &amp;&amp; !$add} {            # pushmode $target "+$mode"            putserv "privmsg $target +$mode"            set act 1          } elseif {[lsearch $restrict $mode] &gt;= 0 &amp;&amp; $add} {          #  pushmode $target "-$mode"            putserv "privmsg $target -$mode"            set act 1          }        }      }      #Uncomment this to bounce key and limits      if {[info exists key]} {        # pushmode2 $target -k $key          putserv "privmsg $target -k $key "      }      if {[info exists limit]} {       #  pushmode $target -l          putserv "privmsg $target -l"      }    }    if {$act &amp;&amp; [llength $from] &gt; 1} {      #puthelp "NOTICE $nick :Please let me handle the channel mode settings."    }  flushmode $target    return 0  }  bind raw - "MODE" [namespace current]::raw:modeCheck}</code></pre></div><br>with this output:<br><blockquote class="uncited"><div><br>21:53:42  @El-dente  Sets Mode on  #TEST  to:  -k 8732 <br>21:53:42 (@Silver-Eagle)  : -k MODE<br>21:53:42 (@Silver-Eagle)  : -k MODE<br>21:53:51  @El-dente  Sets Mode on  #TEST  to:  +k 8732 <br>21:53:51 (@Silver-Eagle)  : -k MODE<br>21:53:51 (@Silver-Eagle)  : 8732 - {#TEST} +k<br>21:53:51 (@Silver-Eagle)  : -k 8732<br>21:55:04  @El-dente  Sets Mode on  #TEST  to:  +v El-dente <br>21:55:04 (@Silver-Eagle)  : -k MODE<br>21:55:04 (@Silver-Eagle)  : -k MODE<br>21:55:10  @El-dente  Sets Mode on  #TEST  to:  -v El-dente <br>21:55:10 (@Silver-Eagle)  : -k MODE<br>21:55:10 (@Silver-Eagle)  : -k MODE<br>21:55:18  El-dente  Sets Mode on  #TEST  to:  -o El-dente <br>21:55:18 (@Silver-Eagle)  : -k MODE<br>21:55:18 (@Silver-Eagle)  : -k MODE<br>21:55:23  @El-dente  Sets Mode on  #TEST  to:  +o El-dente <br>21:55:23 (@Silver-Eagle)  : -k MODE<br>21:55:23 (@Silver-Eagle)  : -k MODE<br><br>21:58:27  @Cappuccino  Sets Mode on  #TEST  to:  +i <br>21:58:27 (@Silver-Eagle)  : -k MODE<br>21:58:27 (@Silver-Eagle)  : -i<br>21:58:27 (@Silver-Eagle)  : -k MODE<br></div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sat Oct 01, 2022 3:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2022-10-01T14:49:41-04:00</updated>

		<published>2022-10-01T14:49:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111441#p111441</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111441#p111441"/>
		<title type="html"><![CDATA[channel mode restrictions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111441#p111441"><![CDATA[
I've a short stupi idea: why don't show us the content of $text if you want to be helped ?<br><br>my 2 cents.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sat Oct 01, 2022 2:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-10-01T12:56:22-04:00</updated>

		<published>2022-10-01T12:56:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111440#p111440</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111440#p111440"/>
		<title type="html"><![CDATA[channel mode restrictions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111440#p111440"><![CDATA[
thanks for the reply CrazyCat i did just that but couldnt figure whats wrong<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sat Oct 01, 2022 12:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2022-10-01T12:30:01-04:00</updated>

		<published>2022-10-01T12:30:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111439#p111439</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111439#p111439"/>
		<title type="html"><![CDATA[channel mode restrictions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111439#p111439"><![CDATA[
Looks like dalnet doesn't sends mode message like other networks.<br><br>putlog $text to know how are formated message, and then you can adapt your script.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sat Oct 01, 2022 12:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-10-01T13:31:04-04:00</updated>

		<published>2022-10-01T09:57:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111438#p111438</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111438#p111438"/>
		<title type="html"><![CDATA[channel mode restrictions]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111438#p111438"><![CDATA[
greetz gentz, <br><br>we have been using this tcl for a while and on some ircds it works fine but recently we tried it on dalnet and it seems to output odd results<br><div class="codebox"><p>Code: </p><pre><code>namespace eval modecontrol {  variable enforceModes "nt"  #Always keep these set  variable restrictModes "+ikl" #Never permit these to be set  proc raw:modeCheck {from key text} {    variable enforceModes    variable restrictModes    set from [split $from "!"]    set nick [lindex $from 0]    set handle [nick2hand $nick]    #Sanity check    if {[isbotnick $nick] || [matchattr $handle "+mnb"]} { return 0 }    set items [split $text]    set enforce [split $enforceModes ""]    set restrict [split $restrictModes ""]    set target [lindex $items 0]    set add 1    set act 0     if {[matchattr [nick2hand $nick] n $target] || [isbotnick $nick]} { return 0 }    foreach mode [split [lindex $items 1] ""] {      switch -- $mode {        "+" {          set add 1        }        "-" {          set add 0        }        "I" -        "e" -        "b" {          set items [lreplace $items 2 2]        }        "k" {          if {$add} {            set key [lindex $items 2]            set items [lreplace $items 2 2]          }        }        "l" {          if {$add} {            set limit [lindex $items 2]            set items [lreplace $items 2 2]          }        }        default {          if {[lsearch $enforce $mode] &gt;= 0 &amp;&amp; !$add} {              pushmode $target "+$mode"            set act 1          } elseif {[lsearch $restrict $mode] &gt;= 0 &amp;&amp; $add} {            pushmode $target "-$mode"            set act 1          }        }      }      #Uncomment this to bounce key and limits      if {[info exists key]} {        pushmode $target -k $key      }      if {[info exists limit]} {        pushmode $target -l      }    }    if {$act &amp;&amp; [llength $from] &gt; 1} {      #puthelp "NOTICE $nick :Please let me handle the channel mode settings."    }  flushmode $target    return 0  }  bind raw - "MODE" [namespace current]::raw:modeCheck}</code></pre></div><blockquote class="uncited"><div><br>15:55:28  @Motley  Sets Mode on  #test  to:  +l 22 <br>15:55:28  @Silver-Eagle  Sets Mode on  #test  to:  -lk MODE <br>15:55:33  @Motley  Sets Mode on  #test  to:  -l <br>15:55:33  @Silver-Eagle  Sets Mode on  #test  to:  -k MODE <br>15:55:45  @Motley  Sets Mode on  #test  to:  -k kjdkjd <br>15:55:45  @Silver-Eagle  Sets Mode on #test to:  -k MODE <br>15:55:50  @Motley  Sets Mode on  #test  to:  +k kjdkjd <br>15:55:50  @Silver-Eagle  Sets Mode on #test to:  -k kjdkjd <br>15:55:59  @Motley  Sets Mode on #test to:  +v Motley <br>15:55:59  @Silver-Eagle  Sets Mode on #test to:  -k MODE <br>15:56:11  @Motley  Sets Mode on #test to:  +o Motley <br>15:56:11  @Silver-Eagle  Sets Mode on #test to:  -k MODE <br></div></blockquote><br>while what is expected is <br><blockquote class="uncited"><div><br> @Motley  Sets Mode on  #test  to:  +l 22 <br> @Motley  Sets Mode on  #test  to:  -l <br> @Motley  Sets Mode on  #test  to:  -k kjdkjd <br> @Motley  Sets Mode on  #test  to:  +k kjdkjd <br> @Silver-Eagle  Sets Mode on #test to:  -k kjdkjd <br> @Motley  Sets Mode on #test to:  +v Motley <br> @Motley  Sets Mode on #test to:  +o Motley <br><br></div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sat Oct 01, 2022 9:57 am</p><hr />
]]></content>
	</entry>
	</feed>
