| View previous topic :: View next topic |
| Author |
Message |
elisca Halfop

Joined: 27 Jan 2007 Posts: 65 Location: in the middle of nowhere
|
Posted: Wed Jan 31, 2007 10:58 pm Post subject: how to modification it? |
|
|
How to modif this scripts, so it will be use for multiple chan..
| Code: | #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 
Last edited by elisca on Thu Feb 01, 2007 6:18 pm; edited 1 time in total |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Thu Feb 01, 2007 2:35 pm Post subject: |
|
|
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: | | 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, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
elisca Halfop

Joined: 27 Jan 2007 Posts: 65 Location: in the middle of nowhere
|
Posted: Thu Feb 01, 2007 6:16 pm Post subject: |
|
|
| didn't work ! well.. after i have using this scripts.. i think one channel is enough to show it. |
|
| Back to top |
|
 |
|