egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Notice spam [ Resolved ]

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
TuSaiChi
Voice


Joined: 15 Feb 2013
Posts: 7

PostPosted: Fri Feb 15, 2013 3:01 pm    Post subject: Notice spam [ Resolved ] Reply with quote

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
View user's profile Send private message
Madalin
Master


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Fri Feb 15, 2013 3:18 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
TuSaiChi
Voice


Joined: 15 Feb 2013
Posts: 7

PostPosted: Fri Feb 15, 2013 4:46 pm    Post subject: Reply with quote

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:0Cool-BOTNAME @ # chan-Spam Reporting => <nick> http://www.website.org
Back to top
View user's profile Send private message
Madalin
Master


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Fri Feb 15, 2013 5:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
TuSaiChi
Voice


Joined: 15 Feb 2013
Posts: 7

PostPosted: Fri Feb 15, 2013 5:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
Madalin
Master


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Fri Feb 15, 2013 5:48 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
TuSaiChi
Voice


Joined: 15 Feb 2013
Posts: 7

PostPosted: Fri Feb 15, 2013 5:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
TuSaiChi
Voice


Joined: 15 Feb 2013
Posts: 7

PostPosted: Fri Feb 15, 2013 6:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
Madalin
Master


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Fri Feb 15, 2013 6:44 pm    Post subject: Reply with 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)
_________________
https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
TuSaiChi
Voice


Joined: 15 Feb 2013
Posts: 7

PostPosted: Sat Feb 16, 2013 7:02 am    Post subject: Reply with quote

I noticed that you changed the code, what have you added?
Back to top
View user's profile Send private message
Madalin
Master


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Sat Feb 16, 2013 7:03 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Madalin
Master


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Sat Feb 16, 2013 8:20 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber