Go Back   FlashFXP Forums > > > >

Harm's scripts ioBanana, Readd script, ioVote

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-04-2004, 05:23 PM   #1
Quincy
Member
ioFTPD Foundation User
 
Join Date: Nov 2004
Posts: 30
Default [Old][Fixed] Colors for different sections

Hi all.
I'm using ioBanana v2.0 and the ioB_dZS.skin and would like the IRC announces for different %sections colored differently (just the %sections part) Is that possible?
Quincy is offline   Reply With Quote
Old 12-04-2004, 05:27 PM   #2
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

There's a %scolor cookie that is replaced with the section's color code (or the default color code if there's none available).
Check the default ioBanana.tcl, there might be one or two examples of per section color codes. Then, use [c]%scolor <text> [c] in your *.skin file.
Harm is offline   Reply With Quote
Old 12-04-2004, 06:29 PM   #3
Quincy
Member
ioFTPD Foundation User
 
Join Date: Nov 2004
Posts: 30
Default

Have modified ioBanana.tcl in this way:
# Default color for irc announces
set ioBvar(color1) 3
# Per section colors
set color(stuff) 15
set color(txtfiles) 11
set color(pics) 4

and the skin like this:

set announce(NEWDIR) "\[[c]%scolor stuff [c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group."

set announce(NEWDIR) "\[[c]%scolor txtfiles [c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group."

set announce(NEWDIR) "\[[c]%scolor pics [c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group."

It gives different colors according to those set in ioBanana.tcl but on chan it announces the same directory (lets say txtfiles) whatever the section in which ur creating a new dir.
Feel thats not the way to modify the skin...
Quincy is offline   Reply With Quote
Old 12-05-2004, 01:36 AM   #4
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

Huh ? The %section cookie is still needed. And when you set a variable again, the old one is gone.
Harm is offline   Reply With Quote
Old 12-05-2004, 04:52 AM   #5
Quincy
Member
ioFTPD Foundation User
 
Join Date: Nov 2004
Posts: 30
Default

Ok thanks!
Still have problem tho. Now my ioB_dZS.skin look like this

set announce(NEWDIR) "\[[c]%scolor STUFF [b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"
set announce(NEWDIR) "\[[c]%scolor PICS[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"
set announce(NEWDIR) "\[[c]%scolor TXTFILES[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"
set announce(NEWDIR) "\[[c]%scolor OLD[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"

However, announcing in chan will always merge the dir in which a newdir is created and the last dir listed in the skin.
I.e. if you're uploading in PICS, announce in irc will be: [ PICSOLD].
Mmmhh
Quincy is offline   Reply With Quote
Old 12-05-2004, 06:03 AM   #6
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

You must have only *ONE* $announce(NEWDIR) variable.
Code:
set announce(NEWDIR) "\[[c]%scolor[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"
And that's all.

The %scolor cookie is replaced with the section's color and the %section one with the section's name.

Beware, sections are case sensitive.
set color(stuff) "7"
is different from
set color(STUFF) "7"
Harm is offline   Reply With Quote
Old 12-05-2004, 08:08 AM   #7
Quincy
Member
ioFTPD Foundation User
 
Join Date: Nov 2004
Posts: 30
Post

hey, THANKS:banana:
Quincy is offline   Reply With Quote
Old 12-05-2004, 03:48 PM   #8
qba
Junior Member
 
Join Date: Oct 2003
Posts: 8
Default

If you can only have one variable for the scookie, how can different sections have different colours?

give me a better explanation please
qba is offline   Reply With Quote
Old 12-05-2004, 05:34 PM   #9
Quincy
Member
ioFTPD Foundation User
 
Join Date: Nov 2004
Posts: 30
Default

Colors per section are defined in iobanana.tcl, in the Appearance list, like this:

set color(section name) 7

where the number deals with the color palette in mirc
Quincy is offline   Reply With Quote
Old 12-05-2004, 05:38 PM   #10
qba
Junior Member
 
Join Date: Oct 2003
Posts: 8
Default

I knwo that, but the function does not work, how do i fix it manually?
qba is offline   Reply With Quote
Old 12-06-2004, 07:05 AM   #11
Quincy
Member
ioFTPD Foundation User
 
Join Date: Nov 2004
Posts: 30
Default

Actually it didnt work for me too, but dunno whats wrong.

Anyway I temporarily solved the problem mentioned above by setting colors in iobanana.tcl and configuring the iob_dzsbot.skin in this way:

set announce(NEWDIR) "\[[c]%scolor OLD[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"

set announce(NEWDIR) "\[[c]%scolor STUFF[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"

set announce(NEWDIR) "\[[c]%scolor[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"

i.e. the last NEWDIR is without spaces or dirnames after the %scolor cookie. This way I've diff colors per sections and dont have 2 sections name merged in irc announce.
Needless to say that this requires a huge job designing the script as u need a %scolor command for any dir u have on site and for any command u want to announce (race, halfway, etc.)
Hope Harm can help some more
Quincy is offline   Reply With Quote
Old 12-10-2004, 05:28 PM   #12
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

qba: You can only use that cookie with ioBanana v20. If you are a registered user, please update your board profile.

Quincy: Let's rephrase. You don't need more than one line to define $announce(NEWDIR) or any other $announce variable.
Every time you add a line starting with "set announce(NEWDIR)", you define the $announce(NEWDIR) variable. Since there's only one variable with this name, this means previous lines are finally ignored.

The only line you need with set announce(NEWDIR) is:
Code:
set announce(NEWDIR) "\[[c]%scolor[b]%section[b][c]\] + New: %path/[b]%release[b] by [b]%user[b]/%group"
The same goes for all other announces. You only have to add [c]%scolor and [c] to the existing announces and that isn't a huge job.
Harm is offline   Reply With Quote
Old 12-11-2004, 04:20 AM   #13
Quincy
Member
ioFTPD Foundation User
 
Join Date: Nov 2004
Posts: 30
Default

Eheh no its not. I said a huge work was when i added the %scolor variable to each sections for each announce. Now I got how it works, thanks
Quincy is offline   Reply With Quote
Old 04-28-2005, 05:11 PM   #14
Frodo
Junior Member
ioFTPD Foundation User
 
Join Date: Sep 2003
Posts: 15
Default

Hi!
Is it possible to get the same colors in the "free all" listing
Frodo is offline   Reply With Quote
Old 04-28-2005, 05:50 PM   #15
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

You can only use the %scolor cookie for announces related to a section. This means replies to commands (like !free) don't support it.
Harm is offline   Reply With Quote
Reply

Tags
%sections, announces, colored, differently, irc

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:18 PM.

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