PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: TheRevenge on 01 September, 2004, 19:14:06

Title: Search 2 Script's
Post by: TheRevenge on 01 September, 2004, 19:14:06
Hello,

i search with a script for jump in the network hub's, the user click with rightscript of the hub-addy and then he come in this hub or with other click open a new hub?

the other script is a problemscript. we have 3 network hub's, i search a script with den reguser updatet in the ptokax RegisteredUsers.dat with commands of the all hub's...


sorry for my english, i am german  ;)


TheRevenge

Regenbogen Netzwerk (http://regenbogen-netzwerk.com/wbb2)
Title:
Post by: nErBoS on 01 September, 2004, 21:51:57
Hi,

About the first script is possible to force a redirect to one of the addys. About the second i haven't understand it right, you want to update the registered list of every of your Hub network ??

Best regards, nErBoS
Title:
Post by: TheRevenge on 01 September, 2004, 22:04:07
yes i have see the first script with the commands jump, i don't find this script  :( the user jump from hub to hub...
i search two commands script, ...

1. jump
2. open new hub windows


the second script:

i search a script that when a op's a user registered of the hub 1, than he give a command and the script registered this user at the all hub's in the Network with the RegisteredUsers.dat

Thanks

TheRevenge
Title:
Post by: nErBoS on 02 September, 2004, 00:24:18
Hi,

Here is the first Script...

--## HUB-Addy Commands
--## Requeste by TheRevenge
--## Made by nErBoS

sBot = "Addy Bot"

arrAddy = {
["hub1.addy.com"] = "HUB1",
["hub2.addy.com"] = "HUB2",
["hub3.addy.com"] = "HUB3",
}

function Main()
frmHub:RegBot(sBot)
end

function NewUserConnected(user)
DoCommands(user)
end

OpConnected = NewUserConnected

function DataArrival(user, data)
if (strsub(data,1,1) == "<" or strsub(data,1,5+strlen(sBot)) == "$To: "..sBot) then
data = strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data, "%b<>%s+(%S+)")
if (cmd == "!addy") then
local s,e,addy = strfind(data, "%b<>%s+%S+%s+(%S+)")
if (addy == nil) then
user:SendPM(sBot, "Syntax Error, !addy , you must write a addy.")
else
user:SendData("$ForceMove "..addy.."|")
end
end
end
end

function DoCommands(user)
local addy,name
user:SendData("$UserCommand 255 |")
user:SendData("$UserCommand 0 3 |")
for addy, name in arrAddy do
user:SendData("$UserCommand 1 3 "..name.."$<%[mynick]> !addy "..addy.."||")
end
end

It can't open a new window because scripts don't have access to that. About second script, to do that we need a sotware to help, there is one HERE (http://hub-link.sourceforge.net/forum/) but isn't avaible for ptokax yet, the script isn't over.

Best regards, nErBoS
Title:
Post by: TheRevenge on 02 September, 2004, 01:13:03
thanks nErBoS,

this is that script where i search  ;)



TheRevenge


Regenbogen Netzwerk (http://www.regenbogen-netzwerk.com/wbb2)

Regenbogen Hub No.1 (dchub://regenbogen.no-ip.org:412)

Regenbogen Netzwerk 2 (dchub://regenbogen.redirectme.net)
Title:
Post by: BottledHate on 02 September, 2004, 05:06:50
it is possible to update the RegisteredUsers.dat to a
another hub using a network share. but the new user
won't get loaded into the hub until the hub is completly
restarted.

here is the sample code i used in titmouse to test:

UpdateFiles = {["TestHubname"] = "\\\\slut\\c$\\_ptokax\\registeredusers.dat"} --\\ 'slut' is the pcname...

function updateHubs(user)
   for k,v in UpdateFiles do
      print(v)
      local f,e = openfile( v, "a+" )
      if f then
         write(f, user )
         closefile(f)
         print("Update of "..user.." ok in "..k)
      end
   end
end

newUser = "bloop|test|1"
updateHubs(newUser)

i don't think it is a very good thing since it requires
 a full restart.

-BH