A few of us on aniverse irc are using this script in order to help catch and gline spammers on the network. The new system operates by messages being sent to #nospam when someone is kicked so they can be dealt with. The channel is -n which allows private messages form outside the channel to be put into the channel.
Is there something i can add to this script to allow the bot to report when a spammer hits the channels the bot operates on. If possible, with the format
<time> <date> <channel> <spammer nick> <spammer host> <spammer message>
Best place i think for the code to act is in the Spammer logger section of the script
Code: Select all
proc sl_write {type who where what why} {
global spam-log spam-log-file
if {${spam-log}} {
set file [open ${spam-log-file} a+]
set when [strftime "%D %r"]
switch $type {
c {puts $file "$when: $who said: (#$why) $what in: $where"}
d {puts $file "$when: $who was sending: $what to people in: $where"}
i {puts $file "$when: $who invited me to: $where"}
m {puts $file "$when: $who messaged me with: (#$why) $what"}
n {if {![string length $where]} {set where "me"} ; puts $file "$when: $who noticed: $where with: (#$why) $what"}
p {puts $file "$when: $who parted from: $where with: (#$why) $what"}
}
close $file
}
}
Edit, ok we tried this to add the feature
Code: Select all
if {${spam-log}} {
switch $type {
c {putserv "PRIVMSG #nospam :$when: $who said (#$why) $what in: $where"}
d {putserv "PRIVMSG #nospam :$when: $who was sending: $what to people in: $where"}
i {putserv "PRIVMSG #nospam :$when: $who invited me to: $where"}
m {putserv "PRIVMSG #nospam :$when: $who messaged me with: (#$why) $what"}
n {if {!string length $where]} {set where "me"} ; putserv "PRIVMSG #nospam :$when: $who noticed$
p {putserv "PRIVMSG #nospam :$when: $who parted from: $where with: (#$why) $what"}
}
set file [open ${spam-log-file} a+]
set when [strftime "%D %r"]
switch $type {