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

	<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>2011-10-05T12:31:56-04:00</updated>

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

		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2011-10-05T08:43:04-04:00</updated>

		<published>2011-10-05T08:43:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97844#p97844</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97844#p97844"/>
		<title type="html"><![CDATA[Any way to ignore emails ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97844#p97844"><![CDATA[
Well, this solution is good for me, I didn't notice the bind LOG in 1.6.20.<br><br>I'll use it, peharps a new tcl will come soon <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> — Wed Oct 05, 2011 8:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2011-10-05T12:31:56-04:00</updated>

		<published>2011-10-04T13:06:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97840#p97840</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97840#p97840"/>
		<title type="html"><![CDATA[Any way to ignore emails ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97840#p97840"><![CDATA[
In 1.6.20, you could completely replace the logfile writers with tcl-code using the LOG binding. A very rough implementation would be something like this:<div class="codebox"><p>Code: </p><pre><code>bind log - * myLogWriterproc myLogWriter {level channel message} {  #Select which file to write the log entry to. This one is based on the channel name.  switch -exact -- [string tolower $channel] {    "#channel1" {set file "channel1"}    "#channel2" {set file "channel2"}    default {set file "eggdrop"}  }  set fileId [open "logs/${file}.log" "APPEND CREAT WRONLY"]  #do regexp's, etc, on message here...  #...  puts $fileId "[strftime {[%d %b %Y - %H:%M]}] $level: $message"  close $fileId}</code></pre></div>It doesn't exactly match eggdrop's logging format, but that could fairly easily be adopted. This could also be re-written to send all log entries to an SQL-database or syslog.<br><br>It's not quite what you asked for, but you could implement a similar solution using modules as well. As for the actual logging code, it's mainly located in src/misc.c along with other misc stuff...<br><br>edit: Fixed typo in <strong class="text-strong">switch</strong>: Should be <em class="text-italics">-exact</em>, not <em class="text-italics">--exact</em><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Tue Oct 04, 2011 1:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2011-10-04T09:14:01-04:00</updated>

		<published>2011-10-04T09:14:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97837#p97837</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97837#p97837"/>
		<title type="html"><![CDATA[Any way to ignore emails ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97837#p97837"><![CDATA[
Hello there,<br><br>I'm looking for a way to modify the logfile generated with eggdrop. I want to replace any email by a string, like &lt;email&gt; (or anything else.<br>So, I'm looking on the way to create a module overriding the logging system to apply a regexp replace.<br>But, I can't find out the way actually.<br><br>If anyone of you could give me a small help (a start point ?), I think I'll do that soon.<br><br>Regards<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Tue Oct 04, 2011 9:14 am</p><hr />
]]></content>
	</entry>
	</feed>
