The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Users in Chat -with eggdrop, works no matter what- Details »» | |||||||||||||||||||||||||||
Users in Chat -with eggdrop, works no matter what-
Developer Last Online: Mar 2007
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 Show Your Support
|
Comments |
#32
|
|||
|
|||
Quote:
|
#33
|
|||
|
|||
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 bind part - "$i2h_chan %" i2h:make Code:
bind sign - "$i2h_chan %" i2h:make bind topc - "$i2h_chan %" i2h:make bind kick - "$i2h_chan %" i2h:make bind nick - "$i2h_chan %" i2h:make bind rejn - "$i2h_chan %" i2h:make replace: Code:
eval("dooutput(\"".gettemplate('forumhome')."\");"); Code:
if(file_exists('<homedir>/www/forums/chatuserlist.txt')) { $openfile = fopen ("<homedir>/www/forums/chatuserlist.txt", "r"); while (!feof($openfile)) { $chatters .= fgets($openfile, 4096); } fclose($openfile); } eval("dooutput(\"".gettemplate('forumhome')."\");"); Code:
<smallfont> <b>Chatroom Users: $chatters</b> </smallfont> <br> |
#34
|
|||
|
|||
The above only is valid if yuo have your eggdrop running on the same server as you host the forum.
|
#35
|
||||
|
||||
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 |
#36
|
|||
|
|||
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:
|
#37
|
|||
|
|||
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 |
#38
|
|||
|
|||
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 |
#39
|
||||
|
||||
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 |
#40
|
||||
|
||||
Code I found if someone can modify it:
PHP Code:
|
#41
|
|||
|
|||
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. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|