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

	<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-03-08T11:16:32-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2017-03-08T11:16:32-04:00</updated>

		<published>2017-03-08T11:16:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105876#p105876</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105876#p105876"/>
		<title type="html"><![CDATA[[Request &amp; Help] Seen Script with an Exta Feature.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105876#p105876"><![CDATA[
For a script like that you can find one here <a href="https://github.com/MadaliNTCL/eggdrop-tcl/tree/master/seen" class="postlink">https://github.com/MadaliNTCL/eggdrop-t ... aster/seen</a><br><br>and for the NOTICE use the same way t o modify<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Wed Mar 08, 2017 11:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Fahad]]></name></author>
		<updated>2017-03-08T11:12:32-04:00</updated>

		<published>2017-03-08T11:12:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105875#p105875</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105875#p105875"/>
		<title type="html"><![CDATA[[Request &amp; Help] Seen Script with an Exta Feature.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105875#p105875"><![CDATA[
OK thanks does it also says when last person was looking for you?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12648">Fahad</a> — Wed Mar 08, 2017 11:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2017-03-08T10:58:40-04:00</updated>

		<published>2017-03-08T10:58:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105874#p105874</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105874#p105874"/>
		<title type="html"><![CDATA[[Request &amp; Help] Seen Script with an Exta Feature.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105874#p105874"><![CDATA[
Change<br><div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG $channel :</code></pre></div>with<br><div class="codebox"><p>Code: </p><pre><code>putserv "NOTICE $nick:</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Wed Mar 08, 2017 10:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Fahad]]></name></author>
		<updated>2017-03-08T09:57:59-04:00</updated>

		<published>2017-03-08T09:57:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105870#p105870</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105870#p105870"/>
		<title type="html"><![CDATA[[Request &amp; Help] Seen Script with an Exta Feature.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105870#p105870"><![CDATA[
I want this message on NOTICE. How I Enable that?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12648">Fahad</a> — Wed Mar 08, 2017 9:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[King]]></name></author>
		<updated>2016-02-13T12:32:44-04:00</updated>

		<published>2016-02-13T12:32:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104683#p104683</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104683#p104683"/>
		<title type="html"><![CDATA[[Request &amp; Help] Seen Script with an Exta Feature.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104683#p104683"><![CDATA[
Hello world! <br><br>This is a seen script from lee8oi, known as seend. It's working perfectly, but I've improved it a bit, however, since I'm really new to scripting, I'm requesting for help or at least modification done to this script.<br><br>If I may, I'll explain what's the expected results of this. I want the script to be able to show when a user JOIN/PART/QUIT &amp; NICK CHANGE. And also an extra feature which most modern seen scripts lack nowadays, the last message sent by the nick(only if they're in the channel). I'll show examples later, for each event, such as parts and quits, these should show reason and time in duration[ago](Not date).<br><br><span style="text-decoration:underline">Event JOIN </span><br>Once a user joins the channel, !seen should show the following or something similar<br>&lt;~King&gt; !seen John<br>&lt;Bot&gt; <strong class="text-strong">John</strong> was last seen joining the channel 3 hours and 51 minutes ago.<br><br><span style="text-decoration:underline">Event PART</span><br>If a user has left the channel, should also state the reason along with the time(in duration). Example below.<br>&lt;~King&gt; !seen John<br>&lt;Bot&gt; <strong class="text-strong">John</strong> was last seen parting the channel 3 minutes ago. (brb mates!)<br><br><span style="text-decoration:underline">Event QUIT</span><br>Samething, example.<br>&lt;~King&gt; !seen John<br>&lt;Bot&gt; <strong class="text-strong">John</strong> was last seen disconnecting from IRC 5 days and 3 hours ago (Ping timeout 188 seconds)<br><br><span style="text-decoration:underline">Event NICK</span><br>As simple as it can get, this is probably the easiest, example.<br>&lt;~King&gt; !seen John<br>&lt;Bot&gt; <strong class="text-strong">John</strong> was last seen 3 hours and 27 minutes ago changing nickname to <strong class="text-strong">Johnny</strong>, he's still in the channel.<br><br>and<br><br>&lt;~King&gt; !seen Johnny<br>&lt;Bot&gt; <strong class="text-strong">Johnny</strong> was last seen 3 hours and 27 minutes changing nickname from <strong class="text-strong">John</strong>, he's still in the channel.<br><br><strong class="text-strong"><span style="text-decoration:underline">Extra Feature</span></strong><br>Those above events are quite complicated and not easy to script, so you can create it any way you'd like. More importantly, the extra feature that most seen script lacks. A last seen message once the user is still in the channel instead of saying "He's still here" or "John is still in the channel", here's some example.<br><br>&lt;~King&gt; !seen John<br>&lt;Bot&gt; <strong class="text-strong">John</strong> is in the channel! Last seen 1 hour and 13 minutes ago saying: lol that's a nice seen script, never seen one like it before.<br>&lt;~King&gt; !seen Emily<br>&lt;Bot&gt; <strong class="text-strong">Emily</strong> is in the channel! Last seen 3 days and 13 hours ago saying: I believe I can flyyy<br><br>These should be saved on a SeenDatabase.db, not SQL.<br><br>Based on observation, this script haven't created yet for eggdrop, though they're some scripts which may have the parts/joins/quits/nick change, but doesn't have the last seen message.  And this seen script below from lee8oi shows only the last seen message and not parts/joisn/quits/nick changes.<br><br>So, I'm requesting for someone to add parts, joins, quits and nick changes to this since it only consist of the extra feature only, I'd appreciate it and tons of other users will too.<br><br>Here's lee8boi's seend, with a little modification from me.<br><div class="codebox"><p>Code: </p><pre><code>namespace eval seend {######################################################################### Copyright ©2011 lee8oi@gmail.com## This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2 of the License, or# (at your option) any later version.## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU General Public License for more details.# http://www.gnu.org/licenses/## Seend v1.8.3 (8-6-11)# by: &lt;lee8oiAtgmail&gt;&lt;lee8oiOnfreenode&gt;# egghelp forum: http://forum.egghelp.org/viewtopic.php?t=18493# github link: https://github.com/lee8oi/eggdrop/blob/master/seend.tcl## Original Sseend based on:# Sseen v0.2.22 by samu (IRC: samu@pirc.pl)## ----------------------------------------------------------## Seend is a seen script that will tell you how long ago the bot# last seen the specified nick, what channel they were on, and what their# last message was to that channel. It also allows you to do partial# nick searches using * and even lets you .seen yourself!## Seend uses an automatic system for backing up and restoring seen# data. Which also includes the .seend partyline command for manually# backing up and restoring seen data.## In the config section owners can enable/disable: User name prefixing,# displaying last channel, and displaying last message. Also can set# up Not seen responses, bot search for self response, backup file# location/name, automatic backup interval time, toggle seen requests,# interval backup logging, show time as duration, and public &amp; dcc command triggers.## Initial channel setup:# (starts logging and enables .seen command)# .chanset #channel +seend## Public command syntax:# .seen ?nick|help|*?## DCC (partyline) command syntax:# .seend ?backup|restore?## Example Usage:# (public)# &lt;lee8oi&gt; .seen help# &lt;dukelovett&gt; ~Seend 1.8~ Usage: .seen ?nick|help|*?# &lt;lee8oi&gt; .seen# &lt;dukelovett&gt; lee8oi: I last saw you 1 hour 3 minutes 39 seconds ago on# #dukelovett. Last message: Sseen script was awsome. My version improves on it.# &lt;lee8oi&gt; .seen dukelovett# &lt;dukelovett&gt; lee8oi: I last saw myself just now. Right here.# &lt;lee8oi&gt; .seen lee*# &lt;dukelovett&gt; lee8oi: The pattern 'lee*' matches: lee8oi## (console)# &lt;lee8oi&gt; .seend# &lt;dukelovett&gt; ~Seend 1.8~ Usage: Seend ?backup|restore?# &lt;lee8oi&gt; .seend backup# &lt;dukelovett&gt; Seend data backup performed.# &lt;lee8oi&gt; .seend restore# &lt;dukelovett&gt; Seend data restore performed.## Note:# Automatic backup system saves seen data on .die &amp; .restart and# restores data on load. Interval backups are every 15 mins by default.## Thanks:# Thanks to thommey, nml375, and jack3 for their great code suggestions# and all the helpful answers that made this script possible.## Updates:# v1.8# 1. Added configuration for enabling/disabling interval backup logging.# 2. Added configuration to enable/disable showing last seen time as duration.# 3. Created get_info procedure to grab seen info and format the output# message according to configuration.## v1.8 new fixes:# 1. Fixed bug in seend data saving. Script now correctly ignores lines that# start with the currently set public seen command trigger. Which can # now also be set in configuration along with the dcc trigger.# 2. Fixed bug that prevented names with caps from being retrieved correctly# 3. Fixed another bug with caps issues.## ----------------------------------------------------------# CONFIGURATION# ----------------------------------------------------------## Public command trigger variable pubCmd !seen## DCC command triggervariable dccCmd seend## Not Seen Responses## note: Escape special characters with '\' example: '\{'# in the message.### 1.When users supply their own nick or no nick, and bot has NOT seen them:set isUsersOwn "Haven't seen any text from you yet."### 2.When users supply an other nick and bot has NOT seen it yet:set isOtherUser "Either I haven't seen that nick as yet or I'm case sensitive."### 3.When users supply the bots own name:set isBotsName "Idiot, I'm right here!"## ----------------------------------------------------------# Seen Results# (0=disable,1=enable)### 1.Prefix results with users name.variable usename 0### 3.Show last channel in results.variable showchannel 1### 2.Show last message in results.variable showmessage 1### 3.Show last seen time as duration. (1=enable,0=disable)# (off shows date and time instead)variable showduration 1### ----------------------------------------------------------# Backup file### Set relative path to backup file.variable backupfile "scripts/SeendData.tcl"### set backup interval time in minutes.variable interval 15### log interval backups. Uses 'putlog'. (1=enable,0=disable)variable logintervals 0### log .seen requests. Uses 'putlog'. (1=enable,0=disable)variable logseens 0## ----------------------------------------------------------# END CONFIGURATION## NOTE: Only edit below if you know what you are doing. Any# Incorrectly editing code can cause undesirable results.#####################################################################variable isUsersOwn [split $isUsersOwn]variable isOtherUser [split $isOtherUser]variable isBotsName [split $isBotsName]variable lastseenvariable lastchanvariable lastmsgvariable ver "1.8.3"}bind pubm - * ::seend::pub_msg_savebind sign - * ::seend::pub_msg_savebind pub - [set ::seend::pubCmd] ::seend::pub_show_seenbind evnt - prerestart ::seend::prerestartbind evnt - loaded ::seend::loadedbind dcc n [set ::seend::dccCmd] ::seend::dccsetudef flag seendif {![info exists ::seend_dietrace]} {# .die trigger. do backuptrace add execution *dcc:die enter ::seend::backuptrace add execution *msg:die enter ::seend::backup}if {![info exists timer_running]} {# no existing timer. start new one.timer [set seend::interval] ::seend::timer_procset timer_running 1}namespace eval seend {proc restore {args} {# restore from filesource [set seend::backupfile]}proc prerestart {type} {# prerestart trigger. do backup.::seend::backupputlog "Seend data saved."}proc loaded {type} {# bot loaded trigger do restore.::seend::restoreputlog "Seend data restored."}proc timer_proc {args} {# call self at timed intervals. do backup::seend::backuptimer [set seend::interval] ::seend::timer_procif {[set seend::logintervals]} {# logging is enabled.putlog "Interval Seend backup performed."}return 1}proc backup {args} {# backup to file: Write lines to file so it can# be sourced as a script during restore.variable ::seend::lastseenvariable ::seend::lastchanvariable ::seend::lastmsgset fs [open [set seend::backupfile] w+]# write variable lines for loading namespace vars.puts $fs "variable ::seend::lastseen"puts $fs "variable ::seend::lastchan"puts $fs "variable ::seend::lastmsg"# create 'array set' lines using array data.foreach arr {lastseen lastchan lastmsg} {puts $fs "array set $arr [list [array get $arr]]"}close $fs;}proc dcc {handle idx text} {# dcc/partyline .seend commandset text [string tolower [lindex [split $text] 0]]if {$text == "" || $text == "help"} {# show help.variable ::seend::verputdcc $idx "~Seend $ver~ Usage: .[set ::seend::dccCmd] ?backup|restore?"} elseif {$text == "backup"} {# run backup procedure.::seend::backupputdcc $idx "Seend data saved."} elseif {$text == "restore"} {# run restore procedure.::seend::restoreputdcc $idx "Seend data restored."}}proc pub_msg_save {nick userhost handle channel text} {# grab seen data from channel message.set first [lindex [split $text] 0]if {[channel get $channel seend]} {# channel has seend flagif {$first != [set ::seend::pubCmd]} {# not a .seen request. Ok to save.set seend::lastseen($nick) [clock seconds]set seend::lastchan($nick) $channelset seend::lastmsg($nick) $text} else {variable ::seend::logseensif {$logseens} {putlog "New .seen request from $nick: $text"}}}}proc get_info {nick who} {variable ::seend::lastseenvariable ::seend::lastchanvariable ::seend::lastmsgset chanmsg ""set storedmsg ""set time $lastseen($who)if {[set ::seend::showduration] == 1} {set durlist [split [duration [expr {[clock seconds] - $time}]]]if {[llength $durlist]&gt;2} { set durlist [linsert $durlist end-2 "and"] }set last "[join $durlist] ago"} else {set last [string map {"\n" ""} [clock format $time -format {%Y/%m/%d %H:%M:%S}]]}if {[set seend::showchannel]} {# showchannel is enabled. Add last channel.set chanmsg " on \002$lastchan($who)\002"}if {[set seend::showmessage]} {# show message is enabled. Add last message.set storedmsg " saying: $lastmsg($who)"}if {$nick == $who} {set result "I've last seen your ass $last${chanmsg}${storedmsg}"} else {set result "I last saw \002$who\002 $last${chanmsg}${storedmsg}"}return $result}proc pub_show_seen {nick userhost handle channel text} {# Retrive and display seen info or help.if {[channel get $channel seend]} {variable ::seend::lastseenvariable ::seend::lastchanvariable ::seend::lastmsgset name ""set chanmsg ""set storedmsg ""# channel has sseen flag setset otext [lindex [split $text] 0] set ctext [string tolower $otext]if {[set seend::usename]} {# usename is enabled. Add nick.set name "${nick}: "}if {$ctext == "help"} {# No args supplied. Show help:variable ::seend::verputserv "PRIVMSG $channel :!seen &lt;nick&gt;"} elseif {[isbotnick $otext]} {# User supplied bots name as argvariable ::seend::isBotsNameputserv "PRIVMSG $channel :${name}[join [lrange $isBotsName 0 end]]"} elseif {[regexp {\*} $otext]} {# text includes a * so it must be a pattern search.set namelist [array names lastseen $otext]if { $namelist != "" } {# names matching pattern exist.putserv "PRIVMSG $channel :${name}The pattern '${otext}' matches: ${namelist}"} else {# no names match pattern.putserv "PRIVMSG $channel :${name}No match found for '${otext}'."}} elseif {$otext == $nick || $otext == ""} {# User supplied their own name or no name.if {[info exists lastseen($nick)]} {# seen data availableset output [::seend::get_info $nick $nick]putserv "PRIVMSG $channel :${name}$output"} else {# seen data not available.variable ::seend::isUsersOwnputserv "PRIVMSG $channel :${name}${isUsersOwn}"}} else {# User supplied other user nameif {[info exists lastseen($otext)]} {# seen data availableset output [::seend::get_info $nick $otext]putserv "PRIVMSG $channel :${name}$output"} else {# seen data not available.variable ::seend::isOtherUserputserv "PRIVMSG $channel :${name}${isOtherUser}"}}}}namespace export backup restore prerestart loaded dcc pub_msg_save pub_show_seen}putlog "Seend [set ::seend::ver] loaded!"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12595">King</a> — Sat Feb 13, 2016 12:32 pm</p><hr />
]]></content>
	</entry>
	</feed>
