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

	<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-03-17T02:58:11-04:00</updated>

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

		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-03-17T02:58:11-04:00</updated>

		<published>2022-03-17T02:58:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111019#p111019</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111019#p111019"/>
		<title type="html"><![CDATA[devoice on ban doesnt devoice {somenick}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111019#p111019"><![CDATA[
hm yes ive tested again and for some reason it seems fine now i cant grasp it ill monitor it some more and report back thanks again nml375 much apreciated<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Thu Mar 17, 2022 2:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2022-03-16T15:31:55-04:00</updated>

		<published>2022-03-16T15:31:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111016#p111016</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111016#p111016"/>
		<title type="html"><![CDATA[devoice on ban doesnt devoice {somenick}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111016#p111016"><![CDATA[
Once again, I was not asking for examples, but actual samples that failed.<br><br>That said, I just fired up a 1.9.2 bot and did a few tests in console...<div class="codebox"><p>Code: </p><pre><code>.tcl set goodmask {[nick]!*@*}Tcl: [nick]!*@*.tcl set badmask [string map {"\\" "\\\\" "\[" "\\["} $goodmask]Tcl: \[nick]!*@*.tcl set uhost {[nick]!user@host}Tcl: [nick]!user@host.tcl matchaddr $goodmask $uhostTcl: 1.tcl matchaddr $badmask $uhostTcl: 0</code></pre></div>So, with the examples you posted, matching works just fine - as long as you don't start injecting random characters...<br><br>To ease with figuring out what is going wrong, we need actual samples. I would also recommend using putlog to print information such as what is the actual mask and nick!user@host used; or if the bot does not believe the user is voiced, etc...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Mar 16, 2022 3:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-03-16T14:25:35-04:00</updated>

		<published>2022-03-16T14:25:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111015#p111015</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111015#p111015"/>
		<title type="html"><![CDATA[devoice on ban doesnt devoice {somenick}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111015#p111015"><![CDATA[
i already tried both with and without that line both with same results<br>and i gave examples of banmasks let me give again<br><br><br>+b {nick}!*@*<br>+b [nick]!*@*<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Mar 16, 2022 2:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2022-03-16T13:15:23-04:00</updated>

		<published>2022-03-16T13:15:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111013#p111013</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111013#p111013"/>
		<title type="html"><![CDATA[devoice on ban doesnt devoice {somenick}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111013#p111013"><![CDATA[
I was hoping for some actual samples that failed to execute properly.<br><br>However, if the banmask would contain { or [, your character substitution would certainly interfere with mask matching...<br><br>matchaddr does not support backslash escaping, so adding those would insert characters in the mask that will not match user's nick!user@host...<br><br>So, remove this line for starters:<div class="codebox"><p>Code: </p><pre><code>set ban [string map {"\\" "\\\\" "\[" "\\["} $ban]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Mar 16, 2022 1:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-03-16T13:00:02-04:00</updated>

		<published>2022-03-16T13:00:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111012#p111012</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111012#p111012"/>
		<title type="html"><![CDATA[devoice on ban doesnt devoice {somenick}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111012#p111012"><![CDATA[
i welcome any help to deal with nicks that have {}[] in them as they seem to cause alot of problems with tcls<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Mar 16, 2022 1:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-03-16T04:49:37-04:00</updated>

		<published>2022-03-16T04:49:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111005#p111005</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111005#p111005"/>
		<title type="html"><![CDATA[devoice on ban doesnt devoice {somenick}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111005#p111005"><![CDATA[
i also noticed the built in ban-time setting doesnt unban banmasks like <br> {nick}!*@* as well<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Mar 16, 2022 4:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-03-16T04:13:09-04:00</updated>

		<published>2022-03-16T04:13:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111003#p111003</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111003#p111003"/>
		<title type="html"><![CDATA[devoice on ban doesnt devoice {somenick}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111003#p111003"><![CDATA[
examples of nicks it doesnt get the banmask for to set a devoice is nicks like <br><br>[nick] <br><br>{nick}<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Mar 16, 2022 4:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-03-16T04:10:41-04:00</updated>

		<published>2022-03-16T04:10:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111002#p111002</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111002#p111002"/>
		<title type="html"><![CDATA[devoice on ban doesnt devoice {somenick}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111002#p111002"><![CDATA[
thanks for your reply nml375<br><br>the reason for using :<br><blockquote class="uncited"><div>if { [string first ":" $ban] != -1 } { set ban [lindex [split $ban ":"] 1] }</div></blockquote>is to get the banmask from like muteban or other extended bans like:<br><br> +b m:nick!ident@host<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Mar 16, 2022 4:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2022-03-15T14:23:47-04:00</updated>

		<published>2022-03-15T14:23:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111000#p111000</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111000#p111000"/>
		<title type="html"><![CDATA[devoice on ban doesnt devoice {somenick}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111000#p111000"><![CDATA[
It's been a while, so lets see how much I've actually forgotten...<br><br>As for brackets and braces in general, the most common issues I've come across over the years, is when scripters don't keep track of when they're operating on a string or a list. This is usually the case when I find search-and-replace snippets looking for those characters.<br>So only use list-operators (lindex, lrange, etc) on what you know to be a list.<br><br>The second most common one, is scripters sending unvalidated strings to expr/eval.<br><br>That said, I can't see any of those issues in the posted code.<br>You do have a search-and-replace snippet escaping backslash and opening-bracket in the banmask, which I belive is not needed (since banmasks use simple glob-style matching, not regular expressions). But unless the banmask includes those characters, that shouldn't be an issue.<br>Also curious why you split your banmask on ":"...<br><br>Think you could post some examples of banmasks and nicks that are not working properly?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Tue Mar 15, 2022 2:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-03-15T12:50:20-04:00</updated>

		<published>2022-03-15T12:50:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110994#p110994</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110994#p110994"/>
		<title type="html"><![CDATA[devoice on ban doesnt devoice {somenick}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110994#p110994"><![CDATA[
nicks with {} [] seem to give lot of issues with many tcls scripts i noticed<br>i wonder if there is a general rule wich can be aplied to avoid all this<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Tue Mar 15, 2022 12:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-03-15T12:44:05-04:00</updated>

		<published>2022-03-15T12:44:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110993#p110993</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110993#p110993"/>
		<title type="html"><![CDATA[devoice on ban doesnt devoice {somenick}]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110993#p110993"><![CDATA[
i have this odd issue with this code it seems to devoice on ban almost all nicks that match the banmask exept if the nick is a nick with {}  like {somenick} {nick2} and such im puzzled as to why<br><div class="codebox"><p>Code: </p><pre><code>bind mode - "* +b" devoice:onbanproc devoice:onban {nick uhost hand chan mc ban} {   if {![botisop $chan]} { return }    set ban [string map {"\\" "\\\\" "\[" "\\["} $ban]    if { [string first ":" $ban] != -1 } { set ban [lindex [split $ban ":"] 1] }   foreach n [chanlist $chan] {     if {![matchaddr $ban $n![getchanhost $n $chan]]} { continue }        if {![botisop $chan] || [isop $n $chan] || [ishalfop $n $chan] || [matchattr [nick2hand $n] fnmo|fnmo $chan] || [isbotnick $n]} { pushmode $chan -b $ban ; continue }          if {[isvoice $n $chan]} { pushmode $chan -v $n }   }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Tue Mar 15, 2022 12:44 pm</p><hr />
]]></content>
	</entry>
	</feed>
