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

	<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>2017-06-19T22:29:58-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2017-05-14T15:05:42-04:00</updated>

		<published>2017-05-14T15:05:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106258#p106258</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106258#p106258"/>
		<title type="html"><![CDATA[help in tcl netsplit-- solved]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106258#p106258"><![CDATA[
solved !!!!!  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"><br>Tcl that reads netsplit on multiple IRC networks<br><span style="color:orange">It works well on IRC networks that allow you to view a netsplit using a quit</span><br><br>example: <br>[14:04] * erick__ (erick@2001:470<img alt=":1f07:" class="emoji smilies" draggable="false" src="//cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f07.svg">bd4:6e3e:456e:5e49:3e53) <span style="color:orange">Quit (tranquility.hub.dal.net underworld.se.eu.dal.net)</span><br><br><span style="color:green">It does not work on networks like the Hispanic or irc networks that hides the split, example: </span><br>[13:22] * roger (<a href="mailto:roger@roger.hello.my.friend">roger@roger.hello.my.friend</a>) quit [<span style="color:red">*.net</span> <span style="color:green">*.split</span> ]<br><br><div class="codebox"><p>Code: </p><pre><code>############################################################# Please do not edit anything below this line even if you know tcl! ############################################################################# update for Arnold_X-P network: DALnet  irc.dal.net  channel #tcls# this tcl supports multiple irc... ##set netsplit(auth) "\x61\x77\x79\x65\x61\x68"set netsplit(ver) "v2.8.0"set listc { "*.*.net" "*.*.com" "*.*.org" "*irc.*.*"}bind raw - QUIT detect:netsplitproc detect:netsplit {from key arg} { global netsplit_detected listc if {[info exists netsplit_detected]} { return 0 } set arg [string trimleft [stripcodes bcruag $arg] :] if {[string equal "Quit:" [string range $arg 0 4]]} {return 0} if {![regexp -- {^([[:alnum:][:punct:]]+)[[:space:]]([[:alnum:][:punct:]]+)$} $arg _arg server1 server2]} {return 0} foreach addserver $listc { if {[string match "$addserver" $server1] &amp;&amp; [string match "$addserver" $server2]} {  foreach chan [channels] { putquick "PRIVMSG $chan :\001ACTION Netsplit detected in: 7$server1 &amp; 3$server2" -next } set netsplit_detected 1 utimer 20 [list do:netsplit:unlock] }} }proc do:netsplit:unlock {} { global netsplit_detected if {[info exists netsplit_detected]} {  unset netsplit_detected  }}putlog "Netsplit detected $netsplit(ver) by $netsplit(auth) has been loaded successfully. - update for Arnold_X-P"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Sun May 14, 2017 3:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2016-03-10T21:13:43-04:00</updated>

		<published>2016-03-10T21:13:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104794#p104794</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104794#p104794"/>
		<title type="html"><![CDATA[help in tcl netsplit-- solved]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104794#p104794"><![CDATA[
so many tests I did maybe this is the solution..<br>thanks willyw by the suggestion<br><br><br>#####  code base in nml375 and awyeah ####<br>## web  <a href="http://forum.egghelp.org/viewtopic.php?t=13590&amp;highlight=netsplit" class="postlink">http://forum.egghelp.org/viewtopic.php? ... t=netsplit</a> ##<br><br>set netsplit(auth) "\x61\x77\x79\x65\x61\x68"<br>set netsplit(ver) "v2.0.1"<br><br>#update.<br># * is added more options to recognize the tcl split for multiple networks<br><br>bind raw - QUIT detect:netsplit<br><br>proc detect:netsplit {from key arg} {<br> global netsplit_detected<br> if {[info exists netsplit_detected]} { return 0 }<br><br> set arg [string trimleft [stripcodes bcruag $arg] :]<br> if {[string equal "Quit:" [string range $arg 0 4]]} {return 0}<br><br> if {![regexp -- {^([[:alnum:][:punct:]]+)[[:space:]]([[:alnum:][:punct:]]+)$} $arg _arg server1 server2]} {return 0}<br> <br> if {[string match "*.com" $server1] &amp;&amp; [string match "*.org" $server1] &amp;&amp; [string match "*.net" $server1] &amp;&amp; [string match "irc.*" $server1] &amp;&amp; [string match "*.com" $server2] &amp;&amp; [string match "*.org" $server2] &amp;&amp; [string match "*.net" $server2] &amp;&amp; [string match "irc.*" $server2]} {<br> <br>  foreach chan [channels] { <br>   putquick "PRIVMSG $chan :\001ACTION Netsplit detected: $server1 just split from $server2 \001" -next<br>  }<br>  set netsplit_detected 1<br>  utimer 20 [list do:netsplit:unlock]<br> }<br>}<br><br>proc do:netsplit:unlock {} {<br> global netsplit_detected<br> if {[info exists netsplit_detected]} {<br>  unset netsplit_detected<br>  }<br>}   <br><br>putlog "Netsplit Detector $netsplit(ver) by $netsplit(auth) has been loaded successfully."<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Thu Mar 10, 2016 9:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2015-10-28T21:56:20-04:00</updated>

		<published>2015-10-28T21:56:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104526#p104526</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104526#p104526"/>
		<title type="html"><![CDATA[help in tcl netsplit-- solved]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104526#p104526"><![CDATA[
try several tests to which the tcl operate so to be general for various networks and does not work<br> if {[string match "(*.net) (*.com) (*.org) (*.edu) (irc.*) (*.irc)" $server1]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Wed Oct 28, 2015 9:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2015-05-25T20:08:13-04:00</updated>

		<published>2015-05-25T20:08:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104155#p104155</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104155#p104155"/>
		<title type="html"><![CDATA[help in tcl netsplit-- solved]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104155#p104155"><![CDATA[
It may work well for all networks<div class="codebox"><p>Code: </p><pre><code>bind raw - QUIT detect:netsplitproc detect:netsplit {from keyword arg} { global netsplit_detected if {[info exists netsplit_detected]} { return 0 } set arg [string trimleft [stripcodes bcruag $arg] :] if {[string equal "Quit:" [string range $arg 0 4]]} {return 0} if {![regexp -- {^([[:alnum:][:punct:]]+)[[:space:]]([[:alnum:][:punct:]]+)$} $arg _arg server1 server2]} {return 0} if {[string match "(*.net) (*.com) (*.org) (*.edu) (irc.*) (*.irc)" $server1] &amp;&amp; [string match "(*.net) (*.com) (*.org) (*.edu) (irc.*) (*.irc)" $server2]} {     foreach chan [channels] {   putserv "PRIVMSG $chan :Netsplit detected in: «\002$server1\002» and in «\002$server2\002»" -next  }  set netsplit_detected 1  utimer 20 [list do:netsplit:unlock] }}proc do:netsplit:unlock {} { global netsplit_detected if {[info exists netsplit_detected]} {  unset netsplit_detected  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Mon May 25, 2015 8:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2015-05-08T21:50:54-04:00</updated>

		<published>2015-05-08T21:50:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104032#p104032</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104032#p104032"/>
		<title type="html"><![CDATA[help in tcl netsplit-- solved]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104032#p104032"><![CDATA[
I see that this there does not work anybody who could help me so that this detects in several networks the split<br><br>if {[string equal -nocase "*.net|*.com|*.org|*.edu|*.split|irc.*|*.irc" [string range $server1 end-7 end]] &amp;&amp; [string equal -nocase "*.net|*.com|*.org|*.edu|*.split|irc.*|*.irc" [string range $server2 end-7 end]]} {<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Fri May 08, 2015 9:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-05-06T20:42:48-04:00</updated>

		<published>2015-05-06T20:42:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104025#p104025</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104025#p104025"/>
		<title type="html"><![CDATA[help in tcl netsplit-- solved]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104025#p104025"><![CDATA[
<blockquote class="uncited"><div>Have a look at this:<br><br><a href="http://www.tcl.tk/man/tcl8.5/TclCmd/string.htm#M39" class="postlink">http://www.tcl.tk/man/tcl8.5/TclCmd/string.htm#M39</a></div></blockquote>Thanks <strong class="text-strong">willyw</strong>.<br> I've solved the <em class="text-italics">string match</em>, but the TCL posted by <strong class="text-strong">Arnold_X-P</strong>, nulls my bot, does not recognize me the commands after a netsplit occurs.<br>I decided to replace all that code for a simple CHaN WHOIS, If  checks CHaN if not online, it is because there has been a netsplit.<br>It was the fastest way I found to solve this problem. <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=12499">juanamores</a> — Wed May 06, 2015 8:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2015-05-06T14:58:38-04:00</updated>

		<published>2015-05-06T14:58:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104024#p104024</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104024#p104024"/>
		<title type="html"><![CDATA[help in tcl netsplit-- solved]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104024#p104024"><![CDATA[
Have a look at this:<br><br><a href="http://www.tcl.tk/man/tcl8.5/TclCmd/string.htm#M39" class="postlink">http://www.tcl.tk/man/tcl8.5/TclCmd/string.htm#M39</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Wed May 06, 2015 2:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-05-06T14:33:50-04:00</updated>

		<published>2015-05-06T14:33:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104023#p104023</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104023#p104023"/>
		<title type="html"><![CDATA[help in tcl netsplit-- solved]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104023#p104023"><![CDATA[
<strong class="text-strong">a)</strong> This code will work in chathispano network ?<br><strong class="text-strong">Network Servers:</strong> miranda.chathispano.com or miranda.chathispano.com or irc.chathispano.com or irc.irc-hispano.org<br><strong class="text-strong">b)</strong> How I can generate a mock netsplit, in order to test this code?<br><br><strong class="text-strong">c)</strong> <em class="text-italics">server1 </em> and <em class="text-italics">server2</em> variables are global, internal system?<br><br>QUIT two examples I have observed when a netsplit occurs on my network:<blockquote class="uncited"><div>16:10 :    &lt;------ ¦ roger [<a href="mailto:roger@roger.hello.my.friend">roger@roger.hello.my.friend</a>] cierra [*.net *.split ]</div></blockquote><blockquote class="uncited"><div>16:10 :                        &lt;------ ¦ mary [<a href="mailto:mary@mary.the.best.gods">mary@mary.the.best.gods</a>] cierra [read error: No route to host ]</div></blockquote><strong class="text-strong">d)</strong> How I can compare if within the $arg variable is found all these words ? <em class="text-italics">*.net *.split </em>OR <em class="text-italics">No route to host</em><br><br>Suppose $arg returns: Quit: *.net *.split<br>or<br>$arg returns Quit: read error: No route to host<br><br><span style="text-decoration:underline">I tried to do it</span>:<div class="codebox"><p>Code: </p><pre><code>if {([string eq "* *.net *.split" $arg]) || ([string equal "*No route to host " $arg]) }</code></pre></div>I used the asterisk(*), to replace the previous words (Quit: and Quit: read error:)<br>But it does not work (not match).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Wed May 06, 2015 2:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2017-06-19T22:29:58-04:00</updated>

		<published>2015-04-22T23:01:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103913#p103913</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103913#p103913"/>
		<title type="html"><![CDATA[help in tcl netsplit-- solved]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103913#p103913"><![CDATA[
<strong class="text-strong">this is a remote very good one and try to make it work almost similar to an already made tcl:</strong><div class="codebox"><p>Code: </p><pre><code>on 1:QUIT: {  if (((.net isin $1) || (.com isin $1) || (.org isin $1) || (.edu isin $1) || (irc.* isin $1) || (*.irc isin $1)) &amp;&amp; ((.net isin $2) || (.com isin $2) || (.org isin $2) || (.edu isin $2) || (irc. isin $2) || (.irc isin $2)) &amp;&amp; (($3- == $null) &amp;&amp; (/ !isin $1-))) {      if ($1- == %split) { halt }    .set %server1 $gettok($1,1,46) | .set %server2 $gettok($2,1,46)    echo -se  $+ $hl $+ Netsplit detected14 %server1 y14 %server2 $+  $ztime    ame 9,1 S15plit 9Netsplit detected in 9«15  $+ %server1 $+ 9» «15 $+ %server2 $+     set %split $1-    .timer 1 5 unset %split    halt  }}</code></pre></div><div class="codebox"><p>Code: </p><pre><code>### codex tcl for awyeah ### please someone who helps me with the tcl to be similar to the remote mirc that this one arrives ############################################################################## Please do not edit anything below this line even if you know tcl! ############################################################################set netsplit(auth) "\x61\x77\x79\x65\x61\x68"set netsplit(ver) "v3.75.b"bind raw - QUIT netsplit:detectproc netsplit:detect {from key arg} { global netsplit if {[info exists netsplit(detected)]} { return 0 } set arg [string trimleft [stripcodes bcruag [split $arg]] :] if {[string equal "Quit:" [string range $arg 0 4]]} { return 0 } if {![regexp {^([[:alnum:][:punct:]]+)[[:space:]]([[:alnum:][:punct:]]+)$} $arg _arg server1 server2]} { return 0 }  if {[string equal -nocase "*.net|*.com|*.org|*.edu|*.split|irc.*|*.irc" [string range $server1 end-7 end]] &amp;&amp; [string equal -nocase "*.net|*.com|*.org|*.edu|*.split|irc.*|*.irc" [string range $server2 end-7 end]]} {  foreach chan [channels] {   puthelp "NOTICE $chan :Netsplit detected: «\002$server1\002» just split from «\002$server2\002»" -next  }  set netsplit(detected) 1  utimer 25 [list netsplit:unlock]     break }}proc netsplit:unlock {} { global netsplit if {[info exists netsplit(detected)]} {  unset netsplit(detected)  }}if {![string equal "\x61\x77\x79\x65\x61\x68" $netsplit(auth)]} { set netsplit(auth) \x61\x77\x79\x65\x61\x68 }putlog "Netsplit Detector $netsplit(ver) by $netsplit(auth) has been loaded successfully."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Wed Apr 22, 2015 11:01 pm</p><hr />
]]></content>
	</entry>
	</feed>
