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 

!request problem (doesnt read chanusercount)

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
dotslasher
Halfop


Joined: 10 Aug 2003
Posts: 62

PostPosted: Wed Jun 02, 2004 7:08 am    Post subject: !request problem (doesnt read chanusercount) Reply with quote

Code:
##############################
# 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"



this is the script its poorly coded i know.

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:
logfile jpk #ThatNewChannel "logs/channelname.log"

and then write something in pisg.cfg in another dir.

<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 Smile
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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