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.

Notice spam [ Resolved ]

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
T
TuSaiChi
Voice
Posts: 7
Joined: Fri Feb 15, 2013 2:57 pm

Notice spam [ Resolved ]

Post by TuSaiChi »

Hi, I am interested in a tcl script that, based on the letters you do not like (spam) from a specific list. the eggdrop send a notice to the moderators (aop) of chan where it is, and also to the IRCOPS network.
Last edited by TuSaiChi on Sat Feb 16, 2013 8:19 am, edited 1 time in total.
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

Can you give more specific things about how the script should work? And how will the BOT know who is irc operator or not. Give some exact examples
T
TuSaiChi
Voice
Posts: 7
Joined: Fri Feb 15, 2013 2:57 pm

Post by TuSaiChi »

Ok.
When the user says "come on # channel" or "http://" or "www" (this should be in a list type bind pubm - "* http:// *").
The task of the BOT is in sending a notice to the moderator, where the channel is the "message" of spam, and another notice to IRC OPS.
for example (notice): (21:45:08)-BOTNAME @ # chan-Spam Reporting => <nick> http://www.website.org
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

Try this

Just change the first #channel with the channel you want the script to work in and #channel-notice to the channel you want the bot to send a notice with the nickname and the arguments that the nick said

Code: Select all

bind PUBM - * check:pubm

set temp(chan) "#channel-notice"
set temp(spam) {
	"http://"
	"#"
}

proc check:pubm {nick uhost hand chan arg} {
	global temp
	if {[isbotnick $nick] || [isop $nick $chan] || [isvoice $nick $chan] || [ishalfop $nick $chan]} { return }

	foreach a $temp(spam) {
		if {[string match -nocase *$a* $arg]} {
			## ++ current channel
			foreach a [chanlist $chan] {
				if {[isop $a $chan]} {
					putserv "NOTICE $a :$nick said $arg"
				}
			}
			## ++ backup channel
			if {[validchan $temp(chan)]} {
				foreach b [chanlist $temp(chan)] {
					if {[isop $b $temp(chan)]} {
						putserv "NOTICE $b :$nick said $arg"
					}
				}
			}
		}
	}
}
Last edited by Madalin on Sat Feb 16, 2013 8:15 am, edited 9 times in total.
T
TuSaiChi
Voice
Posts: 7
Joined: Fri Feb 15, 2013 2:57 pm

Post by TuSaiChi »

Thank you, notice the work .. but we should now put the condition that a moderator (aop), the recipient of the notice and the IRC OPS (+ o + O)

If you can, run in all channels where the BOT
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

I modifyed the code in the old post to work on all channel and i added the condition so that an aop (user with op in the channel) says something like http:// or anything else that is added as a spam word/phrase will be ignored

And about the IRC OPS part i don`t know.. that part is tricky to send only does nicknames a NOTICE they could just join the channel were the notice is sent (thats the easiest way for the eggdrop and everyone else)
T
TuSaiChi
Voice
Posts: 7
Joined: Fri Feb 15, 2013 2:57 pm

Post by TuSaiChi »

Thank you, you're very kind.
It is already a small goal, it gets the notice to the moderators (@ aop), the piloted channels where there is the BOT.
T
TuSaiChi
Voice
Posts: 7
Joined: Fri Feb 15, 2013 2:57 pm

Post by TuSaiChi »

There is a small problem, the channel for the notification does not go well. The user himself that "spams" is on channel # try and set the channel is set temp (chan) "blue"
notice is reported in the blue channel
(23:36:04)-ChanStats: # blue - User_1541 Reporting Spam => # Canalea

It would be convenient to make also the operation of the first, that do work for all channels, if it is possible.
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

You have to restart the eggdrop when you load my last verson of the script
The script will work on all channels that the bot is in
You only have to modify the temp(chan) with the channel where you want the bot to send the NOTICE about the spammer

The BOT will NOTICE all nicknames that are OPPED (@) in $temp(chan)
T
TuSaiChi
Voice
Posts: 7
Joined: Fri Feb 15, 2013 2:57 pm

Post by TuSaiChi »

I noticed that you changed the code, what have you added?
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

You have to restart the eggdrop when you load my last verson of the script
The script will work on all channels that the bot is in
You only have to modify the temp(chan) with the channel where you want the bot to send the NOTICE about the spammer

The BOT will NOTICE all nicknames that are OPPED (@) in $temp(chan)
Something like this..
Just test the code see if it works and does what you want .. that is what i understand you wanted..
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

Ok so finally we got to the final version
So the scripts works like this:

If a word/phrases added as spam is said in a channel where the bot and that user is not an voice/op/halfop in the channel the bot will notice all @'s channels about that action. The script also has a backup channel for this kind of notice
Madalin wrote:
You have to restart the eggdrop when you load my last verson of the script
The script will work on all channels that the bot is in
You only have to modify the temp(chan) with the channel where you want the bot to send the NOTICE about the spammer

The BOT will NOTICE all nicknames that are OPPED (@) in $temp(chan)
Something like this..
Just test the code see if it works and does what you want .. that is what i understand you wanted..
Post Reply