Go Back   FlashFXP Forums > > > >

Harm's scripts ioBanana, Readd script, ioVote

Reply
 
Thread Tools Rate Thread Display Modes
Old 01-04-2005, 03:06 PM   #1
InNeedof
Junior Member
ioFTPD Foundation User
 
Join Date: Jan 2005
Posts: 11
Default IRC requests

Ok I know the first thing thats gonna be said is look in the forums, I have done this and TBH im still lost

using latest versions of IO / IOA / IOB

just cant figure out how to get the IRC request commands to function...

the !requests calls to the ftp and displays the requests, but u cant Add or Fill requests Via IRC, just need a lil help in the right direction to sort the problem out..... which info do I need to paste here to help see the prob ??

edit, still playin

[Request]
Request_Header = "-[Request]----------------------------------------------------------------------"
Request_Footer = "--------------------------------------------------------------------------[ioA]-"
Request_File = "e:\ioFTPD\site\request\.ioFTPD.message"
Request_Line = " [%##] [%-10user] -> %request"
Request_Field = " -> "
Request_Max = 3
Request_Max_User = 4
Request_Excluded_User_0 = "sitebot"
Request_Too_Many_Made = " Too many requests made. Limit is %.0request"
Request_Too_Many_Made_User = " You have made too many requests already. Limit is %.0request"
Request_Already_Made = " That is already requested"
Request_Output_Line = " Added request: %request"
Request_Log = ""%user" "%group" "%request""
Request_Add_Tag = 1
Request_Tag = "[REQ]-%request"
Request_IRC_Uid = 104
Request_IRC_Gid = 1



sitebot nick is sitebot But on irc eggdrop is Britney(dont laugh) would that make a difference ?
InNeedof is offline   Reply With Quote
Old 01-05-2005, 07:23 AM   #2
Bobby_Digital
Junior Member
 
Join Date: May 2004
Posts: 9
Default

I think u have to be +o on the eggdrop inorder to add/delete/fill requests. So try to add +o to your nick in eggdrop and see if that works.

Good luck!

/Bobby_Digital
Bobby_Digital is offline   Reply With Quote
Old 01-05-2005, 08:51 AM   #3
InNeedof
Junior Member
ioFTPD Foundation User
 
Join Date: Jan 2005
Posts: 11
Default

tried it , hasnt made any difference

.chattr <hand> +o <#channel>

set that to irc nick and channel

.chattr ****** +o #*****


nothing changed.... and still trying , thx for the reply
InNeedof is offline   Reply With Quote
Old 01-05-2005, 12:47 PM   #4
jboy53
Junior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 23
Default

does this file exist?

Request_File = "e:\ioFTPD\site\request\.ioFTPD.message"
jboy53 is offline   Reply With Quote
Old 01-05-2005, 03:34 PM   #5
InNeedof
Junior Member
ioFTPD Foundation User
 
Join Date: Jan 2005
Posts: 11
Default

Quote:
Originally posted by jboy53
does this file exist?

Request_File = "e:\ioFTPD\site\request\.ioFTPD.message"
nice thought.. even thought it was the problem.. as my requests folder root is actually

D:\requests

so I added the message file to it and redid the path,

Request_File = "D:\requests\.ioFTPD.message"


unfortunately its still the same
InNeedof is offline   Reply With Quote
Old 01-05-2005, 04:11 PM   #6
jboy53
Junior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 23
Default

does site REQUEST whatever work?

just to rule out an ioA problem
jboy53 is offline   Reply With Quote
Old 01-05-2005, 04:16 PM   #7
InNeedof
Junior Member
ioFTPD Foundation User
 
Join Date: Jan 2005
Posts: 11
Default

Quote:
Originally posted by jboy53
does site REQUEST whatever work?

just to rule out an ioA problem

yeah works gr8 and displays the newly added request in channel.. and on site when u set as filled, also displays in channel from site..

just the adding of request from irc ...
InNeedof is offline   Reply With Quote
Old 01-05-2005, 04:39 PM   #8
jboy53
Junior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 23
Default

I haven't used ioB for a while... but...

it appears that out of the box ioBanana does not use this !reqfilled and so on and if memory serves me right (now its all coming back to me) this was down to security reasons.

there is a fix that possibly done but im not sure how one would really go about it...

I prepare to be shot down by harm if I am wrong about the out of the box comment.. harm I apologise in advance.

