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

	<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>2012-09-23T15:10:11-04:00</updated>

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

		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2012-09-23T15:10:11-04:00</updated>

		<published>2012-09-23T15:10:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100046#p100046</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100046#p100046"/>
		<title type="html"><![CDATA[Enlisting operators]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100046#p100046"><![CDATA[
I'm reading your first post and i don't get it why script should write to both files? <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=10332">tomekk</a> — Sun Sep 23, 2012 3:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ManNose]]></name></author>
		<updated>2012-09-23T15:03:04-04:00</updated>

		<published>2012-09-23T15:03:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100045#p100045</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100045#p100045"/>
		<title type="html"><![CDATA[Enlisting operators]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100045#p100045"><![CDATA[
It works, but it only writes to one text file, how come?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12071">ManNose</a> — Sun Sep 23, 2012 3:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2012-09-23T13:16:42-04:00</updated>

		<published>2012-09-23T13:16:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100044#p100044</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100044#p100044"/>
		<title type="html"><![CDATA[Enlisting operators]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100044#p100044"><![CDATA[
Yes, script is working OK because you didn't mention about flood protect <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>check this fixed ver.:<div class="codebox"><p>Code: </p><pre><code># Author: tomekk# e-mail:  tomekk/@/oswiecim/./eu/./org# home page: http://tomekk.oswiecim.eu.org/## Version 0.1## This file is Copyrighted under the GNU Public License.# http://www.gnu.org/copyleft/gpl.html# if you want to use this script on your chan, type in eggdrop console (via telnet or DCC chat)# .chanset #channel_name +opers# and later .save# min operator nickname length (ex. @, example: @mark = 4 chars)set min_oper_nick_len 2# oper nicks fileset oper_file "/home/user/eggdrop/operators.txt"# new oper nicks fileset chan_oper_file "/home/user/eggdrop/channelOperators.txt"##############################################################bind pubm - "*" pharse_parsesetudef flag opersset get_opers [open $oper_file r]set all_opers [split [read $get_opers] "\n"]close $get_opersproc check_oper { oper } {        global chan_oper_file        set get_new_opers [open $chan_oper_file r]        set all_new_opers [split [read $get_new_opers] "\n"]        close $get_new_opers        set there_is_one "no"        foreach new_oper $all_new_opers {                if {$new_oper == $oper} {                        set there_is_one "yes"                        break;                }        }        return $there_is_one}proc save_oper { oper } {        global chan_oper_file        set append_hand [open $chan_oper_file a]        puts $append_hand $oper        close $append_hand}proc pharse_parse { nick uhost hand chan arg } {        global all_opers min_oper_nick_len        if {![channel get $chan opers]} {                return        }        regsub -all -nocase {(@)} $arg "\n@" arg        set separate_it [split $arg "\n"]        if {[llength $separate_it] &gt; 1} {                foreach word $separate_it {                        if {[regexp -nocase {^@} $word]} {                                set pharse_oper [string trim [lindex [split $word] 0]]                                if {[string length $pharse_oper] &gt; [expr $min_oper_nick_len + 1]} {                                        regsub -nocase {@} $pharse_oper "" pharse_oper                                        set oper_exists 0                                        foreach [string trim operator] $all_opers {                                                if {$operator == $pharse_oper} {                                                        set oper_exists 1                                                        break;                                                }                                        }                                        if {$oper_exists == 0} {                                                if {[check_oper $pharse_oper] == "no"} {                                                        save_oper $pharse_oper                                                }                                        }                                }                        }                }        }}putlog "operpharse.tcl ver 0.1 by tomekk loaded"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Sun Sep 23, 2012 1:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ManNose]]></name></author>
		<updated>2012-09-23T13:02:32-04:00</updated>

		<published>2012-09-23T13:02:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100043#p100043</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100043#p100043"/>
		<title type="html"><![CDATA[Enlisting operators]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100043#p100043"><![CDATA[
Hey tomekk, thanks for the script!<br><br>Theres a problem with the code - if I did not write operators to operators.txt, when someone writes @jackie here in the channel and he was not on operators.txt -&gt; it writes him to channelOperators.txt, but if I wrote 10 times the same operator it will write him 10 times to channelOperators.txt<br><br>What I mean is, if @jackie was not in operators.txt, it won't write him to channelOperators AND to operators.txt, so it will write him everytime someone mentions @jackie instead of just one time<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12071">ManNose</a> — Sun Sep 23, 2012 1:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2012-09-23T12:46:40-04:00</updated>

		<published>2012-09-23T12:46:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100042#p100042</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100042#p100042"/>
		<title type="html"><![CDATA[Enlisting operators]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100042#p100042"><![CDATA[
check this:<div class="codebox"><p>Code: </p><pre><code># Author: tomekk# e-mail:  tomekk/@/oswiecim/./eu/./org# home page: http://tomekk.oswiecim.eu.org/## Version 0.1## This file is Copyrighted under the GNU Public License.# http://www.gnu.org/copyleft/gpl.html# if you want to use this script on your chan, type in eggdrop console (via telnet or DCC chat)# .chanset #channel_name +opers# and later .save# min operator nickname length (ex. @, example: @mark = 4 chars)set min_oper_nick_len 2# oper nicks fileset oper_file "/home/user/eggdrop/operators.txt"# new oper nicks fileset chan_oper_file "/home/user/eggdrop/channelOperators.txt"##############################################################bind pubm - "*" pharse_parsesetudef flag opersset get_opers [open $oper_file r]set all_opers [split [read $get_opers] "\n"]close $get_opersproc save_oper { oper } {        global chan_oper_file        set append_hand [open $chan_oper_file a]        puts $append_hand $oper        close $append_hand}proc pharse_parse { nick uhost hand chan arg } {        global all_opers min_oper_nick_len        if {![channel get $chan opers]} {                return        }        regsub -all -nocase {(@)} $arg "\n@" arg        set separate_it [split $arg "\n"]        if {[llength $separate_it] &gt; 1} {                foreach word $separate_it {                        if {[regexp -nocase {^@} $word]} {                                set pharse_oper [string trim [lindex [split $word] 0]]                                if {[string length $pharse_oper] &gt; [expr $min_oper_nick_len + 1]} {                                        regsub -nocase {@} $pharse_oper "" pharse_oper                                        set oper_exists 0                                        foreach [string trim operator] $all_opers {                                                if {$operator == $pharse_oper} {                                                        set oper_exists 1                                                        break;                                                }                                        }                                        if {$oper_exists == 0} {                                                save_oper $pharse_oper                                        }                                }                        }                }        }}putlog "operpharse.tcl ver 0.1 by tomekk loaded"</code></pre></div>operators.txt:<br>nick1<br>nick2<br>etc.<br><br>channelOperators:<br>nick1<br>nick2<br>etc.<br><br>Without @ at the beginning.<br>Script will work even with "lalala @nickname;)" - i mean, there is no filter for special chars in the nicknames ;&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Sun Sep 23, 2012 12:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ManNose]]></name></author>
		<updated>2012-09-22T12:35:13-04:00</updated>

		<published>2012-09-22T12:35:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100041#p100041</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100041#p100041"/>
		<title type="html"><![CDATA[Enlisting operators]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100041#p100041"><![CDATA[
Yes, exactly<br><br>but it can also be<br>"i was at the lalala @asdlkfj34o5irtwejf somewhere @tomekk" <br>and then both @tomekk and @asdlkfj34o5irtwejf will be in the list<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12071">ManNose</a> — Sat Sep 22, 2012 12:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2012-09-22T12:09:37-04:00</updated>

		<published>2012-09-22T12:09:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100040#p100040</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100040#p100040"/>
		<title type="html"><![CDATA[Enlisting operators]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100040#p100040"><![CDATA[
What when someone will write something like this:<br><br>"i was at the lalala @asdlkfj34o5irtwejf somewhere"<br><br>'@asdlkfj34o5irtwejf' will be the nickname right?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Sat Sep 22, 2012 12:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ManNose]]></name></author>
		<updated>2012-09-18T13:06:31-04:00</updated>

		<published>2012-09-18T13:06:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100030#p100030</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100030#p100030"/>
		<title type="html"><![CDATA[Enlisting operators]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100030#p100030"><![CDATA[
I've asked nicely <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12071">ManNose</a> — Tue Sep 18, 2012 1:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ManNose]]></name></author>
		<updated>2012-09-07T18:51:48-04:00</updated>

		<published>2012-09-07T18:51:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99993#p99993</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99993#p99993"/>
		<title type="html"><![CDATA[Enlisting operators]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99993#p99993"><![CDATA[
Please?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12071">ManNose</a> — Fri Sep 07, 2012 6:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ManNose]]></name></author>
		<updated>2012-09-01T02:31:53-04:00</updated>

		<published>2012-09-01T02:31:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99963#p99963</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99963#p99963"/>
		<title type="html"><![CDATA[Enlisting operators]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99963#p99963"><![CDATA[
This is my first ever request so I am hoping I am doing this properly.<br><br>I need a script that when someone writes an operators nickname anywhere in a sentence it will check if the operator is written in operators.txt, if not, the script will write him to channelOperators.txt<br><br>Maybe I should add an example of an input output situation?<br><br>[2000] ManNose: hi @Mark and @Tony how are you?<br><br>If Mark and Tony have already been written before on operators.txt it won't write them to channelOperators.txt (without the @ )<br><br>Another example could be:<br><br>[2000] ManSoe: lol@Mark<br>OR<br>[2100] @Mark@Tony<br><br>That should work too... I mean check if Mark is in the list or not and add if required and add Mark and Tony if required in the second example.<br><br>When adding Mark and Tony the script will add each operator in a seperate line<br><br>@Mark<br>@Tony<br>@SomeoneElse<br><br>If anyone has any question I am here to answer, I hope I wrote this post properly and anticipate a reply, I hope <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=12071">ManNose</a> — Sat Sep 01, 2012 2:31 am</p><hr />
]]></content>
	</entry>
	</feed>
