| View previous topic :: View next topic |
| Author |
Message |
TuSaiChi Voice
Joined: 15 Feb 2013 Posts: 7
|
Posted: Fri Feb 15, 2013 3:01 pm Post subject: Notice spam [ Resolved ] |
|
|
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 |
|
| Back to top |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Fri Feb 15, 2013 3:18 pm Post subject: |
|
|
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 _________________ https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL |
|
| Back to top |
|
 |
TuSaiChi Voice
Joined: 15 Feb 2013 Posts: 7
|
Posted: Fri Feb 15, 2013 4:46 pm Post subject: |
|
|
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:0 -BOTNAME @ # chan-Spam Reporting => <nick> http://www.website.org |
|
| Back to top |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Fri Feb 15, 2013 5:15 pm Post subject: |
|
|
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: | 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"
}
}
}
}
}
} |
_________________ https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL
Last edited by Madalin on Sat Feb 16, 2013 8:15 am; edited 9 times in total |
|
| Back to top |
|
 |
TuSaiChi Voice
Joined: 15 Feb 2013 Posts: 7
|
Posted: Fri Feb 15, 2013 5:43 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Fri Feb 15, 2013 5:48 pm Post subject: |
|
|
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) _________________ https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL |
|
| Back to top |
|
 |
TuSaiChi Voice
Joined: 15 Feb 2013 Posts: 7
|
Posted: Fri Feb 15, 2013 5:58 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
TuSaiChi Voice
Joined: 15 Feb 2013 Posts: 7
|
Posted: Fri Feb 15, 2013 6:42 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Fri Feb 15, 2013 6:44 pm Post subject: |
|
|
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) _________________ https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL |
|
| Back to top |
|
 |
TuSaiChi Voice
Joined: 15 Feb 2013 Posts: 7
|
Posted: Sat Feb 16, 2013 7:02 am Post subject: |
|
|
| I noticed that you changed the code, what have you added? |
|
| Back to top |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Sat Feb 16, 2013 7:03 am Post subject: |
|
|
| Quote: |
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.. _________________ https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL |
|
| Back to top |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Sat Feb 16, 2013 8:20 am Post subject: |
|
|
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: | | Quote: |
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.. |
_________________ https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL |
|
| Back to top |
|
 |
|