Code: Select all
##############################
# Enter the main channel here
set mainchan "#IRCStats"
############################
# enter your ircnick here
set maintainer "Darth_Unslut"
bind pub -|- !request request:request
proc request:request {nick host handle chan text} {
global req_nick req_chan mainchan maintainer
set req_chan $text
set req_nick $nick
putquick "PRIVMSG $mainchan :\002( $mainchan )-(\002 Request service Inactive while checking $req_chan \002)\002"
channel add $req_chan
bind join -|- "$req_chan $::botnick*" checks:checks
}
proc checks:checks {nick host handle chan} {
global req_nick req_chan mainchan maintainer botnick
if {[isop $req_nick $req_chan]} { set isop 1 } else { set isop 0 }
putquick "PRIVMSG $req_chan : Checking for\002 1 \002or More users ..."
set chan_amount [llength [chanlist $req_chan]]
if {$chan_amount >= 20} {
putquick "PRIVMSG $req_chan :\002$chan_amount\002 users found ! Requirement Met ! Enjoy my services."
set chan_amount_check 1
putquick "PRIVMSG $mainchan :\002( $req_chan )$req_chan met the requirements. Tnx for your request. Enjoy"
putquick "PRIVMSG $req_chan :$mainchan Requirements met! $botnick will now start logging your channel."
putquick "PRIVMSG MEMOSERV :send $maintainer \002( $req_chan : $req_nick )\002 has requested stats and has been aproved."
return
} else {
set chan_amount_check 0
putquick "PRIVMSG $req_chan :\002$chan_amount users found !\002 Requirement \002NOT\002 Met!"
putquick "PRIVMSG $req_chan :$mainchan Requirements NOT met!"
channel remove $req_chan
putquick "PART $req_chan :$mainchan Requirements NOT met!"
putquick "PRIVMSG $mainchan :Requirements not met for $req_chan"
}
return 0
}
putlog "loaded !request by Darth_Unslut"
thing is: It doesnt read the channel user count when it joins. what do i need to add to make it do a /names #channel or update the userlist (like IAL for mirc).
maybe use a raw? and how do i make the !request cmd inactive when its checking for a channel?
i would also like to know how the eggy could write to a file example eggdrop.conf to add the following line:
Code: Select all
logfile jpk #ThatNewChannel "logs/channelname.log"
<channel="#ChannelName">
Logdir="/home/darth/eggdrop/logs"
LogPrefix ="channelname"
Format="eggdrop"
Maintainer="Darth_Unslut"
Network="Exhile.net"
Outputfile="channelname.html"
</channel>
the whole idea of this is to automate the channel adding process and adding the channel to the Pisg config file.
i know the code is fubar lil bit of help plz
