FlexHub Forum

[Commited] Redirect

Offline massi

  • FlexHub Ambassador and Forum Stalker
  • *
  • 301
[Commited] Redirect
« on: June 15, 2011, 13:48:00 »
If it were possible to implement the right gently handling redirects. For large hub would say basic and very important and especially handy to have the commands available on the right note.
« Last Edit: September 17, 2011, 16:31:06 by LadyStardust »

Offline FlipFlop™

  • FlexHub Developer
  • *****
  • 505
Re: Redirect
« Reply #1 on: June 15, 2011, 14:06:52 »
With !addcmd you can add the rightclicks you want in your hub yourself:

Code: [Select]
!addcmd <name> [-o<options>] [-p<profilelevel>] [-m<max profilelevel>] [-u<use profilelevel>] [-t<time>] [-h"<helptext>"] "<text>"

<options> A number created by adding the values of the following options:

0 Output to mainchat (default)
1 Display text in PM instead of mainchat
2 Show text to all (when this is used, you can use -p and -m to limit output to certain profilelevels)
4 Show text when user logged in (welcome messages/rightclicks)
8 Don't allow the command to be activated in mainchat (useful in combination with 4)
16 Do not create an item in !help for this command (forced when 8 is used)
32 Do not create a rightclick item for this command (forced when 8 is used)
64 Text should be send in raw format instead of mainchat/pm (useful to send custom rightclicks)
128 Only send to ADC user(s)
256 Only send to NMDC user(s)

<profilelevel> (for use with option 2) A number in the range from -1 (User) to 10 (Hubowner) that is the lowest profile that will see the command output (default is -1)
<max profilelevel> (for use with option 2) A number in the range from -1 (User) to 10 (Hubowner) that is the highest profile that will see the command output (default is level 10)
<use profilelevel> A number in the range from -1 (User) to 10 (Hubowner) that is the lowest profile that can use the command (default is -1)
<time> (for use with option 2) Time in seconds between broadcasts, or use m for minutes, h for hours

<helptext> Helptext to show in !help and display in rightclick usercommands
<text> Text to send, must be the last parameter on the line
For rightclick commands for NMDC you need to use -o332:
Optionnnumber 332 = 4 + 8 + 64 + 256 (On login / Don't allow in mainchat / Raw / Only to NMDC)

NMDC Example:

!addcmd redirectmenu -o332 -p10 -u10 "$UserCommand 1 3 FlexHub Commands\Redirects\Main address$<%[mynick]> !set rd_main  %[line:Main redirect address]&#124;|$UserCommand 1 3 FlexHub Commands\Redirects\Passive address$<%[mynick]> !set rd_passive  %[line:Flood redirect address]&#124;|"

For the usercommands themselves use the proper NMDC syntax: http://www.teamfair.info/wiki/index.php?title=$UserCommand

And the same technique applies to ADC, ofcourse you'll have to use the proper UC syntax then. The optionnumber then has to be 4+8+64+128 = -o204

Check the new FlexHubList!           Add awesome statistics like this for your hub!

This post is a natural product. The slight variations in spelling and grammar enhance its individual character and beauty and in no way are to be considered flaws or defects.

Offline massi

  • FlexHub Ambassador and Forum Stalker
  • *
  • 301
Re: Redirect
« Reply #2 on: June 15, 2011, 14:10:29 »
Thanks =)

