This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

whos in chat

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
P
Philip
Voice
Posts: 10
Joined: Mon Jan 01, 2007 5:30 pm

whos in chat

Post by Philip »

hey guys i cant seem to find this mod is there anyone that can tell me were there is this mod.
i want my site to tell me who is in chat i have seen it done before
or can someone make it for me ?

i need this asap
Thanks Philip
Last edited by Philip on Mon Jan 01, 2007 6:21 pm, edited 1 time in total.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

.help whom
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
P
Philip
Voice
Posts: 10
Joined: Mon Jan 01, 2007 5:30 pm

Post by Philip »

sorry i ident make my first post very clear now updated
P
Philip
Voice
Posts: 10
Joined: Mon Jan 01, 2007 5:30 pm

Post by Philip »

guys i will pay for a someone to do this for me
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Are you talking about something like PISG? Maybe you should try searching the archive..

If you're talking about a script to show when people are online/offline/away, I'm working on a script to do that (although admittedly, not very high priority)
G
Garp
Voice
Posts: 29
Joined: Mon Sep 15, 2003 7:58 pm

Post by Garp »

I guess you want something like 'now in chat: nick1 nick 2 ...'?

It's done by writing the channellist into a flat file and integrate the flat file into the websites. That's all.
P
Philip
Voice
Posts: 10
Joined: Mon Jan 01, 2007 5:30 pm

Post by Philip »

