BNC Request/Manager

Do you have script in mind but no ability to make it, type in what it should do, and you might be lucky.

BNC Request/Manager

Postby Ark » Fri Oct 31, 2008 1:10 pm

hello what i need this script to do is let users apply for bncs of course :roll: lol ok the requests would need to be stored in to a database ready and waiting for me to recall them when im online or active i would like the requesters to request in #bnc and for me to retrive in my bnc admin chan i would also like the bot to change the news part of the topic in both chans when a request has been made like applacations pending [1] something like that i would also like a help section
i would also like a command to approve bncs and let the requester know there bnc has been approved and to sit tight while it gets setup and a command to deny a bnc for whatever reason and last but not least :shock: a command to let the user know what address and port to connect to via msg or notice if u guys could help me out i would be most greatful btw i have scowerd the net googled to death and ur my last hope ;)
Ark
 

Re: BNC Request/Manager

Postby fraguk » Fri Oct 31, 2008 6:07 pm

try google for sBNC Script by LaW.
fraguk
 

Re: BNC Request/Manager

Postby sKippah » Fri Oct 31, 2008 7:44 pm

To ask for a Script in here seems to 80% useless.

And seems some ppl are blind too

The Threadstarter wrote already ....ould help me out i would be most greatful btw i have scowerd the net googled to death and ur my last hope

And u send him back to google. Nice lol

So i got this for u

http://www.mygeex.de/?p=26

next here http://forum.egghelp.org/viewtopic.php?p=84899

the second needs some more TCL scripts like mysql and.. well must be all together 3 tcl scripts
sKippah
 

Re: BNC Request/Manager

Postby Ark » Sat Nov 01, 2008 2:14 am

Thanks for ur help guys but i dont use sbnc i use ZNC and some of the scripts were in german i dont mean to sound ungreatful but i carnt get my head round the tcl lang let alone german lol i am currently learning mrc withch is why i dont want to switch to another lang but i know what i need has to be done through eggdrop makes sense with the 99.9% uptime what im looking for is a real nice person who dont mind helping others out just like you too to maybe script a custom script for me i know there are people like that out there i found u too its just finding them :| thanks again guys ;)
Ark
 

Re: BNC Request/Manager

Postby Ark » Sat Nov 01, 2008 4:26 pm

this is a file i modified i do not claim any credit for this its just an idea what im after it still needs a lot added but i dont know how nor have all the time to learn how so if anyone can help adding to this already modified script post here or pm me :mrgreen: this actualy can work but it saves a message for any nick not the eggdrop nick and ive had to comment out 2 puthelp becuase i want only the bot owner ie me to see them and acsses the .pending and .clear
i also need a topic changer part when someone requests a bnc for example a user types /msg botnick !apply nick:user:pass:email its says ur request has been loged after that i want it to change topic of the bnc channel the main topic stays the same while the news part changes to Requests pending {1}and when i type .approve it del the request and notices the user saying bnc approved and changes topic to requests pending [0] i know im askin for a lot but this is really gonna help me out

#################################
# Public notes by Sergio100 1.01 #
#################################

#You should make a directory named BNCRequests where the eggdrop lives :)
#It's messy, i know... But i wrote it without help and without knowing TCL :)
#TO DO: Check users by host, not by nick.
#1.01: I was using string wordend for nicks, but it doesnt work with some characters.
# So i now use lindex and lrange. It's quite faster too :D

bind join - * onjoin_BNCRequests
bind msg - .clear erase_BNCRequests
bind msg - !Apply leave_BNCRequests
bind msg - .pending get_BNCRequests
bind msg - !BNCHelp help_BNCRequests

#This is the per user limit on notes received at one time (not sent! :).
set limitnotes 10

proc help_BNCRequests { nick uhost hand text } {
global botnick
puthelp "PRIVMSG $nick :Type !Apply BNC Nick:User:Pass:Email to send a Request | please Allow Some Time For Setup As We May Be Busy We Will Get Back To You."
#puthelp "PRIVMSG $nick :The script will let you know if you have notes when you join the channel. Please delete your notes after reading them. Otherwise you wont be able to get more (limit is 10)"
#puthelp "PRIVMSG $nick : Use /msg $botnick .Pending to read The BNC Requests or /msg $botnick .clear to delete them.
return 1
}

