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

	<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>2003-02-25T19:25:48-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-02-22T14:59:49-04:00</updated>

		<published>2003-02-22T14:59:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16932#p16932</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16932#p16932"/>
		<title type="html"><![CDATA[ohm]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16932#p16932"><![CDATA[
had to fix some fatal bugs (bad expression), which caused the script to not work on tcl 8.3.4 or unix in gernal.<br><br>02-26: 1 more fix...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sat Feb 22, 2003 2:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-02-19T11:05:30-04:00</updated>

		<published>2003-02-19T11:05:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16780#p16780</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16780#p16780"/>
		<title type="html"><![CDATA[Banning Scripts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16780#p16780"><![CDATA[
Danke <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=187">caesar</a> — Wed Feb 19, 2003 11:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-02-19T10:37:58-04:00</updated>

		<published>2003-02-19T10:37:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16779#p16779</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16779#p16779"/>
		<title type="html"><![CDATA[Translation]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16779#p16779"><![CDATA[
<blockquote class="uncited"><div>An english translation? ;]</div></blockquote>na gut <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>eh... i meant: ok <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Wed Feb 19, 2003 10:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-02-19T10:05:15-04:00</updated>

		<published>2003-02-19T10:05:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16778#p16778</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16778#p16778"/>
		<title type="html"><![CDATA[Banning Scripts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16778#p16778"><![CDATA[
An english translation? ;]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Feb 19, 2003 10:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-02-25T19:25:48-04:00</updated>

		<published>2003-02-19T09:56:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16777#p16777</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16777#p16777"/>
		<title type="html"><![CDATA[Banning Scripts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16777#p16777"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>#Script for adding and removing bans to and from the bots intern banlist by privileged persons.#v1.0.4: 26.02.03 fixed logical error in the if expression for -userbans - still unknown why no -b comes tried to fix with ""#v1.0.3: 22.02.03 fixed problems somehow only occuring on unix eggdrops with variables and newchanban return#v1.0.2: 19.02.03 changed texts to be configurable#v1.0.1: 16.02.03 changed priority of other bots bans#v1.0  : 15.02.03 first releaseset banmanagerbanreason "bis zu ${ban-time}min - requested by"#up toset banmanagerillegal "Sorry, diesen Ban kann ich nicht annehmen!"#Sorry, I can't accept this ban!set banmanagernorights "Sorry, ich kenn dich nicht mit irgendwelchen Rechten, die dir das Hinzufügen von Bans gestatten würden."#Sorry, I don't know you having any rights to add a ban.set banmanagernoperm "Sorry, du hast nicht die Rechte den Ban zu entfernen"#Sorry, your don't have the rights to remove this ban#only configuration you'd like to make could be to change german feedback ^-^#no more configuration needed, tried to hold script flexible using global variables## begin of Code - change on your own risk :)#bind mode - "*+b" banmanager:addbind mode - "*-b" banmanager:remproc banmanager:add {nick uhost hand chan mode newban} {  global botnick banmanagerbanreason banmanagerillegal banmanagernorights  if { [matchban $newban $chan] || $nick == "" || $nick == $botnick } { return 0 }#ban is already registered? fine, what else would we want?#till now server bans will be ignored until i figure out how to add them as flagged op, not master  if { [matchattr $hand m|m $chan] || [matchattr $hand o|o $chan] || [matchattr $hand l|l $chan] } {    newchanban $chan $newban $hand "$banmanagerbanreason $hand"    if { [isban $newban $chan] } {      putcmdlog "&lt;$nick@$chan&gt; !$hand! added Channelban $newban"    } else {      pushmode $chan -b $newban      puthelp "NOTICE $nick :$banmanagerillegal"    }#creates the ban with the handle as creator and with standard banlifetime    return 1  } elseif { [lsearch -exact [channel info $chan] -userbans] &gt; -1} {#removing ban if no userbans are allowed on channel and telling the user this    pushmode $chan -b "$newban"    puthelp "NOTICE $nick :$banmanagernorights"  } else { return 2 }}proc banmanager:rem {nick uhost hand chan mode oldban} {  global botnick banmanagernoperm  if { $nick == $botnick &amp;&amp; [lsearch -exact [channel info $chan] +dynamicbans] &gt; -1} { return 0 }#do nothing if ban gets removed by a bot on channels with dynamic bans  set banowner [getbanowner $oldban $chan]  if { $banowner == "*" } {    return 0#ban not registered? who cares... now its away  } elseif { ![validuser $banowner] } { set banowner [finduser -telnet!*@*] }#owner doenst exist? must be from a script. and i hope everyone has the autocreated account with host this host  if { [matchattr $banowner m|m $chan] &amp;&amp; ![matchattr $banowner b] } {#i mean... any owner is master, isnt it?    set ownerrank 3  } elseif { [matchattr $banowner o|o $chan] } {    set ownerrank 2  } elseif { [matchattr $banowner l|l $chan] } {    set ownerrank 1  } else { set ownerrank 0 }  if { [matchattr $hand m|m $chan] &amp;&amp; ![matchattr $banowner b] } {    set handrank 3  } elseif { [matchattr $hand o|o $chan] || $nick == "" } {#nick can only be empty on server mode changes, so lets say server is op    set handrank 2  } elseif { [matchattr $hand l|l $chan] } {    set handrank 1  } else { set handrank 0 }  if { $handrank &gt;= $ownerrank } {    if { ![killchanban $chan $oldban] } {      if {(([matchattr $hand o] || [matchattr $hand n|n $chan]) &amp;&amp; ![isbansticky $oldban]) || [matchattr $hand m]} {#only global ops and channel owner may remove a global ban and non sticky bans        killban $oldban        putcmdlog "&lt;$nick@$chan&gt; !$hand! removed global ban $oldban"        return 1      }    } else {      putcmdlog "&lt;$nick@$chan&gt; !$hand! removed Channelban $oldban"      return 1    }  }  pushmode $chan +b $oldban  if { !($nick == "") } { puthelp "NOTICE $nick :$banmanagernoperm" }  return 1}#this code is sponsered by StormLord @ egghelp.orgproc getbanowner {oldban chan} {  foreach list_of_bans [banlist] {    foreach {ban comment expire created lastact owner} $list_of_bans {      if { $ban == $oldban } {        return $owner      }    }  }  foreach list_of_bans [banlist $chan] {    foreach {ban comment expire created lastact owner} $list_of_bans {      if { $ban == $oldban } {        return $owner      }    }  }  return *}</code></pre></div>suggestions and bug reports are welcome of course <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=2382">De Kus</a> — Wed Feb 19, 2003 9:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Viper359]]></name></author>
		<updated>2003-02-19T09:43:00-04:00</updated>

		<published>2003-02-19T09:43:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16776#p16776</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16776#p16776"/>
		<title type="html"><![CDATA[Banning Scripts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16776#p16776"><![CDATA[
Thanks guys.  I dont think I will attempt a script at it yet, as I am too new, I will start with some simplier scripts, and some tutorials and work my way up.  I already like the ease of getting information and help on here.  Much appreciated.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2708">Viper359</a> — Wed Feb 19, 2003 9:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-02-14T22:17:46-04:00</updated>

		<published>2003-02-14T22:17:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16620#p16620</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16620#p16620"/>
		<title type="html"><![CDATA[Re: StormLord]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16620#p16620"><![CDATA[
thank you, i think ill create the script within the next days based on your code.<br><br>if my suggestion sounds interessting for someone else ill post it after it has passed by own beta test and fit requirements <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Fri Feb 14, 2003 10:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-02-14T18:43:16-04:00</updated>

		<published>2003-02-14T18:43:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16617#p16617</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16617#p16617"/>
		<title type="html"><![CDATA[Banning Scripts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16617#p16617"><![CDATA[
hehe yes.. but that would probably just be more work than creating a new file and put all bans in it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> .. and he wanted EVERY ban logged ... that means that if he was supposed to pull it from the logs he would have to have one BIG log .. or look through ALOT of files... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Fri Feb 14, 2003 6:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-02-14T17:44:56-04:00</updated>

		<published>2003-02-14T17:44:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16613#p16613</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16613#p16613"/>
		<title type="html"><![CDATA[Banning Scripts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16613#p16613"><![CDATA[
<blockquote class="uncited"><div>the problem with caches is that it dissapears if the bot goes down <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">... of course you can store it all in cache but then I would make sure the complete cache is written to a file before rehash, restart, sighterm, kill ..... etc</div></blockquote> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"> <br>but... when the bot starts again, script is runover which reads bot's log file and searches for last bans <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by Guest — Fri Feb 14, 2003 5:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-02-14T17:48:07-04:00</updated>

		<published>2003-02-14T17:42:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16612#p16612</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16612#p16612"/>
		<title type="html"><![CDATA[Re: hmmm]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16612#p16612"><![CDATA[
<blockquote class="uncited"><div>i dunno what he exactly wants, but sounds similar to that i would really like to make. but i am laking knowledge about using tables.</div></blockquote>not even quite <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"> <br><blockquote class="uncited"><div>---snip---<br>and here is my problem. id need a way finding the ban in the bots banlist, if not found returning doing nothing, and if found returning creator handle. in case creator handle is invalid it suggest it is created by script, means <br>by the bot equilant to ban is made by a master.<br>---snip---</div></blockquote>well, you can use (for the good start) something next code for searching banlist <em class="text-italics">*$newban is new ban string from `bind mode'*</em>:<div class="codebox"><p>Code: </p><pre><code>foreach list_of_bans [banlist] {  foreach {ban comment expire created lastact owner} $list_of_bans {     if {[string match $ban $newban]} {         return ($owner)     }  }}</code></pre></div>at this moment i don't have time to write down all script, but you can ask for more help if you get lost in scripting <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by Guest — Fri Feb 14, 2003 5:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-02-14T17:32:31-04:00</updated>

		<published>2003-02-14T17:32:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16610#p16610</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16610#p16610"/>
		<title type="html"><![CDATA[Banning Scripts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16610#p16610"><![CDATA[
the problem with caches is that it dissapears if the bot goes down <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">... of course you can store it all in cache but then I would make sure the complete cache is written to a file before rehash, restart, sighterm, kill ..... etc<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Fri Feb 14, 2003 5:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-02-14T17:08:04-04:00</updated>

		<published>2003-02-14T17:08:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16609#p16609</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16609#p16609"/>
		<title type="html"><![CDATA[Banning Scripts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16609#p16609"><![CDATA[
<blockquote class="uncited"><div>well... if he wants every ban to be recorded and logged he will have to work with files.. and that's really not hard <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"></div></blockquote>well  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"> it depens how often does he want to 'use' the ban data.<br>if it's occasionaly then he can simple use bot's log file to dig into...<br>but, anything more than that I'd advice to keep bans into some kind of cache  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by Guest — Fri Feb 14, 2003 5:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-02-14T12:04:37-04:00</updated>

		<published>2003-02-14T12:04:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16596#p16596</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16596#p16596"/>
		<title type="html"><![CDATA[hmmm]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16596#p16596"><![CDATA[
i dunno what he exactly wants, but sounds similar to that i would really like to make. but i am laking knowledge about using tables.<br><br>i thought i would bind mode +b and -b. on +b it will be checked by handle if this one is half-op, op or higher. then newchanban will be called adding the ban with handle as creator.<br>the -b binding shall check via banlist if the user of -b is same or more privileged than the creator. and here is my problem. id need a way finding the ban in the bots banlist, if not found returning doing nothing, and if found returning creator handle. in case creator handle is invalid it suggest it is created by script, means by the bot equilant to ban is made by a master.<br><br>bonus would be a kick bind which changes the ban reason if the kicked matchs a ban created by him or more privilleged <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">.<br><br>because im scripting is not my job only a small hobby i would prefer a german howto or a simple script which i can copy&amp;paste and change for this job <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Fri Feb 14, 2003 12:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-02-14T11:46:49-04:00</updated>

		<published>2003-02-14T11:46:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16594#p16594</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16594#p16594"/>
		<title type="html"><![CDATA[Banning Scripts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16594#p16594"><![CDATA[
well... if he wants every ban to be recorded and logged he will have to work with files.. and that's really not hard <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Fri Feb 14, 2003 11:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-02-14T10:02:35-04:00</updated>

		<published>2003-02-14T10:02:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16591#p16591</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16591#p16591"/>
		<title type="html"><![CDATA[Banning Scripts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16591#p16591"><![CDATA[
Huh. I dunno is there any such tcl script, but if you are novice in tcl it will be a little harder unless you can manage with arrays.<br>  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by Guest — Fri Feb 14, 2003 10:02 am</p><hr />
]]></content>
	</entry>
	</feed>
