# Script : Abuse v1.00 by David Proper (Dr. Nibble [DrN])
# Copyright 2001 Radical Computer Systems
# All Rights Reserved
#
# Testing
# Platforms : Linux 2.2.16 TCL v8.3
# Eggdrop v1.6.2
# And : SunOS 5.8 TCL v8.3
# Eggdrop v1.5.4
#
# Description : Abuse gives you a channel command for +mno's to log
# abuse reports. One a report is filed, it will send the
# entry to every +mn on the bot as a note. Useable for
# bot lending services and the like.
#
# Requested by : Sirus@UnderNet
#
# History : 08/12/2001 - First Release
#
#
# Future Plans : Fix Bugs. :)
#
# NOTICE: Author contact will be changing within a month. We're moving and
# will be hooking up with cable modem. Chaotix.net might come back
# in limited form. Check the DALnet and UnderNet channels for
# current contact information
#
# Author Contact : Email - DAProper@earthlink.net
# Home Page - http://home.earthlink.net/~daproper
# IRC - Nick: DrN UnderNet/DALnet
# Support Channels - #RCS @ UnderNet
# #RCS @ DALnet
#
# Chaotix.Net is currentlly offline. Should return no later then Jan 1st, 2002
#
# Radical Computer Systems - http://www.chaotix.net/rcs/
# To subscribe to the RCS mailing list: mail majordomo@chaotix.net and in
# BODY of message, type subscribe rcs-list
#
# Feel free to Email me any suggestions/bug reports/etc.
#
# You are free to use this TCL/script as long as:
# 1) You don't remove or change author credit
# 2) You don't release it in modified form. (Only the original)
#
# If you have a "too cool" modification, send it to me and it'll be
# included in the official release. (With your credit)
#
# Commands Added:
# Where F CMD F CMD F CMD F CMD
# ------- - ---------- - ------------ - ----------- - ----------
# Public: mno *abuse
# MSG: N/A
# DCC: N/A
#
# Public Matching: N/A
#
#\
# |##### NOTE: Anything on the Chaotix.Net domain is currently offline
# |##### until we move.
#/
set abusever "v1.00.00"
#<Sirus> I want something where when I do
#<Sirus> !abuse <#chan> <message>
#<Sirus> it writes a note to all the +mn
#<Sirus> that #chan <abbuse message>
#<Sirus> and I only want the +omnt to use the command
set cmdchar_ "*"
proc cmdchar { } {
global cmdchar_
return $cmdchar_
}
bind pub - [cmdchar]abuse pub_abuse
proc pub_abuse {nick uhost hand chan rest} {
set doit 0
if {([matchattr $hand m])} {set doit 1}
if {([matchattr $hand o])} {set doit 1}
if {([matchattr $hand n])} {set doit 1}
# if {([matchchanattr $hand |o $chan])} {set doit 1}
# if {([matchchanattr $hand |m $chan])} {set doit 1}
# if {[isop $nick $chan]} {return 0}
if {$doit == 0} {return 0}
set rest_ $rest
set c [lindex $rest 0]
set rest [lrange $rest 1 end]
if {[string index $c 0] != "#"} {
set rest $rest_
set c $chan
}
if {$rest == ""} {putnotc $nick "Calling Syntax: [cmdchar]abuse \[channel\] Message"; return 0}
set ulist [userlist n]
set ulist2 [userlist m]
putnotc $nick "Sending: $c - $rest"
foreach n $ulist2 {
if {![string match -nocase "*$n*" "$ulist"] > 0 } {lappend ulist "$n"}
}
set sendto1 ""
set sendto2 ""
foreach n $ulist {
set err [sendnote $nick $n "\[Abuse:$c\] $rest"]
if {$err == 0} {lappend sendto2 $n} else {lappend sendto $n}
}
if {$sendto == ""} {set sendto "No One"}
putnotc $nick "Sucessfully sent to: $sendto"
if {$sendto2 != ""} {putnotc $nick "Failed send to: $sendto2"}
}
putlog "Abuse $abusever by David Proper (DrN) -: LoadeD :-"
return "Abuse $abusever by David Proper (DrN) -: LoadeD :-"