can someone make that flat file for me please
i cant code as all :(
d
deadite66
Halfop
Posts: 74
Joined: Mon May 30, 2005 2:49 am
Location: Great Yarmouth, UK

Post by deadite66 »

wrote this a while ago, maybe some use.
make a irclivedata folder in your eggdrop folder, the data files will sit in there.


Code: Select all

# irclivedata.tcl version 0.1.0
# code bodged by some guy @ http://ut2004.titaninternet.co.uk
# this script will log every channel the eggdrop bot is on
# it will update the nick list every minute
# if your running the eggdrop on a seperate server to the forum you will need to upload
# the logs to somewhere the forum can access it.
# i use weex and cron for this, http://weex.sourceforge.net

# you first need to make a folder called irclivedata in the eggdrop folder before
# running this script
# ie. /eggdrop/irclivedata
# the data files will then be crated in that folder

# don't edit anything below this line unless you know what your doing
#-----------------------------------------------------------------------

# create server files if they don't exist
foreach chan [channels] {
if {![file exists "./irclivedata/usershigh$chan"]} {
set fnameirc "./irclivedata/usershigh$chan"
set fpirc [open $fnameirc "w"]
puts $fpirc "0"
puts $fpirc "no date set"
close $fpirc
}}

bind time - * userlistrun ;# runs every minute

# this prcedure gets run every minute by the above bind
proc userlistrun {m h d mo y} {
# main loop to parse each channel
foreach chan [channels] {
# read in most users number and date
set userfiletag [open "./irclivedata/usershigh$chan" "r"]
set userlisttag [split [read -nonewline $userfiletag] \n]
close $userfiletag

# if current number of users in channel is bigger than on file then update data file 
set currentnumberusers [llength [chanlist $chan]]
if {$currentnumberusers > [lindex $userlisttag 0]} {
set userfiletag [open "./irclivedata/usershigh$chan" "w"]
puts $userfiletag $currentnumberusers
puts $userfiletag [ctime [clock seconds]]
flush $userfiletag
close $userfiletag
set userfiletag [open "./irclivedata/usershigh$chan" "r"]
set userlisttag [split [read -nonewline $userfiletag] \n]
close $userfiletag
}

# make sure these list are clear
set currentusersop "" ; set currentusershalfop "" ; set currentusersvoice "" ; set currentusers ""
# split the users into ops, halfops, voiced and regular users
foreach userraw [chanlist $chan] {
if {[isop $userraw $chan]} {
append currentusersop "@$userraw, "
} elseif {[ishalfop $userraw $chan]} {
append currentusershalfop "%$userraw, "
} elseif {[isvoice $userraw $chan]} {
append currentusersvoice "+$userraw, "
} else {
append currentusers "$userraw, "
}}

# clear the list
set currentusersline " "
# add everyone together on one line
append currentusersline $currentusersop $currentusershalfop $currentusersvoice $currentusers

# write the current users, most users and nicks into the main file
set irclivedata [open "./irclivedata/irclive$chan.txt" "w"]
puts $irclivedata " Current users online $currentnumberusers"
puts $irclivedata " Most users [lindex $userlisttag 0] on [lindex $userlisttag 1]"
puts $irclivedata "[string range $currentusersline 0 end-2]"
close $irclivedata
}}

putlog "irclivedata v0.1.0 loaded"
it will output a text file like this
Current users online 51
Most users 73 on Sun Dec 10 17:18:00 2006
@SakuraBot, @`fluffy, @Xe|BNC|Fusion, @Q, @fnenu, @ne|Zofo, +MoonUnit, saka, Meow`, {Ez0}Dess[ApA], DR|Don-Research, Jonex, GsatNZ, [Ci]Rhizome, [InX]Dark_Lord, ]tla[|work, ]I[-Willow, TGS`A_Spec`, Bithir, [ST2]LSL^apero, Slainchild, Bitpull, Razz, xming, [CB]LooN, mi5|Iceman, `sunsh1ne-, topaz^bnc, Sergonium, Turo, Nic666_, reaper-work, ]I[Cruz, FC|diocrino, j-X|Ohm, Molgan, |FroG|MaLa3aR, drzizi`bnc, moose666, `reaper, Babelfish, EvenDarkerBOB, DR|Phirsty|32, Shambler[Bishop, `phat|cP|away, ]I[Static, Killer-Rabbit, Blue`off, Greyman, grep, fewmics
intergrating that into a forum was done by someone else i have no idea how to do it.
<- tcl newb
P
Philip
Voice
Posts: 10
Joined: Mon Jan 01, 2007 5:30 pm

Post by Philip »

thanks how do i get it from the text file onto a website ?

Thanks Philip
s
strikelight2
Voice
Posts: 5
Joined: Tue Jan 02, 2007 12:33 am
Contact:

Post by strikelight2 »

Search for "botnetstats" by Wcc at the http://www.tclscript.com script search.

If you mean users on a channel, instead of chat (which the partyline is commonly called), then search egghelp.org's script search for "html2".
P
Philip
Voice
Posts: 10
Joined: Mon Jan 01, 2007 5:30 pm

Post by Philip »

yea i mean users in my channel
P
Philip
Voice
Posts: 10
Joined: Mon Jan 01, 2007 5:30 pm

Post by Philip »

i am trying html2 but i am gtting this error


[15:18] Tcl error in file 'eggdrop.conf':
[15:18] couldn't open "www.nashhosting.co.uk/bot/minidirectory.html": no such file or directory
while executing
"open $wpage w"
(procedure "web_write" line 7)
invoked from within
"web_write"
(file "scripts/html2.tcl" line 108)
invoked from within
"source scripts/html2.tcl"
(file "eggdrop.conf" line 1349)
[15:18] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)


anyone know what i ahev to do or uplaod to the hosting
s
strikelight2
Voice
Posts: 5
Joined: Tue Jan 02, 2007 12:33 am
Contact:

Post by strikelight2 »

The script assumes your bot is running on the machine where your site is hosted.... You set the path (directory) in the config to where you want the file saved, not the url you want it saved to.

If you have your bot running on a machine different than your site, you will need yet another script to upload your file to your web box.
d
deadite66
Halfop
Posts: 74
Joined: Mon May 30, 2005 2:49 am
Location: Great Yarmouth, UK

Post by deadite66 »

the script makes text files in the irclivedata folder.
ie:
irclive#channnelname.txt

use http://weex.sourceforge.net/ or http://www.lyra.org/sitecopy/ to upload then where they can be accessed by a website.
<- tcl newb
P
Philip
Voice
Posts: 10
Joined: Mon Jan 01, 2007 5:30 pm

Post by Philip »

thats the code

Code: Select all

# HTML2.Tcl -- a lot like ques3.tcl, but I wrote this one myself and to my
#             likings PLUS improvemnets for eggdrop1.3.4!
#
# fixed - doesn't display chan voices twice..
#
# Original Version by kn0 <keith@cs.oswego.edu>
# Edited for Eggdrop1.3.x by Prime <Unkonwn>
# Set these....
# Do this for every channel you want
set web_chans(#mindirectory) minidirectory.txt

# What directory are your web pages in? Or what directory do you want this to
# be in?
set web_dir www.nashhosting.co.uk/bot/

# How often do you want the page to be updated? (In minutes)
set web_update 1

###### Do not edit anything beyond this point!!! ######

foreach i [timers] {
    if {[lindex $i 1] == "web_write"} {
        killtimer [lindex $i 2]
    }
}

if ![info exists web_topic] {set web_topic(*) "*"}
foreach i [channels] {set web_topic($i) ""}
proc web_write {} {
    global web_dir web_update botnick nick web_topic web_chans
    foreach i [array names web_chans] {
        set wpage $web_dir$web_chans($i)
        set web_page $web_chans($i)
        set web_chan $i
        set a [open $wpage w]
        if {$web_topic($i) == ""} {
            set web_topic($i) "topic unknown"
        }
        puts $a "<META HTTP-EQUIV=\"refresh\" content=\"[expr $web_update * 60]\; url=$web_page\">"
        puts $a "<TITLE>$web_chan IRC channel stats (Written at [time] [date])</TITLE>"
        puts $a "<CENTER><FONT SIZE=\"6\">$nick's $web_chan stats</FONT><BR><I>(Topic: $web_topic($i))</I></CENTER>"
        if {![onchan $botnick $web_chan]} {
            puts $a "<FONT SIZE=5><B>I ($nick) am currently not on $web_chan, try again later</B></FONT>"
            puts $a <P>
        }
        puts $a "<CENTER>"
        puts $a "<TABLE BORDER=3>"
        puts $a "<TR><TD COLSPAN=3><CENTER><FONT SIZE=5>$web_chan, [getchanmode $web_chan] ([llength [chanlist $web_chan]] users)</FONT></CENTER></TD></TR>"
        puts $a "<TR><TD bgcolor=0000ff><FONT COLOR=FF0000><B>Nickname</B></td><td bgcolor=0000ff><FONT COLOR=ffff00><B>Status/info line</B></td><td bgcolor=0000ff><font color=ff0000><b>Address</B></td></tr>"
        set chanlist [chanlist $web_chan]
        set chanlist "$botnick [lsort [lrange $chanlist 1 end]]"
        set oplist ""
        set vlist ""
        set noplist ""
        set noplist2 ""
        foreach i $chanlist {if [isop $i $web_chan] {lappend oplist $i} {lappend noplist $i}}
        foreach i $noplist {
            if [isvoice $i $web_chan] {
                lappend vlist $i
            } {
                lappend noplist2 $i
            }
        }
        set noplist $noplist2
        foreach i "\{$oplist\} \{$noplist\} \{$vlist\}" {
            foreach b $i {
                set c ""
                if {[isop $b $web_chan]} {set q "<FONT COLOR=ff00ff>@</FONT>"} {set q ""}
                if {[isvoice $b $web_chan]} {set q "<FONT COLOR=ff00ff>+</FONT>"}
                if {[matchattr [nick2hand $b $web_chan] b]} {append c ", (BOT)"}
                if {$botnick == $b} {
                    puts $a "<TR><TD>$q$b</TD><TD><-- It's me!</TD></TR>"
                }
                if {$botnick != $b} {
                    set hand [nick2hand $b $web_chan]
                    puts $a "<TR><TD>$q$b</TD><TD>Idle [getchanidle $b $web_chan] min$c</TD><TD>[getchanhost $b $web_chan]</TD></TR>"
                    if {[getchaninfo $hand $web_chan] != "" && ![matchattr $b b] && $hand != "*"} {
                        puts $a "<TR><TD></TD><TD COLSPAN=2><I>Info: [getchaninfo [nick2hand $b $web_chan] $web_chan]</I></TD></TR>"
                    }
                }
            }
        }
        puts $a "</TABLE>"
        if {[chanbans $web_chan] != ""} {
            puts $a "<TABLE BORDER=3>"
            puts $a "<TR><TD><CENTER><FONT SIZE=5>Bans:</FONT></CENTER></TD></TR>"
            foreach c [chanbans $web_chan] {
                puts $a "<TR><TD>$c</TD></TR>"
            }
            puts $a "</TABLE>"
        }
        puts $a "</CENTER>"
        puts $a <HR>
        puts $a "Click <A HREF=http://www.netscape.com>here</A> if you have a text-only browser.<BR>"
        puts $a "This page is updated every $web_update minute(s)."
        puts $a "<CENTER>-- <A HREF=ftp://ftp.sodre.net/pub/eggdrop/scripts1.3/html2.tcl>HTML2.Tcl</A> Eggdrop 1.3 script --</CENTER>"
        close $a
    }
    timer $web_update web_write
}
bind topc - * web_topic
proc web_topic {nick uhost handle channel vars} {
    global web_topic web_chans
    if {[lsearch [array names web_chans] $channel] != "-1"} {
        set web_topic($channel) $vars
    }
}
web_write
putlog "\002HTML2\002 by \037Prime\037 - Writing: [array names web_chans] :stats files"

and this is the error


Code: Select all

[14:28] couldn't open "www.nashhosting.co.uk/bot/minidirectory.txt": no such file or directory
    while executing
"open $wpage w"
    (procedure "web_write" line 7)
    invoked from within
"web_write"
    (file "scripts/html2.tcl" line 108)
    invoked from within
"source scripts/html2.tcl"
    (file "eggdrop.conf" line 1349)
[14:28] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
other than this script the bot is normail what do i need to do then


Thanks Philip
Post Reply