Offline þ††i£øû]v[™

  • ***
  • 103
  • ::.(Ô;Ô).::
Re: Redirect
« Reply #3 on: July 19, 2011, 08:41:32 »
I dont understand, i have this withe this right clic cmd

1-dont run on first cmd
2-when i write on cc,  cmd run with the word i type on cc

Code: [Select]
[08:39:04] *** User command: <þ††i£øû]v[™> !set rd_main  truc
[08:39:08] <þØT€> *** !set rd_main  truc<þ††i£øû]v[™> m
[08:39:08] <þØT€> *** Succesfully set 'rd_main' from:  truc<þ††i£øû]v[™>   to:  truc<þ††i£øû]v[™> m

 My command : !addcmd redirectmenu -o332 -p10 -u10 "$UserCommand 1 3 _// Les þØT€š @ ƒiƒi™ •\Fixe Redirects\Main address$<%[mynick]> !set rd_main %[line:Main redirect address]&#124;|
$UserCommand 1 3 _// Les þØT€š @ ƒiƒi™ •\Fixe Redirects\Mini Slot$<%[mynick]> !set rd_minslots %[line:Min Slots redirect address]&#124;|
$UserCommand 1 3 _// Les þØT€š @ ƒiƒi™ •\Fixe Redirects\Mini Share$<%[mynick]> !set rd_minshare %[line:Min Share redirect address]&#124;|
$UserCommand 1 3 _// Les þØT€š @ ƒiƒi™ •\Fixe Redirects\Passive address$<%[mynick]> !set rd_passive %[line:Flood redirect address]&#124;|"


Thanks for help

I try to make the same cmd for !set ban_time ; its the same problem  :(
Greetings
« Last Edit: July 19, 2011, 08:43:30 by philoum »
þ††i£øû]v[™

Offline FlipFlop™

  • FlexHub Developer
  • *****
  • 505
Re: Redirect
« Reply #4 on: July 22, 2011, 10:08:49 »
You added newlines at the end of every command, they shouldn't be there, try this:

!addcmd redirectmenu -o332 -p10 -u10 "$UserCommand 1 3 _// Les þØT€š @ ƒiƒi™ •\Fixe Redirects\Main address$<%[mynick]> !set rd_main %[line:Main redirect address]&#124;|$UserCommand 1 3 _// Les þØT€š @ ƒiƒi™ •\Fixe Redirects\Mini Slot$<%[mynick]> !set rd_minslots %[line:Min Slots redirect address]&#124;|$UserCommand 1 3 _// Les þØT€š @ ƒiƒi™ •\Fixe Redirects\Mini Share$<%[mynick]> !set rd_minshare %[line:Min Share redirect address]&#124;|$UserCommand 1 3 _// Les þØT€š @ ƒiƒi™ •\Fixe Redirects\Passive address$<%[mynick]> !set rd_passive %[line:Flood redirect address]&#124;|"
Check the new FlexHubList!           Add awesome statistics like this for your hub!

This post is a natural product. The slight variations in spelling and grammar enhance its individual character and beauty and in no way are to be considered flaws or defects.

Offline þ††i£øû]v[™

  • ***
  • 103
  • ::.(Ô;Ô).::
Re: Redirect
« Reply #5 on: July 23, 2011, 03:24:37 »
yop Flip
its same error arf :(
Code: [Select]
[03:23:06] *** User command: <þ††i£øû]v[™> !set rd_main arraypotes.redirectme.net:888
[03:23:11] <þØT€> *** !set rd_main arraypotes.redirectme.net:888<þ††i£øû]v[™> m
[03:23:11] <þØT€> *** Succesfully set 'rd_main' from:  truc<þ††i£øû]v[™>  mto: arraypotes.redirectme.net:888<þ††i£øû]v[™>[b] m[/b]
if i dont write on main chat after command, nothing; and if i write the address of rediretc is arraypotes.redirectme.net:888<þ††i£øû]v[™> m
þ††i£øû]v[™

Offline FlipFlop™

  • FlexHub Developer
  • *****
  • 505
Re: Redirect
« Reply #6 on: July 23, 2011, 09:27:54 »
Works fine here, maybe you didn't reconnect to the hub after changing/adding the addcmd. The new/modified rightclicks are sent during login.
Check the new FlexHubList!           Add awesome statistics like this for your hub!

This post is a natural product. The slight variations in spelling and grammar enhance its individual character and beauty and in no way are to be considered flaws or defects.

Offline þ††i£øû]v[™

  • ***
  • 103
  • ::.(Ô;Ô).::
Re: Redirect
« Reply #7 on: July 24, 2011, 04:11:03 »
Hello;   Désolé ce n'est pas ça, je suis obligé de taper une lettre après avoir envoyé la commande pour voir un résultat qui est mauvais bien sur:
>>  redirect = test.org   + la lettre tapé
voila mon Flip
je ne sais pas pourquoi, effectivement les cmd me semblent correctes :)
pas grave, ce n'est pas très important ami
Bon dimanche et longue vie à Flex :D
greetings
                     
Code: [Select]
["redirectmenu"] = {
["iTimer"] = 0,
["iOptions"] = 332,
["iProfile"] = 10,
["sHelpText"] = "",
["iUseProfile"] = 10,
["iMaxProfile"] = 10,
["sContent"] = "$UserCommand 1 3 _// Les þØT€š @ ƒiƒi™ •\\Fixe Redirects\\Main address$<%[mynick]> !set rd_main %[line:Main redirect address]||$UserCommand 1 3 _// Les þØT€š @ ƒiƒi™ •\\Fixe Redirects\\Mini Slot$<%[mynick]> !set rd_minslots %[line:Min Slots redirect address]||$UserCommand 1 3 _// Les þØT€š @ ƒiƒi™ •\\Fixe Redirects\\Mini Share$<%[mynick]> !set rd_minshare %[line:Min Share redirect address]||$UserCommand 1 3 _// Les þØT€š @ ƒiƒi™ •\\Fixe Redirects\\Passive address$<%[mynick]> !set rd_passive %[line:Flood redirect address]||",}
« Last Edit: July 24, 2011, 04:12:48 by philoum »
þ††i£øû]v[™

Offline FlipFlop™

  • FlexHub Developer
  • *****
  • 505
Re: Redirect
« Reply #8 on: July 24, 2011, 22:28:39 »
The result you are showing from HubCommands.ini looks wrong, this is how it looks here:

Code: [Select]
["redirectmenu"] = {
["iTimer"] = 0,
["iOptions"] = 332,
["iProfile"] = 10,
["sHelpText"] = "",
["iUseProfile"] = 10,
["iMaxProfile"] = 10,
["sContent"] = "$UserCommand 1 3 _// Les þØT€š @ ƒiƒi™ •\\Fixe Redirects\\Main address$<%[mynick]> !set rd_main %[line:Main redirect address]&#124;|$UserCommand 1 3 _// Les þØT€š @ ƒiƒi™ •\\Fixe Redirects\\Mini Slot$<%[mynick]> !set rd_minslots %[line:Min Slots redirect address]&#124;|$UserCommand 1 3 _// Les þØT€š @ ƒiƒi™ •\\Fixe Redirects\\Mini Share$<%[mynick]> !set rd_minshare %[line:Min Share redirect address]&#124;|$UserCommand 1 3 _// Les þØT€š @ ƒiƒi™ •\\Fixe Redirects\\Passive address$<%[mynick]> !set rd_passive %[line:Flood redirect address]&#124;|",

Notice the &#124;| instead of ||
Check the new FlexHubList!           Add awesome statistics like this for your hub!

This post is a natural product. The slight variations in spelling and grammar enhance its individual character and beauty and in no way are to be considered flaws or defects.

Offline þ††i£øû]v[™

  • ***
  • 103
  • ::.(Ô;Ô).::
Re: Redirect
« Reply #9 on: July 25, 2011, 03:35:59 »
Oh!  yes sorry
thanks u FlipFlop
gretings


I do that :
Code: [Select]
["sContent"] = "$UserCommand 1 3 _// Les þØT€š @ ƒiƒi™ _/ Pour •[ %[user_name] ]•\\Fixe Temps de ban défaut$<%[mynick]> !set autoban_time %[line:Temps de ban par défaut]&#124;|",
:D
« Last Edit: July 25, 2011, 04:52:19 by philoum »
þ††i£øû]v[™