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.

receive notice via spam

Help for those learning Tcl or writing their own scripts.
Post Reply
d
demetrius_reis
Halfop
Posts: 42
Joined: Tue Aug 10, 2010 9:54 am

receive notice via spam

Post by demetrius_reis »

The bot is not getting spam via ctcp or notice and, as I use this same script using the two options or two scripts in order to receive the notice via spam in the channel?

Code: Select all

#Canal onde o bot ira avisar sobre SPAMs
 set canal "#age_2_ops"

bind msgm -|- *www* malware
bind msgm -|- *http* malware
bind msgm -|- *xit* malware
bind msgm -|- *cheat* malware

proc malware {mad7684 mad8594 mad873 mad8954} {
    global canal
	putquick "PRIVMSG #age_2_ops :cbrr Nick: $mad7684 Host: 14$mad8594 Tipo de SPAM: 14Home Page Msg: 2$mad8954"

}

putlog "spam.tcl"
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

I suppose you're looking for the "notc" and "ctcp" bindings...

Code: Select all

    (7)  NOTC (stackable)
         bind notc <flags> <mask> <proc>
         procname <nick> <user@host> <handle> <text> <dest>

         Description: dest will be a nickname (the bot's nickname,
           obviously) or a channel name. mask is matched against the entire
           notice and can contain wildcards. It is considered a breach of
           protocol to respond to a /notice on IRC, so this is intended for
           internal use (logging, etc.) only. Note that server notices do
|          not trigger the NOTC bind. If the proc returns 1, Eggdrop will
|          not log the message that triggered this bind.

           New Tcl procs should be declared as
             proc notcproc {nick uhost hand text {dest ""}} {
               global botnick; if {$dest == ""} {set dest $botnick}
               ...
             }
           for compatibility.
         Module: server


    (15) CTCP (stackable)
         bind ctcp <flags> <keyword> <proc>
         proc-name <nick> <user@host> <handle> <dest> <keyword> <text>

         Description: dest will be a nickname (the bot's nickname, obviously)
           or channel name. keyword is the ctcp command (which can contain
           wildcards), and text may be empty. If the proc returns 0, the bot
           will attempt its own processing of the ctcp command.
         Module: server
Since these bindings provide different sets of parameters, you'll have to adopt your procs accordingly; either making one proc for each kind of binding, or altering your proc to support optional or arbitrary arguments. I'd generally suggest you go for the first option.
NML_375
d
demetrius_reis
Halfop
Posts: 42
Joined: Tue Aug 10, 2010 9:54 am

Post by demetrius_reis »

oks, I'll try the news, thanks for the help!
Post Reply