Go Back   FlashFXP Forums > > > >

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-15-2012, 11:40 AM   #1
PlaN3t
Member
ioFTPD Foundation User
 
Join Date: Mar 2005
Posts: 43
Default ioNinja + Nxtools for dupe fuction

Hello,
just an info:

until a few months ago, I used the old version of ioFTPD (5.8.5r) on Win7 32bit with nxtools, phpsio and Alcobot.

Now, I want know if is possibile have the result for dupe command in mainchan and not private
and if is possible have the same spam of Alcobot, based under the command site search of nxtools, for have the correct position of the releases.

just an example:

<20:18:58> Obama: .dupe gaudino wanna dance
<20:18:59> |Berlusconi|: Dupe:
<20:19:00> |Berlusconi|: [01] - /MP3/0911/ - Alex_Gaudino_Feat._Taboo_-_I_Dont_Wanna_Dance********
<20:19:01> |Berlusconi|: [02] - /MP3/0903/ - Alex_Gaudino_Feat._Taboo-I_Dont_Wanna_Dance-***********
<20:19:03> |Berlusconi|: [03] - /MP3/0626/ - Alex_Gaudino_Ft._Taboo_-_I_Dont_Wanna_Dance-*********

thanks in advance
PlaN3t is offline   Reply With Quote
Old 11-16-2012, 11:18 AM   #2
o_dog
Senior Member
 
Join Date: May 2007
Posts: 692
Default

PlaN3t: As for msging chan change the $nick to $chan in the tcl i guess, never heard of anyone liking that much spam in channels so don't think i implemented it. As far as alcobot i have no idea what you mean so can't answer.
__________________
ioNiNJA
o_dog is offline   Reply With Quote
Old 11-16-2012, 11:35 AM   #3
PlaN3t
Member
ioFTPD Foundation User
 
Join Date: Mar 2005
Posts: 43
Default

in Nxtools, the commands dupe and search are different.
your script is based under the dupe command, I want know if is possible to set the search command, because it is more precise to give the location of the release.
PlaN3t is offline   Reply With Quote
Old 11-17-2012, 10:20 AM   #4
Henkie2
Member
 
Join Date: Dec 2011
Posts: 58
Default

On irc you can do !site search if you enable this function on dZSbot.conf (dunno if alcobot use this as well)
Henkie2 is offline   Reply With Quote
Old 11-18-2012, 11:50 AM   #5
PlaN3t
Member
ioFTPD Foundation User
 
Join Date: Mar 2005
Posts: 43
Default

mmh where is this function in dzsbot (anyway dont like this function for the spam) ?
yes, alcobot use this function.
PlaN3t is offline   Reply With Quote
Old 11-19-2012, 06:49 PM   #6
o_dog
Senior Member
 
Join Date: May 2007
Posts: 692
Default

you need to load the sitecommands plugin, might have to load some invite thing too. check plugins directory
There is no search function implemented in nxtools per such, so it's not possible.
__________________
ioNiNJA
o_dog is offline   Reply With Quote
Old 11-25-2012, 09:22 AM   #7
PlaN3t
Member
ioFTPD Foundation User
 
Join Date: Mar 2005
Posts: 43
Default

anyway, with a friend we have fixed the dzsbot.tcl because the command "dupe -f" don't work and we have added the spam for "dupe / dupe -f" in private o chan spam mode.

if someone is interested, here the changes:

1) modify the dzsbot.conf and add this line:


"set nx(private_spam) 0" (0 chan spam, 1 private spam)


we have added this line here (under line 150):

#### SETTINGS

#how many should we show?
set nx(new_limit) 5
set nx(nuke_limit) 5
set nx(unnuke_limit) 5
set nx(onliners_limit) 3
set nx(dupe_limit) 10
set nx(pres_limit) 5
set nx(private_spam) 0 <----






2) in dzsbot.tcl replace lines from 1709 to 1757 with this code, naturally original dzsbot.tcl ( http://www.pastebin.ca/2255124 ):





proc dupe {nick uhost handle chan args} {global nx announce

set pattern [join $args]
set temp [FixString $pattern]

if {$nx(private_spam) == 1} {
set target $nick
} else {
set target $chan
}

if {$pattern == "" || ($pattern == "-f")} {
sndone $target "USAGE dirs: !dupe <pattern> Wildcard=*"
sndone $target "USAGE file: !dupe -f <pattern> Wildcard=*"
return
}
if {[string first "?" $pattern] != -1 || [string first "*" $pattern] != -1 } {
if {!$nx(undupe_wild)} {
sndone $target "wildcards are not allowed"
return
}
if {[regexp -all -- {[[:alnum:]]} $pattern] < $nx(undupeChars)} {
sndone $target "you must specify at least $nx(undupeChars) alphanumeric chars with wildcards"
return
}
}

if {[lindex $pattern 0] == "-f"} {
set colName "FileName"
set tableName "DupeFiles"
set pathName "FilePath"
set pattern [lrange $pattern 1 end]
} else {
set colName "DirName"
set tableName "DupeDirs"
set pathName "DirPath"
}

set pattern [FixString $pattern]

sndone $target $announce(DUPE)

set query "SELECT * FROM $tableName WHERE $colName LIKE '$pattern' ESCAPE '\\' ORDER BY TimeStamp DESC limit $nx(dupe_limit)"
set count 0
if {[DbOpenFile "${tableName}.db"]} {
db eval $query values {
incr count
set age [expr {[clock seconds] - $values(TimeStamp)}]
set date [clock format $values(TimeStamp) -format "%Y-%m-%d"]
set section [getsectionname $values($pathName)]
sndone $target [string map[list %nr $count %date $date %u_name $values(UserName) %g_name $values(GroupName) %age [duration $age] %section $values($pathName) %dupename $values($colName)] $announce(DUPE_BODY)]
}

db close
}

if {!$count} {sndone $target $announce(DUPE_NONE)}
}



sorry for the english, anyway:


ENJOY

Last edited by PlaN3t; 11-25-2012 at 09:33 AM.
PlaN3t is offline   Reply With Quote
Old 11-25-2012, 09:30 AM   #8
PlaN3t
Member
ioFTPD Foundation User
 
Join Date: Mar 2005
Posts: 43
Default

another thing:
for change the type of spam for dupe command, I have changed the variable in the theme from "%date %b{%dupename}" to "%section %b{%dupename}"
if someone use PZS-NG-Classic.zst , others dont know..

PlaN3t is offline   Reply With Quote
Reply

Tags
alcobot, command, dupe, nxtools


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 12:44 AM.

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