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

	<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-01-09T13:27:26-04:00</updated>

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

		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-01-09T13:27:26-04:00</updated>

		<published>2022-01-09T13:27:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110758#p110758</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110758#p110758"/>
		<title type="html"><![CDATA[custom banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110758#p110758"><![CDATA[
excellent that seems to do perfect thanks gents CC and caesar<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun Jan 09, 2022 1:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2022-01-09T13:04:41-04:00</updated>

		<published>2022-01-09T13:04:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110757#p110757</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110757#p110757"/>
		<title type="html"><![CDATA[custom banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110757#p110757"><![CDATA[
Ok I think I found it.<br><br>Works on the host part:<div class="codebox"><p>Code: </p><pre><code>.tcl set target "host-s?d?d?-net-sd??-???er-c???j.mobilinkinfinity.net.pk".tcl regsub -all -- {([a-z\?]*\?{1,}[a-z\?]*)(-|\.|$)} $target {*\2} target.tcl putlog $target[18:04] host-*-net-*-*-*.mobilinkinfinity.net.pk</code></pre></div>Seems to work on full mask too:<div class="codebox"><p>Code: </p><pre><code>.tcl set target "nick!username@ho?st-s?d?d?-net-sd??-???er-c???j.mobilinkinfinity.net.pk".tcl regsub -all -- {([a-z\?]*\?{1,}[a-z\?]*)(-|\.|$)} $target {*\2} target.tcl putlog $target[18:05] nick!username@*-*-net-*-*-*.mobilinkinfinity.net.pk</code></pre></div>I added a ? in the beginning of the host to check if we won't have nick!username@ho?st replaced with *, but it's ok as @ is not in [a-z]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sun Jan 09, 2022 1:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2022-01-09T12:39:28-04:00</updated>

		<published>2022-01-09T12:39:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110756#p110756</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110756#p110756"/>
		<title type="html"><![CDATA[custom banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110756#p110756"><![CDATA[
As I said: complicated as you have 2 possible separators.<br>I'm doing some tries with regexp but I won't bet a lot on it <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=691">CrazyCat</a> — Sun Jan 09, 2022 12:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2022-01-09T12:40:02-04:00</updated>

		<published>2022-01-09T12:38:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110755#p110755</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110755#p110755"/>
		<title type="html"><![CDATA[custom banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110755#p110755"><![CDATA[
String map it?<div class="codebox"><p>Code: </p><pre><code>% set text "*!*@host-???-net-??-???-???.mobilinkinfinity.net.pk"% string map {? *} $text*!*@host-***-net-**-***-***.mobilinkinfinity.net.pk</code></pre></div>Edit: Nvm, doesn't seem to get as you wanted.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sun Jan 09, 2022 12:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-01-09T11:54:58-04:00</updated>

		<published>2022-01-09T11:54:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110754#p110754</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110754#p110754"/>
		<title type="html"><![CDATA[custom banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110754#p110754"><![CDATA[
excellent that seems to work CC<br>anyway to have this a bit shorter like in regexp perhaps ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun Jan 09, 2022 11:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2022-01-09T11:36:30-04:00</updated>

		<published>2022-01-09T11:36:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110753#p110753</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110753#p110753"/>
		<title type="html"><![CDATA[custom banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110753#p110753"><![CDATA[
You can easily get the first banmask you want:<div class="codebox"><p>Code: </p><pre><code>.tcl set target "*!*@host-s?d?d?-net-sd??-???er-c???j.mobilinkinfinity.net.pk".tcl regsub -all -- {\?+} $target {*} target.tcl putlog $target[16:06] *!*@host-s*d*d*-net-sd*-*er-c*j.mobilinkinfinity.net.pk</code></pre></div>To replace any part containing ? (or *) with *, it's more difficult as you have 2 separators (- and .), so you'll have to split host on "." and loop on that, then split on - and replace if needed:<div class="codebox"><p>Code: </p><pre><code>set target "*!*@host-s?d?d?-net-sd??-???er-c???j.mobilinkinfinity.net.pk"lassign [split $target @] u happend u @set th {}foreach m1 [split $h .] {set thd {}foreach m2 [split $m1 -] {if {[string first ? $m2]!=-1} {lappend thd *} else {lappend thd $m2}}lappend th [join $thd -]}append u [join $th .]putlog "U is $u"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sun Jan 09, 2022 11:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-01-09T10:28:24-04:00</updated>

		<published>2022-01-09T10:28:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110751#p110751</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110751#p110751"/>
		<title type="html"><![CDATA[custom banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110751#p110751"><![CDATA[
i was wondering if this banmask:  [maskhost $uhost 14]  <br><br>wich replaces all digits in the hosts with a ?<br> could be converted to replace all  ? chars with a single *<br><br>for example :<br><br><blockquote class="uncited"><div> *!*@host-233-net-99-160-119.mobilinkinfinity.net.pk </div></blockquote> <br> normally it would output with :<br><blockquote class="uncited"><div> *!*@host-???-net-??-???-???.mobilinkinfinity.net.pk </div></blockquote>we wanted to have it like this:<br> <blockquote class="uncited"><div> *!*@host-*-net-*-*-*.mobilinkinfinity.net.pk </div></blockquote>so the sections with digit in it should be replaced with a single asterix even if the section has alphabetical chars in it as well <br><br>sor for example :<br><br><blockquote class="uncited"><div> *!*@host-s2d3d3-net-sd99-160er-c119j.mobilinkinfinity.net.pk </div></blockquote>this would output as :<br><blockquote class="uncited"><div> *!*@host-s?d?d?-net-sd??-???er-c???j.mobilinkinfinity.net.pk </div></blockquote>to have it like :<br><blockquote class="uncited"><div> *!*@host-*-net-*-*-*.mobilinkinfinity.net.pk </div></blockquote>thanks in advance<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun Jan 09, 2022 10:28 am</p><hr />
]]></content>
	</entry>
	</feed>