perhaps this could be a request script section or somebody may pm you or paste how it "could" be done in ioB
jboy53 is offline   Reply With Quote
Old 01-07-2005, 09:32 AM   #9
InNeedof
Junior Member
ioFTPD Foundation User
 
Join Date: Jan 2005
Posts: 11
Default

ok cheers.. ill keep checking back to see if theres any updates on this
InNeedof is offline   Reply With Quote
Old 01-08-2005, 02:20 AM   #10
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

jboy53: You are absolutely right, there's no such command in ioBanana v20.

No that this couldn't be easily added (and secured via +o or the trusted hostmasks) but ...
1) you wouldn't be the requester shown by ioA.
2) as a consequence you wouldn't receive any message about the request being filled.

That is for !reqadd but it's the same for !reqfilled.
Harm is offline   Reply With Quote
Old 02-06-2005, 03:30 AM   #11
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

The best solution I can come up with at the moment is to add "-%ircnick" to the requested dir on !reqadd.
I don't consider this as a really nice solution and will most probably disable those command by default. If you really want something, you can at least login They will most probably be available in ioB2 anyway (but disabled as I said) since they don't really eat cpu or bw.

WarC: There's an option to specify nuker username and group on NUKE, what about the same one on REQUEST ? I know irc nicknames aren't the sames as usernames ; I would use usernames on the bot, not in channel.
Harm is offline   Reply With Quote
Old 02-06-2005, 03:48 AM   #12
EwarWoo
Senior Member
FlashFXP Registered User
ioFTPD Registered User
 
Join Date: Oct 2002
Posts: 462
Default

1 solution is to specify who the request is for in the command, and if they supply an invalid username (or none at all) it can just reject it with reason
EwarWoo is offline   Reply With Quote
Old 02-06-2005, 01:58 PM   #13
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

Using the trusted hosts (already there) or the bot's own userlist is faster and a bit more secure.
Harm is offline   Reply With Quote
Old 03-06-2005, 10:34 PM   #14
Threepw00d
Junior Member
 
Join Date: Jul 2003
Posts: 6
Default

Since I can't wait for HaRM to add iRC request to ioB2, I decided to write a little iRC request script myself. Its a bit rudimentary, I haven't spent much time refining/testing it so please forgive my lack of coding panache! :P

1. You need to be using latest versions of ioFTPD/ioB/ioA

2. in ioftpd.ini, under [FTP_Custom_Commands] section add:

################################################## #############################
# Additional custom commands to enable IRC requesting
reqirc = EXEC ..\scripts\ioA\ioA.exe REQUESTIRC
reqdelirc = EXEC ..\scripts\ioA\ioA.exe REQDELIRC
reqfilledirc = EXEC ..\scripts\ioA\ioA.exe REQFILLEDIRC
################################################## #############################

3.1 in iobanana.tcl, add the following binds in BINDS section:

################################################## #############################
# Additional Binds to enable IRC requesting
bind pub - $ioBvar(cmdpre)request proc_irc_request
bind pub - $ioBvar(cmdpre)reqdel proc_irc_reqdel
bind pub - $ioBvar(cmdpre)reqfilled proc_irc_reqfilled
################################################## #############################


3.2 in iobanana.tcl, add the following procs at the end:

