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.

Need some help by writing a script...

Old posts that have not been replied to for several years.
Locked
B
BiLL
Halfop
Posts: 78
Joined: Wed Sep 26, 2001 8:00 pm
Location: Germany

Post by BiLL »

Hello,

anyone ever written a script which prints out the lines from .traffic in the partyline to a .txt?

I would like to write a script which sends me the montly traffic for a bot per email.

But I dont know how to get the .traffic output into a .txt.

Thats why I am asking, anyone ever had some experience with this kind of script(traffic)?
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

I wrote a loopback script to capture .traffic output into a variable, which can be easily modified to dump it to file. I'll look for it sometime later
B
BiLL
Halfop
Posts: 78
Joined: Wed Sep 26, 2001 8:00 pm
Location: Germany

Post by BiLL »

Would be nice,

thank ya.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Here is a source patch I that creates a 'traffic' tcl command. It returns a list of lists of all the traffic information.

to install the patch:

download it from http://home.dal.net/stdragon/eggdrop/tcl_traffic.patch

move it to the eggdrop/src directory

type 'patch < tcl_traffic.patch'

recompile eggdrop by typing 'make' and then 'make install'

The new command is called 'traffic'

It returns a list of lists like this:
{previous output, today's output, total output, previous input, today's input, total input}

There is one of these lists for irc, botnet, partyline, transfer.mod, and misc traffic (scripts).

The final list is for combined counts:
{previous combined output, today's combined output, total combined output, previous combined input, today's combined input, total combined input}
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

Have time to make that a module? :smile:
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Unfortunately, the traffic variables aren't exported in the module table, so modules can't access them. Changing the table would require a patch anyways, so I don't really see any benefit to a module version.
Locked