![]() |
Users in Chat -with eggdrop, works no matter what-
First and foremost, I would like to thank Sparkz for a little bit of TCL help. I had been playing with the idea for some time now of using an eggdrop bot and vBulletin to put current chatters on my forum home. Unfortunately, I couldn't find the perfect TCL to use. The current TCL is a mix between my own script, a script I found online and Sparkz script.
** YOU MUST HAVE AN EGGDROP BOT ** After seeing this hack on vbulleting.org, I wanted it for my site. Unfortunately, it was not being released, so I decided to make my own! Here it is, hopefully you can figure most of it out yourself. What it does is uses an eggdrop bot (not going to explain what it is). The bot refreshes the userlist when a user leaves or enters the channel, this keeps the list up to date always. When you load index.php, the list is downloaded from the shell and read into a variable. This variable can be put on your forumhome template and viewed by the user. This hack also gets the current channel topic and the current server that the chat is on. Pros: * Works for any IRC method (jpilot, mirc, eirc, etc.) * No page refreshing or database calls * Is ALWAYS up-to-date Cons: * Uses FTP and eggdrop Support for this hack is limited due to the fact that I am a busy person. I hope you enjoy this hack, it's my first. - joey |
Not everyone has PHP compiled with the ftp-extension. Could cause some problems. Also, this WILL slow down page loading, since it needs to connect to a remote host to grab the users every time the page is loaded. And if you have a busy site, you will also bog down the bot with a lot of traffic.
Just a couple of pointers you might want to consider for a future version :) |
And where can I get the eggdrop bot? But I guess if guy says it will slow down loading then I'm not installing it XD
|
It was the easiest method I could think of.
If I had a dedicated server, I'd stick the eggdrop right on the same server and eliminate some of the problem. (which you can do anyway). If the bot load gets too high, you can remove the bind and put in a timer. (if you know tcl - which I am not really good with). So, to completely optimize this script, get a dedicated server, run your eggdrop off of that and use a timer instead of bind. :) Until then, feel free to play/optimize this hack. |
Hey there!
I've been looking for something like this. Having a bit of trouble with it, though. I've changed the config vars in userschatting.tcl, and uploaded it. It loads fine with my eggdrop, and the userlist.txt is created. However, no user data is ever appended to the list. Do i have to do something to start the process? |
The userlist file is updated when a user joins the channel.
|
I understand that's how it's supposed to work. However, it's not working. I've had users going in and out of my channel for two hours now, and I'm left with an empty file.
Any suggestions? |
Try this tcl. If this doesn't work, you installed it wrong, because this is the exact tcl that I'm using on my eggdrop and everything is working for me. What version of eggdrop do you have?
|
To speed this up, I would suggest having the eggdrop update a database table at regular intervals, and then have vBulletin pull that information straight from the database. That should fix any sort of major page load issues.
(I have not looked at the code or anything, so maybe that is how it already does it? I dunno... but that's how I would do it). |
Great idea! I read about this hack here and thought it seemed interesting, so I downloaded the attached file and had a look at it. I decided to have a go at it, so I spoke to one of the other server admins who is operating our IRC bots, and asked him if he could add the script to a bot. He thought it was a great idea as well, so he re-wrote the TLC script and the code implented to index.php and I did some simple template modifications. I turned out great and I love it :D. I made it look similar to the "Currently Active Users" box and put it right below it.
Users with @ in front of their nicks are Operators, with + in front of their nicks are voiced users and the others are regular users. "Most Users Ever Online in #Channel" will be worked on next. The list is updated whenever someone joins, parts, quits, get kicked or get banned. The users are sorted by status (Op -> Voiced -> Reg. Members) and alphabetically as well. I would have to check with my fellow server admin if he wants to release it as a hack, but I don't think that would be a problem (if there's interest, that is), and if so, I'll release it as a separate hack since the code is completely different (although Major thanks to sas1911 for presenting this idea). Check out the attached screenshot and view it online at www.emutalk.net |
Would love to see your version Martin64, and I've still had no luck with the original! :D
|
Okay, I will let you know as soon as it's ready for release :)
|
Sounds good, I'm also interested in it. Although my only problem is I don't have a dedicated server so things might not run too smoothly...:(
|
The original hack does not track people leaving the channel so it only updates on join.
|
Quote:
Quote:
|
Quote:
From a tcl-commands.doc which was included in eggdrop: Quote:
|
I just get left with an empty text file as well. :(
Would be interested in seeing the other hack mentioned here when it's ready. |
awesome hack! though little prob when replying and making a new thread :(
on the board it says this: Fatal error: Maximum execution time of 30 seconds exceeded in c:\www\apache\htdocs\forum\irc.php on line 24 Fatal error: Maximum execution time of 30 seconds exceeded in c:\www\apache\htdocs\forum\admin\functions.php on line 4667 and in irc it says this: [12:46:41] <Bot> [12:46] Timeout/EOF ident connection [12:49:59] <Bot> [12:50] @#chan (+trn) : [m/8 o/3 h/0 v/4 n/1 b/0 e/- I/-] any ideas what im doing wrong? |
ok i have a hosted server for my website which has a ton of space so thats no big deal. I dont thing eggdrop is on there but do I need to call my host and have them put it on or can I do it myself...sorry to bother. later
|
Quote:
Thanks |
Sorry for the delay but I haven't had internet access at home for a few months now, but finally I do. A few people have pm'd me, and some have mailed, so I better answer publically. :)
However, I have spoken to my co-admin and he is not interested in releasing the hack, so I am afraid I can't, at least not right now. Sorry guys. :( |
does anyone have this working on 2.28 ?
|
The simplest thing to do is simply have the TCL script output the current list of chatters every X secs. Trying to track users as they come and go via join, kick, leave, netsplit is a novel idea but probably going to far. My TCL script has been outputting the current users every 1 min for over 2 years now on my site.
|
freddie: Can you post your tcl file, stripped of any personal stuff?
My host has agreed to set up the eggdrop for me. Now I am trying to understand what to do with the tcl file. Anyone: (1) Should I upload the tcl file to my site's root directory and have the eggdrop reference it there, or does the tcl file get loaded whereever the host puts the eggdrop? (2) I see that the variables in the tcl file are (a) the path to userlist.txt, and (b) the channel name My host does not have an IRC server at this time, so I am using an external IRC server. However, I don't see where to specify which IRC server to look for the channel. Can anyone tell me how that is accomplished? Is that done somewhere in the eggdrop's config. file or should another variable be added to this tcl file? |
The .tcl file should go in your eggdrop directory, and you should have your eggy load it on startup (this is done via the .conf file).
You give the eggdrop a list of servers in its .conf file also. Check http://www.egghelp.org, they've got some invaluable tips there (including how to compile your bot for long nicks (nicks over the 9 character standard - Dalnet, etc.) If the IRC server you're using has "Thales" hooked up to it, see if they have web-based URLs to tie it in. Will be easier/quicker to just grab those n' parse them into your page than messing around setting up an eggdrop (although, you won't have the protection/toys in your channel that a bot is capable of offering). Check http://www.blitzed.org. That's an IRC server with a web-interface. You can just request raw flat text files of channel info to have you script play with. "Thales" is an IRC Server (at least as far as other servers are concerned) that writes out data real-time to a MySQL database (although this can cause a lot of headaches unless Thales & the MySQL server are both localhost to each other). I've been playing around with a Bahamut/SIRV/Thales combo recently on our dedicated box to see how I can integrate it into intract with vB/vBHome, so it'll be interesting to see how it all eventually works out for us. It's mainly so that channel registrants can do exactly this kind of thing without having to mess around. It's working quite well so far, and as soon as the site goes live, I'll actually give you all the URL to have a play and see it for yourselves :) |
Works like a charm!!!
Thank you very much! /me klicks install! |
hi,
i´am not a newbie, but i don´t understand "eggdrop". If it a Script ? - and when, where i can it download and in which direcory on my server i have the "eggdrop" to upload ? SaM |
Eggdrop is a standalone application.
It runs as an automated IRC client sitting in channel(s) on an IRC server. It, if correctly configure, keeps order in a channel when there's no humans around. Enforces bans, prevents flooding, etc. Where it resides is entirely up to you, but I wouldn't put it in a directory accessible from the web - it wouldn't be difficult to grab your eggdrop user file and brute-force the passwords (and seeing all the hostmasks for users in the file would also give a potential attacker clues on where to hunt for proxies to spoof & pose as a legitimate bot user). You can get it from www.egghelp.org. |
Hi!
i'm getting this 2 errors when i do the rehash: Code:
TCL error in script for 'timer11': |
It looks like the timer is still running after a .rehash
Try doing a .restart or a .reload instead. Remember though, .restart will restart the whole bot, disconnecting it from the server and logging it back on. If you do a .reload, anything that's presently stored in memory that hasn't been saved will be lost. So make sure you do a .save and a .chansave before you do the .reload. How to fix the problem in the actual script so that it won't break on a .rehash... Well, I'll have to get back to you on that. It's been a couple of years since I did much TCL coding, although I have a script here somewhere, that I wrote a while ago, that grabs the IRC info, and writes it out to a MySQL database every minute or so - That requires the tcl-sql library to be installed (which I believe needs root access to the box), but at least it might give me more of a clue about this timer problem. Quote:
|
Quote:
|
OK got this working now. Trick is to use the userchatting.tcl from the second .zip file attached to this thread and make this change (also from elsewhere in the thread):
Find: Code:
bind join - "$i2h_chan %" i2h:make Code:
bind sign - "$i2h_chan %" i2h:make replace: Code:
eval("dooutput(\"".gettemplate('forumhome')."\");"); Code:
if(file_exists('<homedir>/www/forums/chatuserlist.txt')) Code:
<smallfont> |
The above only is valid if yuo have your eggdrop running on the same server as you host the forum.
|
If you actually own the IRC server, or have access to add servers to the IRC network (as opposed to just having a channel on somebody's network), it might be worth looking into Thales.
I've been using it on our site for a couple of months now. It basically hooks up to the network, and for all intents & purposes, it's just another IRC server on the network, like Bahamut or IRC services. The only difference is that it doesn't accept users. It stores live data regarding all the channels & users in a MySQL database, then you can just use standard queries to call the information. If you don't have access to add servers, perhaps you could contact the people who do run the network and see if they want to install it and make some kind of web-based API so you can grab information and parse it out in your own scripts (something I've done with Thales so users who run channels on my server can call the live information regarding their channel and publish it on their own sites). Here's a live example of it running. http://chat.reptilerap.com <-- The URL of the main chat site, scripts directly querying the database. ReptileRooms.com Chat Page <-- URL of an external site that has no access to the database, yet manages to show the channel information through the web-based API I wrote. I can't remember the URL off-hand, but just go to google and search for "Thales IRC" and it'll come up on the first page of results :) |
Nice hack! The TCL works great. We added a timer as well and the updates work great, thanks.
We do however have webspace on the same server we run our eggdrop bot and were able to avoid using the FTP method. The eggdrop bot server and the Forums Server are different locations though and we get to the file created by the eggdrop's userschatting.TCL script like this... The TCL script is in /home/username/eggdrop/scripts The web space is at /var/www/html/ We created /var/www/html/ircstats then we linked to /home/username/eggdrop/scripts/userlist.txt To link the files in linux(we did it as root)... link /home/username/eggdrop/scripts/userlist.txt /var/www/html/ircstats/userlist.txt The second file is created by the link command and should not exist. Now whenever the bot updates the main file, the linked file will reflect the changes to be accessable to the web via HTTP. This is the code we used in the index.php file to fetch the userslist.txt when a user accesses index.php, the forumhome. PHP Code:
|
While reading the thread a few things came up that we would like to share. Here are our TCL modifications to Joey's great irc hack.
1) Putting the "No matter what" back in to the title, a Timer. This method allows the script to wait for the user to exit before compiling the stats. No more two users have to exit to decrement the count. Plus since the userslist.txt is updated within 5 seconds of any bound event, there is no need for a constantly running timer. The file updates only when necessary. 2) Remove the bot from the list and the count. Done! If that's what ya want, it's in here. Thanks again to Joey for Excellent code to work with! Although this is TCL, I'm gonna tag it php. PHP Code:
Regards |
hi there,
i try all files and stuff in this Thread, but nothing would work.... ok, here is what i have, make and what comes out: What i have: eggdrop v1.6.13, on Linux 2.4.19-4GB What i make: put the tcl in scripts dir, bind it in config, make rehash/restart and it comes ---> with orginal script... the count problem, with modified orginalscript (like the postings here) (17:38:04) (Bloodcult) [16:37] SaS IRC nick list loaded. (17:38:04) (Bloodcult) [16:37] Userfile loaded, unpacking... (17:38:15) (Bloodcult) [16:38] Tcl error in script for 'timer3': (17:38:15) (Bloodcult) [16:38] wrong # args: should be "auth hand idx args" with the tcl from noppid: (17:33:13) (Bloodcult) [16:32] SaS IRC nick list loaded. (17:33:13) (Bloodcult) [16:32] Userfile loaded, unpacking... (17:33:14) (Bloodcult) [16:33] Tcl error in script for 'timer6': (17:33:14) (Bloodcult) [16:33] wrong # args: should be "auth hand idx args" (17:33:15) (Bloodcult) [16:33] Tcl error in script for 'timer7': (17:33:15) (Bloodcult) [16:33] extra characters after close-quote every time someone leaves or joins my channel it comes the same errors... so what can i do? thanks for answer |
Is it possible to get the status characters in front of a username? (@, %, +) If so, is it also possible to get another? irc.resum.net allows admins (! char), can that be included?
Thanks, ~Bumpaneer |
Code I found if someone can modify it:
PHP Code:
|
Bloodcult, the code posted above has been running fine for us on
Eggdrop v1.6.12 (C) 1997 Robey Pointer (C) 2002 Eggheads and RHL8.0. I'm at a loss for suggestions other then check the path to the files and be sure they exist. |
All times are GMT. The time now is 04:44 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|