################################################## ##############################
# Additional procs to enable IRC requesting
proc proc_irc_request {nick uhost hand chan args} {
global ioBvar
{if {[ioB:istrusted $uhost]} {
set nicksplit [split $nick {}]
set count 0
foreach alpha $nicksplit {
if {[string equal $alpha "\\"] || [string equal $alpha "\|"] } {
set nicksplit [lreplace $nicksplit $count $count]
incr count -1
}
incr count
}
set nick [join $nicksplit {}]
set arg [join[list $args "$nick@iRC"] "-"]
set status [catch {set ee [::ftp::Quote $ioBvar(ftp) SITE REQIRC $arg]} result]
if { $status == 0 } {
set output "-:[b]:[b] [c]$ioBvar(color1)request[c] [b]:[b]:- [b]\[REQ\]-%request[b] added by [b]%name[b]" ;
set output [ioB:replacevar $output "%name" $nick]
set output [ioB:replacevar $output "%request" $args]
set output [ioB:basicreplace $output "REQUEST"]
ioB:tsend chan $chan $output
}
}
}

proc proc_irc_reqdel {nick uhost hand chan args} {
global ioBvar
{if {[ioB:istrusted $uhost]} {
set arg [lindex $args 0]
if { [string is digit -strict $arg] } {
set status [catch {set ee [::ftp::Quote $ioBvar(ftp) SITE REQDELIRC $arg]} result]
set lines [split $ee \n]
set lines [lreplace $lines 0 0]
set lines [lreplace $lines end end]
set lines [lreplace $lines end end]
if { $status == 0 } {
if { [string equal [lindex $lines 0] "200- Request not found"] } {
set output "-:[b]:[b] [c]$ioBvar(color1)error[c] [b]:[b]:- Request number [b]$arg[b] not found: check !requests for correct request number"
ioB:tsend chan $chan $output
} else {
set output "-:[b]:[b] [c]$ioBvar(color1)request deleted[c] [b]:[b]:- request [b]%request[b] deleted by [b]%user[b]@iRC"
set output [ioB:replacevar $output "%user" $nick]
set output [ioB:replacevar $output "%request" $arg]
ioB:tsend chan $chan $output
}
}
} else {
set output "-:[b]:[b] [c]$ioBvar(color1)error[c] [b]:[b]:- Request number not found: $arg is not a number"
ioB:tsend chan $chan $output
}
}
}

proc proc_irc_reqfilled {nick uhost hand chan args} {
global ioBvar
set arg [lindex $args 0]
if { [string is digit -strict $arg] } {
set status [catch {set ee [::ftp::Quote $ioBvar(ftp) SITE REQFILLEDIRC $arg]} result]
set lines [split $ee \n]
set lines [lreplace $lines 0 0]
set lines [lreplace $lines end end]
set lines [lreplace $lines end end]
if { $status == 0 } {
if { [string equal [lindex $lines 0] "200- Request not found"] } {
set output "-:[b]:[b] [c]$ioBvar(color1)error[c] [b]:[b]:- Request number [b]$arg[b] not found: check !requests for correct request number"
ioB:tsend chan $chan $output
} else {
set lines [split [lindex $lines 0] :]
set reqfilled [string trim [lindex $lines 1]]
set output "-:[b]:[b] [c]$ioBvar(color1)filled request[c] [b]:[b]:- [b]\[%request\][b] > [b]\[REQ\]-%reqfilled[b] filled by [b]%user[b]@iRC"
set output [ioB:replacevar $output "%user" $nick]
set output [ioB:replacevar $output "%request" $arg]
set output [ioB:replacevar $output "%reqfilled" $reqfilled]
ioB:tsend chan $chan $output
}
}
} else {
set output "-:[b]:[b] [c]$ioBvar(color1)error[c] [b]:[b]:- Request number not found: $arg is not a number"
ioB:tsend chan $chan $output
}
}
################################################## ##############################

4. Add a user iRC/iRC, or even sitebot/sitebot will do (something to let you know that request was made from iRC). Then put that uID and gID into Request_IRC_Uid and Request_IRC_Gid in ioA.cfg. uID and gID is in \etc\UserIdTable and \etc\GroupIdTable.

5. this assumes that you are using ioB_colors.skin to display output. if you don't want colors remove [c]$ioBvar(color1) and the other [c] wherever you see it.

6. rehash (or restart) your bot, rehash site config (or restart ioFTPD).

7. test to make sure everything works as it should. add users to trusted list if you haven't already. only those users can !request or !reqdel who have been added in ioBanana.tcl in set ioBvar(trusted) {ident1@ip1 ident2@ip2}. All users can reqfill.

Features:

*Trusted users can make request in chan with !request <rls.name-grp>
*Request will be added as [REQ]-rls.name-grp-iRCNick@iRC. It shouldn't be too hard to customize that to your taste.
*Trusted users can delete request (which hasn't been !reqfilled) in chan with !reqdel <req number> (use !requests to check the rls. number)
*Users with pipe (|) or (\) in iRC nickname will have that character ripped off because Windows file system doesn't allow directories with those chars. So if someone has nickname |||\\\||| his name won't show up. Request made by |SpankMe| will look like [REQ]-rls.name-grp-SpankMe@iRC
*Everyone in chan can do !reqfilled <req number>
*Report bugs and suggestions here. I'll check back from time to time or the other accomplished coders can help you out too.
Threepw00d is offline   Reply With Quote
Old 03-09-2005, 08:27 AM   #15
Master Sammy
Member
 
Join Date: Jan 2004
Posts: 44
Default

Does not go with me unfortunately
Master Sammy is offline   Reply With Quote
Reply

Tags
%request, ftp, irc, requests, sitebot

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:38 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)