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.

how to modification it?

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
User avatar
elisca
Halfop
Posts: 65
Joined: Sat Jan 27, 2007 4:23 am
Location: in the middle of nowhere

how to modification it?

Post by elisca »

How to modif this scripts, so it will be use for multiple chan..

Code: Select all

#author Ha0
set validchannel "#mychan"

set abuselogfile "Abuse.txt"

if {![info exists validchannel]} {die "ERROR:Check back again in set validchannel settings.."}
set arg.v "Abuse User Report"


bind kick - * bot_abuse_kick
bind pub n !report abuse_user_report

proc bot_abuse_kick {nick host handle chan who excuse} {
    global abuselogfile botnick validchannel
    if {$who != $botnick} {return 0}
    set data "$nick ($handle) kicked me from $chan for: $excuse"
    if {$abuselogfile != ""} {set r [open $abuselogfile a+]; puts $r "[strftime "%d %b %Y, %H:%M %z"]: $data"; close $r}
    putserv "privmsg $validchannel :\[$nick\] (\002$handle\002) kicked me from \002$chan\002 for: \002$excuse\002"
    return 0
}


proc abuse_user_report {nick host handle channel var} {
global abuselogfile botnick validchannel
set fd [open $abuselogfile r]
set abuselist { }
while {![eof $fd]} {
 set tmp [gets $fd]
 if {[eof $fd]} {break}
  set abuselist [lappend abuselist [string trim $tmp]]
 }
 close $fd
 if {[llength $abuselist] == 0} {
     putserv "notice $nick :No such list of abuse in database."
      return 0
 }
 putserv "notice $nick :List Of Abuse\n"
 foreach tmp $abuselist {
   putserv "notice $nick :- $tmp"
 }
putserv "notice $nick : End of Abuselist\n"
 return 0
}

putlog "${arg.v} loaded Successfuly..."
Thanks in advance :D
Last edited by elisca on Thu Feb 01, 2007 6:18 pm, edited 1 time in total.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Since validchannel is only used as target for a privmsg, I guess you could put any valid target according to rfc1459; such as multiple targets (think most servers these days permit up to 5):

Code: Select all

set validchannel "#channel1,#channel2,#channel3"
Keep in mind that according to rfc1459 there can be no spaces between the channel-names or commas (,) within the target.
NML_375
User avatar
elisca
Halfop
Posts: 65
Joined: Sat Jan 27, 2007 4:23 am
Location: in the middle of nowhere

Post by elisca »

didn't work ! well.. after i have using this scripts.. i think one channel is enough to show it.
Post Reply