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.

Logs and ads

Old posts that have not been replied to for several years.
Locked
z
zacon

Logs and ads

Post by zacon »

Hi, I'm running an eggdrop and a pisg to write chanstats to a file. Pisg will just read the eggdrop logs, and make a nice html page with stats; most used words, most active nicks, etc. out of that. Problem is I run the bot on a serving channel, which means there's a lot of ads shown. A typical ad would look like this:

<zaconDCC> ** For a listing type: "/msg zaconDCC xdcc list" **
<zaconDCC> ** Futurama Season 5 SVCD releases **

The statspage says that zaconDCC is a very active nick because he says so much. I don't want that.

An nice and easy solution would be to make eggdrop skip everything that have "For a listing type" in it. Is there someway i could do that?

Thanks for any help.
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

omg(!) what will ppslim say.

take your warez elsewarez :)
photon?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

No, not this time, but a warning will be issued. Only because the problem is related to site stats, which is legitimate.

You would have to see the config of psig to see if there is any way to exclude certain nicknames.

Though, please do take your warez somwhere else.
z
zacon

Post by zacon »

Yes, I'm sorry about that. Just forget that part, and say that I want to know how I can make eggdrop ignore all lines with sertain words in it. I don't want to ignore any nicks. It's also filling up my logfiles, so I'm afraid configuring pisg is not the answer.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

What you want is to ignore liens like that, but at the same time, not ignore any nicknames?

I don't see the logic in try to ignore nothing
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

i think he doesnt want to let the bot log channel msg's from a certain nick / user because the log file would get too large. he doesn't want the lines to apear in the log file..

maybe you try something like mel and add some line to ignore it...
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

This "should" block any lines that have a ** in them (like the ones you pasted). To change it to something else, just change the string match command.

Code: Select all

bind raw - privmsg msg_blocker
proc msg_blocker {from keyword text} {
  if {[string match *\*\** $text]} {return 1}
  return 0
}
I didn't test it.
z
zacon

Post by zacon »

Yes, that actually almost worked, thanks a lot. Problem is that it always rawed, so that nothing said in the channel was logged at all. Very strange actually, it says clearly in tcl-commands.doc that return 1 would make it raw and that return 0 wouldn't.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

hmm I didn't copy it right or something

It should be {*\*\**}, with braces like that
z
zacon

Post by zacon »

Yeah I figured that out myself, but I couldn't get it working with that either, so i had to add the info to the logfile manually. Finally got it working using this:

Code: Select all

bind raw - privmsg msg_blocker 
proc msg_blocker {from keyword text} { 
  if {[string match \*xdcc* $text]} {return 1}
     putloglev "*" <mychannel> "<[lindex [split $from "!"] 0]> [join [lrange [split $text ":"] 1 end] ":"]"
     return 1
}
Thanks for your help :)
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

ou should not do that with the RAW bind.

This blocks all incoming PRIVMSG commands, including CTCP messages.

This will make your bot almost uncontactable.
Locked