egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to modification it?

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
elisca
Halfop


Joined: 27 Jan 2007
Posts: 65
Location: in the middle of nowhere

PostPosted: Wed Jan 31, 2007 10:58 pm    Post subject: how to modification it? Reply with quote

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 Very Happy


Last edited by elisca on Thu Feb 01, 2007 6:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Feb 01, 2007 2:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
elisca
Halfop


Joined: 27 Jan 2007
Posts: 65
Location: in the middle of nowhere

PostPosted: Thu Feb 01, 2007 6:16 pm    Post subject: Reply with quote

didn't work ! well.. after i have using this scripts.. i think one channel is enough to show it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber