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

	<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-11-07T10:27:06-04:00</updated>

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

		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-11-07T10:27:06-04:00</updated>

		<published>2022-11-07T10:27:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111499#p111499</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111499#p111499"/>
		<title type="html"><![CDATA[irccloud banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111499#p111499"><![CDATA[
edited and tested <br><div class="codebox"><p>Code: </p><pre><code>## ircCloudBan v.1.0 ##bind mode - "#% +b" ircCloudBanbind kick - * ircCloudKickproc ircCloudBan {nk uh hn ch md banmask} {  if {![botisop $ch]} return  if {[string match -nocase "*@*irccloud*" $banmask] &amp;&amp; ![regexp {[\`\^\-\_\\\|\}\{\[\]a-zA-Z0-9]{1,}!(\*)@.*irccloud\.com} $banmask] &amp;&amp; ![regexp {[su]id\d+} $banmask] &amp;&amp; ![regexp {id-(\d+).(.*?).irccloud.com} $banmask] &amp;&amp; || ![regexp {(\*)!(\*)@.*[a-zA-Z0-9\-]+\.[a-zA-Z]+\.irccloud\.com} $banmask]} {     set ::irccloudban $banmask    after [expr {1*1000*60}] [list unset ::irccloudban]  }  if {[regexp {[\`\^\-\_\\\|\}\{\[\]a-zA-Z0-9]{1,}!(\*)@.*irccloud\.com} $banmask] || [regexp {[su]id\d+} $banmask] || [regexp {id-(\d+).(.*?).irccloud.com} $banmask] || [regexp {(\*)!(\*)@.*[a-zA-Z0-9\-]+\.[a-zA-Z]+\.irccloud\.com} $banmask]} {    set userList [chanlist $ch]    foreach n $userList {      if {![matchaddr $banmask $n![getchanhost $n $ch]]} { continue }      if {[isop $n $ch] || [ishalfop $n $ch] || [matchattr [nick2hand $n] "fnmo|fnmo" $ch]} { continue }      set chost [getchanhost $n $ch]      regsub -all -- ~ $chost "" chost      set ident  [lindex [split $chost @] 0]      set xbmaskx [string map {sid id uid id} $ident]      set bmask  *!*[string tolower $xbmaskx ]@*      pushmode $ch +b $bmask      pushmode $ch -b $banmask    }  }}proc ircCloudKick {nk uh hn ch target why} {  set chost [getchanhost $target $ch]  if {[info exists ::irccloudban] &amp;&amp; [matchaddr $::irccloudban $target!$chost]} {    if {![botisop $ch]} return    regsub -all -- ~ $chost "" chost    set ident  [lindex [split $chost @] 0]    set xbmaskx [string map {sid id uid id} $ident]    set bmask  *!*[string tolower $xbmaskx ]@*    pushmode $ch +b $bmask    pushmode $ch -b  $::irccloudban    after cancel unset ::irccloudban    unset ::irccloudban  }}putlog "irccloud.tcl Loaded."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Nov 07, 2022 10:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-10-24T11:33:54-04:00</updated>

		<published>2022-10-24T11:33:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111481#p111481</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111481#p111481"/>
		<title type="html"><![CDATA[irccloud banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111481#p111481"><![CDATA[
Ah ok Thanks SpiKe^^<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Oct 24, 2022 11:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2022-10-24T09:13:23-04:00</updated>

		<published>2022-10-24T09:13:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111480#p111480</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111480#p111480"/>
		<title type="html"><![CDATA[the script so far]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111480#p111480"><![CDATA[
simo,<br><br>Here is a cleaned up copy of your script, with proper indentation so it can be read by others.<br>I see multiple issues with the code as it stands so far...<div class="codebox"><p>Code: </p><pre><code>## ircCloudBan v.1.0 ##bind mode - "#% +b" ircCloudBanbind kick - * ircCloudKickproc ircCloudBan {nk uh hn ch md banmask} {  if {![botisop $ch]} {  return 0  }  if {[string match -nocase "*@*irccloud*" $banmask] &amp;&amp; ![regexp {[su]id\d+} $banmask] &amp;&amp; ![regexp {id-(\d+).(.*?).irccloud.com} $banmask] &amp;&amp; ![string match -nocase "*@*-*-*-*-*irccloud.com" $banmask]} {    set ::irccloudban $banmask    after [expr {1*1000*60}] [list unset ::irccloudban]  }  if {[regexp {[su]id\d+} $banmask] || [regexp {id-(\d+).(.*?).irccloud.com} $banmask] || [string match -nocase "*@*-*-*-*-*irccloud.com" $banmask]} {    foreach n [chanlist $ch] {      if {![matchaddr $banmask $n![getchanhost $n $ch]]} { continue }      if {[isop $n $ch] || [ishalfop $n $ch]} { continue }      if {[matchattr [nick2hand $n] "fnmo|fnmo" $ch]} { continue }      set chost [getchanhost $n $ch]      regsub -all -- ~ $chost "" chost      set ident  [lindex [split $chost @] 0]      set xbmaskx [string map {sid id uid id} $ident]      set bmask  *!*[string tolower $xbmaskx ]@*      pushmode $ch +b $bmask      pushmode $ch -b $banmask      set ::irccloudban2 $banmask    }  }}proc ircCloudKick {nk uh hn ch target why} {  if {[info exists ::irccloudban] || [info exists ::irccloudban2]} {    if {![botisop $ch]} {  return 0  }    set chost [getchanhost $target $ch]    if {[string match -nocase "*@*irccloud*" $chost]} {      regsub -all -- ~ $chost "" chost      set ident  [lindex [split $chost @] 0]      set xbmaskx [string map {sid id uid id} $ident]      set bmask  *!*[string tolower $xbmaskx ]@*      pushmode $ch +b $bmask      if {[info exists ::irccloudban]} { pushmode $ch -b  $::irccloudban }      after cancel unset ::irccloudban      if {[info exists ::irccloudban]} { unset ::irccloudban }    }  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Mon Oct 24, 2022 9:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-10-23T10:56:46-04:00</updated>

		<published>2022-10-23T10:56:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111479#p111479</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111479#p111479"/>
		<title type="html"><![CDATA[irccloud banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111479#p111479"><![CDATA[
anyway we can use this kind of banmask? as i failed to find a way to add it to be detected when set<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun Oct 23, 2022 10:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-10-23T02:54:57-04:00</updated>

		<published>2022-10-23T02:54:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111478#p111478</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111478#p111478"/>
		<title type="html"><![CDATA[irccloud banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111478#p111478"><![CDATA[
I have been using the above posted code wich works well except for banmasks like<br><div class="codebox"><p>Code: </p><pre><code>Nick!*@*.langley.irccloud.comOrNick!*@*.irccloud.com</code></pre></div>Wich could be utilized to unset ban and set the proper one without having to wait for the kick as the banmask contains the nick<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun Oct 23, 2022 2:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-10-22T13:17:45-04:00</updated>

		<published>2022-10-22T13:17:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111477#p111477</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111477#p111477"/>
		<title type="html"><![CDATA[irccloud banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111477#p111477"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>## ircCloudBan v.1.0 ##bind mode - "#% +b" ircCloudBanbind kick - * ircCloudKickproc ircCloudBan {nk uh hn ch md banmask} {      if {![botisop $ch]} return      if {[string match -nocase "*@*irccloud*" $banmask] &amp;&amp; ![regexp {[su]id\d+} $banmask] &amp;&amp; ![regexp {id-(\d+).(.*?).irccloud.com} $banmask] &amp;&amp; ![string match -nocase "*@*-*-*-*-*irccloud.com" $banmask]} {                   set ::irccloudban $banmask                   after [expr {1*1000*60}] [list unset ::irccloudban]     }          if {[regexp {[su]id\d+} $banmask] || [regexp {id-(\d+).(.*?).irccloud.com} $banmask] || [string match -nocase "*@*-*-*-*-*irccloud.com" $banmask]} {   foreach n [chanlist $ch] {         if {![matchaddr $banmask $n![getchanhost $n $ch]]} { continue }         if {[isop $n $ch] || [ishalfop $n $ch]} { continue }         if {[matchattr [nick2hand $n] "fnmo|fnmo" $ch]} { continue }                 set chost [getchanhost $n $ch]                   regsub -all -- ~ $chost "" chost                   set ident  [lindex [split $chost @] 0]                   set xbmaskx [string map {sid id uid id} $ident]                   set bmask  *!*[string tolower $xbmaskx ]@*                   pushmode $ch +b $bmask                   pushmode  $ch -b $banmask                   set ::irccloudban2 $banmask    }  }}  proc ircCloudKick {nk uh hn ch target why} { if {[info exists ::irccloudban] || [info exists ::irccloudban2]} {     if {![botisop $ch]} return         set chost [getchanhost $target $ch]        if {[string match -nocase "*@*irccloud*" $chost]} {        regsub -all -- ~ $chost "" chost        set ident  [lindex [split $chost @] 0]        set xbmaskx [string map {sid id uid id} $ident]        set bmask  *!*[string tolower $xbmaskx ]@*        pushmode $ch +b $bmask       if {[info exists ::irccloudban]} { pushmode $ch -b  $::irccloudban }       after cancel unset ::irccloudban       if {[info exists ::irccloudban]} { unset ::irccloudban }    }  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sat Oct 22, 2022 1:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gamble27]]></name></author>
		<updated>2020-06-03T13:48:44-04:00</updated>

		<published>2020-06-03T13:48:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108495#p108495</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108495#p108495"/>
		<title type="html"><![CDATA[Final version]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108495#p108495"><![CDATA[
Hey simo, can I have the final version of this tcl? Much appreciated. Anyone using final version of this please share. Thank you.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10110">gamble27</a> — Wed Jun 03, 2020 1:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2018-07-24T07:34:04-04:00</updated>

		<published>2018-07-24T07:34:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106961#p106961</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106961#p106961"/>
		<title type="html"><![CDATA[irccloud banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106961#p106961"><![CDATA[
tested it seems to work as intented<br><br>tnx caesar much apreciated<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Tue Jul 24, 2018 7:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2018-07-24T03:42:04-04:00</updated>

		<published>2018-07-24T03:42:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106960#p106960</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106960#p106960"/>
		<title type="html"><![CDATA[irccloud banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106960#p106960"><![CDATA[
Nothing happens on:<div class="codebox"><p>Code: </p><pre><code>SlMO Sets Mode on #Test to: +b *!*@id-306017.charlton.irccloud.com@Cappuccino Sets Mode on #Test to: -b *!*@id-306017.charlton.irccloud.com </code></pre></div>for two reasons:<br><br>#1. If you look at this example you gave earlier (1-2 pages back):<div class="codebox"><p>Code: </p><pre><code>[19:08] * Joins: OnT (uid1420156@id-140156.ealing.irccloud.com)[19:10] * user1 sets mode: +b *!*@id-140156.ealing.irccloud.com </code></pre></div>you will notice that the number in <em class="text-italics">uid1420156</em> is not equal with the number taken from <em class="text-italics">id-140156.ealing.irccloud.com</em>, meaning 1420156 is not equal with 140156.<br><br>Is this a copy/paste mistake or something?<br><br>#2. From the snippet I posted about <em class="text-italics">Identifying users </em> the <em class="text-italics">user</em> can start with <em class="text-italics">uid</em> (for example uid123456) for regular members and <em class="text-italics">sid</em> (for example sid123456) for paid users, so what should you ban in this case?<br><br>When placing a ban on *!*@id-306017.charlton.irccloud.com we can lookup what members match this address but what if it matches multiple members? You didn't want that.<br><br>I guess we can lookup what members have uid306017 or sid306017 in their <em class="text-italics">user</em>, but what if it also matches more than one member?<br><br>To make it trigger on bans like: <em class="text-italics">*!*@id-306017.charlton.irccloud.com</em> or <em class="text-italics">*!*<a href="mailto:uid306017@id-306017.charlton.irccloud.com">uid306017@id-306017.charlton.irccloud.com</a></em> try it with replacing:<div class="codebox"><p>Code: </p><pre><code>if {[regexp {\d+} $u x]} {if {[regexp {id-(\d+).(.*?).irccloud.com} $h - y]} {if {[string equal $x $y]} {pushmode $ch +b "*!$u@*"}}}</code></pre></div>with:<div class="codebox"><p>Code: </p><pre><code>if {[regexp {id-(\d+).(.*?).irccloud.com} $h - x]} {foreach n [chanlist $ch] {if {[isbotnick $n]} continueif {[isop $n $ch] || [isvoice $n $ch] || [validuser [nick2hand $n]]} continuescan [getchanhost $n $ch] {%[^@]@%s} user hostif {[regexp {\d+} $user y]} {if {[string equal $x $y]} {pushmode $ch +b "*!$user@*"}}}}</code></pre></div>Or even better can add another regexp that will first check if the <em class="text-italics">user</em> part in the ban matches the sid/uid pattern and set a ban on whatever is there, basically triggering on *!*<a href="mailto:uid306017@id-306017.charlton.irccloud.com">uid306017@id-306017.charlton.irccloud.com</a> or *!uid306017@1.2.3.4 and setting a ban on *!*uid306017@* or *!uid306017@* respectively instead. So, the code becomes:<div class="codebox"><p>Code: </p><pre><code>if {[regexp {[su]id\d+} $u]} {pushmode $ch +b "*!$u@*"} elseif {[regexp {id-(\d+).(.*?).irccloud.com} $h - x]} {   foreach n [chanlist $ch] {      if {[isbotnick $n]} continue      if {[isop $n $ch] || [isvoice $n $ch] || [validuser [nick2hand $n]]} continue      scan [getchanhost $n $ch] {%[^@]@%s} user host      if {[regexp {\d+} $user y]} {               if {[string equal $x $y]} {            pushmode $ch +b "*!$user@*"         }      }   }}</code></pre></div>Haven't tested anything so let me know the results.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Jul 24, 2018 3:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2018-07-24T03:46:29-04:00</updated>

		<published>2018-07-24T03:33:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106959#p106959</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106959#p106959"/>
		<title type="html"><![CDATA[irccloud banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106959#p106959"><![CDATA[
tested again it seems to work for <br><br>SlMO  Sets Mode on  #Test  to:  +b *!*<a href="mailto:uid306017@id-306017.charlton.irccloud.com">uid306017@id-306017.charlton.irccloud.com</a> <br><br> @Cappuccino  Sets Mode on  #Test  to:  -b+b *!*<a href="mailto:uid306017@id-306017.charlton.irccloud.com">uid306017@id-306017.charlton.irccloud.com</a> *!*uid306017@* <br><br><br>but not for  <br><br>SlMO  Sets Mode on  #Test  to:  +b *!*@id-306017.charlton.irccloud.com <br>  @Cappuccino  Sets Mode on  #Test  to:  -b *!*@id-306017.charlton.irccloud.com <br><br><br>since last one has ident in host as well wich is the same as having it set with ident as well in other words if possible it would help if it would set ident as well when +b *!*@id-306017.charlton.irccloud.com is set to trigger as well since it has unique id of user in it  as well <br><br>other than that it seems  fine<br><br>thank you caesar<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Tue Jul 24, 2018 3:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2018-07-24T02:02:20-04:00</updated>

		<published>2018-07-24T02:02:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106957#p106957</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106957#p106957"/>
		<title type="html"><![CDATA[irccloud banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106957#p106957"><![CDATA[
I loaded the code I posted and here are my results.<br><br>Case #1: there's no <em class="text-italics">user</em> in the ban, so nothing happens (it stops at first regexp)<div class="codebox"><p>Code: </p><pre><code>[08:51] * cez sets mode: +b *!*@charlton.irccloud.com[08:51] * Bot sets mode: -b *!*@charlton.irccloud.com</code></pre></div>Case #2: we got an <em class="text-italics">user</em> but the <em class="text-italics">host</em> doesn't match the pattern, meaning it doesn't have an id-xxx.something.irccloud.com in it.<div class="codebox"><p>Code: </p><pre><code>[08:52] * cez sets mode: +b *!uid311697@charlton.irccloud.com[08:52] * Bot sets mode: -b *!uid311697@charlton.irccloud.com</code></pre></div>Case #3: the <em class="text-italics">user</em> and <em class="text-italics">host</em> match the patterns and the two numbers are equal so the bot sets a ban on <em class="text-italics">user</em> instead (*!uid306017@*)<div class="codebox"><p>Code: </p><pre><code>[08:53] * cez sets mode: +b *!uid306017@id-306017.charlton.irccloud.com[08:53] * Bot sets mode: -b+b *!uid306017@id-306017.charlton.irccloud.com *!uid306017@*</code></pre></div>Case #4: the <em class="text-italics">user</em> and <em class="text-italics">host</em> match the patterns BUT the two numbers aren't equal so nothing happens.<div class="codebox"><p>Code: </p><pre><code>[08:53] * cez sets mode: -b *!uid306017@*[08:53] * cez sets mode: +b *!uid306017@id-306018.charlton.irccloud.com[08:53] * Bot sets mode: -b *!uid306017@id-306018.charlton.irccloud.com</code></pre></div>I can't test with a kick but I'm sure it works as expected.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Jul 24, 2018 2:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2018-07-23T22:52:01-04:00</updated>

		<published>2018-07-23T22:52:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106956#p106956</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106956#p106956"/>
		<title type="html"><![CDATA[irccloud banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106956#p106956"><![CDATA[
the results i got was from using the final code u posted<br><br>and i always restart bot after loading new code and disabling old<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Jul 23, 2018 10:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2018-07-23T13:02:31-04:00</updated>

		<published>2018-07-23T13:02:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106955#p106955</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106955#p106955"/>
		<title type="html"><![CDATA[irccloud banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106955#p106955"><![CDATA[
Your results doesn't make any sense because the first regexp in the <em class="text-italics">ircCloudBan</em> function should return 0 because there's no number in the ident so most likely you got some older code. Should restart the bot so things are re-loaded as should.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jul 23, 2018 1:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2018-07-23T10:38:03-04:00</updated>

		<published>2018-07-23T10:38:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106954#p106954</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106954#p106954"/>
		<title type="html"><![CDATA[irccloud banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106954#p106954"><![CDATA[
i tested final code and it seems it sets ident ban on a banmask like <br><br><br>simo sets Mode on  #Cappuccino  to:  +b *!*@*.irccloud.com<br>@Cappuccino  Sets Mode on  #Cappuccino  to:  -b+b *!*@*.irccloud.com *!uid311697@* <br><br>simo Sets Mode on  #Cappuccino  to:  +b *!*@charlton.irccloud.com<br>@Cappuccino  Sets Mode on  #Cappuccino  to:  -b+b *!*@charlton.irccloud.com *!uid311697@* <br><br><br>while banmasks doesnt have any id in it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Jul 23, 2018 10:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2018-07-23T07:44:40-04:00</updated>

		<published>2018-07-23T07:44:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106953#p106953</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106953#p106953"/>
		<title type="html"><![CDATA[irccloud banmask]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106953#p106953"><![CDATA[
This piece of code:<div class="codebox"><p>Code: </p><pre><code>if {[regexp {\d+} $u x]} {if {[regexp {id-(\d+).(.*?).irccloud.com} $h - y]} {if {[string equal $x $y]} {pushmode $ch +b "*!$u@*"}}   }</code></pre></div>was intended to be put inside <em class="text-italics">ircCloudBan</em> before/after the<div class="codebox"><p>Code: </p><pre><code>pushmode $ch -b $banmask</code></pre></div>and not inside <em class="text-italics">ircCloudKick</em> because the:<div class="codebox"><p>Code: </p><pre><code>if {$match} {pushmode $ch +b "*!$u@*"}</code></pre></div>is more than enough to do the intended job, as it grabs the nick!user@host from the trigger when a member just got kicked (where nick, user and host will always hold a value), unlike in the ban part where the nick!user@host is taken from what a channel operator sets (where nick, user and host won't always hold a value and can be * for instance).<br><br>If you want to adjust the second part to make sure you got an uid123456 or sid123456 format in the user part then make it:<div class="codebox"><p>Code: </p><pre><code>if {$match} {if {[regexp {[su]id\d+} $u]} {pushmode $ch +b "*!$u@*"}}</code></pre></div>Basically this ensures that it will set a ban on *!uid306017@* from  <a href="mailto:uid306017@id-306017.charlton.irccloud.com">uid306017@id-306017.charlton.irccloud.com</a>, *!~sid154238@* from ~sid154238@2001:67c<img alt=":2f08:" class="emoji smilies" draggable="false" src="//cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/2f08.svg">1::2:5a7e, but won't set a ban on *!aid123456@* from <a href="mailto:aid123456@something.fake.irccloud.com">aid123456@something.fake.irccloud.com</a> for example.<br><br>In the example you gave:<blockquote class="uncited"><div>[19:08] * Joins: OnT (<a href="mailto:uid1420156@id-140156.ealing.irccloud.com">uid1420156@id-140156.ealing.irccloud.com</a>)<br>[19:10] * user1 sets mode: +b *!*@id-140156.ealing.irccloud.com</div></blockquote>When the *!*@id-140156.ealing.irccloud.com ban is set the bot will check if ident has a number in it, in our case will fail because * is not a number thus will stop.<br><br>Only if OnT is kicked then the bot would do the actual replacing the *!*@id-140156.ealing.irccloud.com ban with *!uid1420156@* inside the kick function because it grabs the actual ident from the kick trigger and it matches the given pattern.<br><br>Final code:<div class="codebox"><p>Code: </p><pre><code>## ircCloudBan v.0.3 ##set ircSkip {*.irccloud.com192.184.9.108192.184.9.110192.184.9.112192.184.10.118192.184.10.9192.184.8.73192.184.8.102001:67c:2f08*2001*67c*2f08*} bind mode - "#% +b" ircCloudBanbind kick - * ircCloudKickproc ircCloudBan {nk uh hn ch md banmask} {if {![botisop $ch]} returnglobal ircSkipset match 0scan $banmask {%[^!]!%[^@]@%s} n u hforeach host $ircSkip {if {![string match -nocase $host $h]} continueincr matchbreak}if {$match} {pushmode $ch -b $banmaskif {[regexp {\d+} $u x]} {   if {[regexp {id-(\d+).(.*?).irccloud.com} $h - y]} {  if {[string equal $x $y]} { pushmode $ch +b "*!$u@*"  }   }   }set ::irccloudban $banmask}}proc ircCloudKick {nk uh hn ch target why} {if {![info exists ::irccloudban]} returnif {![botisop $ch]} returnset chhost [getchanhost $target $ch]global ircSkipset match 0if {[scan $chhost {%[^@]@%s} u h] != 2} returnforeach host $ircSkip {if {![string match -nocase $host $h]} continueincr matchbreak}if {$match} {   if {[regexp {[su]id\d+} $u]} {  pushmode $ch +b "*!$u@*"   }}   unset ::irccloudban}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jul 23, 2018 7:44 am</p><hr />
]]></content>
	</entry>
	</feed>