proc onjoin_BNCRequests { nick uhost hand chan } {
global botnick
set n [dosearchnote $nick]
if ($n>0) {
putserv "NOTICE $nick :You have $n Requests waiting to be Approved. Use /msg $botnick .pending to read them."
return 1
}
return 0
}

proc erase_BNCRequests { nick uhost hand text } {
set lowercasenick [string tolower $nick]
set a [dosearchnote $nick]
if ($a>0) {
putserv "NOTICE $nick :All BNC Requests have been deleted"
eval "exec rm ./BNCRequests/public$lowercasenick.txt"
return 1
} else {
putserv "NOTICE $nick :No Requests To Clear"
return 0
}
}

proc dosearchnote {getnick} {
set lowercasenick [string tolower $getnick]
set notesf [file exists "./BNCRequests/public$lowercasenick.txt"]
if ($notesf==0) {
return 0
}
set notesfile [open "./BNCRequests/public$lowercasenick.txt" "r+"]
set numbernotes 0
while {[eof $notesfile] == 0} {
set line [gets $notesfile]
set nickline [lindex $line 0]
if {[string compare [string tolower $nickline] [string tolower $getnick]] == 0} {
set numbernotes [incr numbernotes]
}
}
close $notesfile
return $numbernotes
}

proc leave_BNCRequests { nick uhost hand text } {
global limitnotes
set getnick [lindex $text 0]
set msg [lrange $text 1 end]
set numbernotes [dosearchnote $getnick]
set cmp [expr $numbernotes >= $limitnotes]
if ($cmp>0) {
putserv "NOTICE $nick :The Bots Requests Are Full $limitnotes Requests. No more Requests can be added to prevent spam."
} else {
set lowercasenick [string tolower $getnick]
set thereis [file exists "./BNCRequests/public$lowercasenick.txt"]
set cmp [expr $thereis == 1]
if ($cmp) {
set notesfile [open "./BNCRequests/public$lowercasenick.txt" "a"]
} else {
set notesfile [open "./BNCRequests/public$lowercasenick.txt" "w+"]
}
puts $notesfile "$getnick $nick $msg"
putserv "NOTICE $nick :Request to BNC Admins has been Loged PLease Allow At Least 24HRs For Setup We Maybe Busy ;]."
close $notesfile
}
return 1
}

proc get_BNCRequests { nick uhost hand text } {
set lowercasenick [string tolower $nick]
set thereis [file exists "./BNCRequests/public$lowercasenick.txt"]
if ($thereis==0) {
putserv "NOTICE $nick :No Requests At Presant."
return 1
}
set notesfile [open "./BNCRequests/public$lowercasenick.txt" "r+"]
if {[eof $notesfile]} {
putserv "NOTICE $nick : There Are No requests."
close $notesfile
} else {
set yes 0
set b [dosearchnote $nick]
set cmp [expr $b > 0]
if ($cmp<=0) {
putserv "NOTICE $nick :There Are No Requests."
close $notesfile
return 1
}
while {[eof $notesfile] == 0} {
set line [gets $notesfile]
set thisnick [lindex $line 0]
set cmpstr [string compare [string tolower $thisnick] [string tolower $nick]]
if ($cmpstr==0) {
set sendnick [lindex $line 1]
set msg [lrange $line 2 end]
putserv "NOTICE $nick :There Is A Request From $sendnick -> $msg"
set yes 1
}
}
if { $yes==0 } {
putserv "NOTICE $nick :There Are No Requests Arrr U SSStupid or Something."
}
close $notesfile
}
return 1
}

##############################
# Show load statement #
##############################
putlog " Public notes by Sergio100 1.01 LOADED"
Ark
 


Return to TCL Scripting Request

Who is online

Users browsing this forum: No registered users and 2 guests

cron