PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: [KATZ]ice on 20 February, 2005, 11:51:17

Title: Redirect script
Post by: [KATZ]ice on 20 February, 2005, 11:51:17
ok, together with some friends i run a network with about 7 hubs, now we want a hub that will redirect our users to the proper hub, kinda like spreading them evenly, so if the first hub is full, the user is redirected to the "redirect hub", then randomly send to an other hub, so like a kind of hub that just random redirects a user after 3 secs.

i don't think i'm the first one with this idea, so maybe there is already a script like that.

What would be nice, but that probally ain't posible, is that the hub it self check once every 15 mins, which hubs are online and running

Thx for all support

Cheers ICE
Title:
Post by: bastya_elvtars on 20 February, 2005, 12:50:52
The state of other hubs is kinda impossible to check thru the scripts... some pinging would do the trick thou  guess. For first step, I recommed HUbJump by Piglija: http://www.plop.nl/ptokaxbots/Piglja/hubjump.lua
Title: rite
Post by: [KATZ]ice on 20 February, 2005, 13:02:36
rite, that's what i mean, but now could it be done immeadiatly after someone joins...

well i dunno how to script .lua, but on IRC it would be somethin like

on *:join:hub:{
       !jump $nick
}

Assuming !jump randomly selects a hub to redirect the specified user

....

Cheers ICE
Title:
Post by: bastya_elvtars on 20 February, 2005, 13:08:19
gonna write a hubjumper for ya later ok?
Title:
Post by: Optimus on 20 February, 2005, 13:13:21
In robocop there is a option called random redirect. It works on amount of time or users.

It then changes redirect to another hub. You can use commands !addredirect, !delredirect, !showredirect to set all hubs into the list

- Optimus
Title:
Post by: [KATZ]ice on 20 February, 2005, 13:18:51
ok, gonna try that too then, i'll give you results

Cheers ICE
Title:
Post by: [KATZ]ice on 20 February, 2005, 14:05:27
works great, thx

cheers ICE
Title:
Post by: Optimus on 20 February, 2005, 14:13:58
yw
Title:
Post by: [KATZ]ice on 20 February, 2005, 15:30:22
hmm, after 33 user it stopped, i tried to fix it, but it din't work.

i got 5 adresses in the redirects, but it doesn't redirect, it does on login, but it states redirect too: then nothing, when i fill in a adress in Ptokax, it works again, but only to that adress, so a normal redirect. how do i make the hub chose the hubs i gave it?

Cheers ICE
Title:
Post by: Optimus on 20 February, 2005, 15:45:10
Try to set it on Time instead of users. see what happens
You have Random Redirect ticked in GUI?
Title:
Post by: [KATZ]ice on 20 February, 2005, 15:50:26
is time in minutes or seconds?

yeah, i did that

(http://www.picturehost.co.uk/free.one/redirect.JPG)

[15:53] The NetFounder Daan changed the redirect all new connections to: on

[15:53] *** Connected
[15:53] You are being redirected to
[15:53] *** Disconnected

Cheers ICE
Title:
Post by: ??????Hawk?????? on 20 February, 2005, 19:25:55
hi m8  

you might want to take a look here  


Network hub pinger redirect Manager (http://board.univ-angers.fr/thread.php?threadid=2061&boardid=12)


??????Hawk??????
Title:
Post by: [KATZ]ice on 20 February, 2005, 20:03:57
sweet man, thx

Cheers ICE