welcome info not working - Page 3
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

welcome info not working

Started by [NL]trucker, 25 February, 2004, 14:59:15

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kepp

ah well, my misstake :D
Guarding    

[NL]trucker

#51
kepp

no prob

just another question

MINshare = frmHub:GetMinShare() / 1024

this has to show min share in hub but it isnt.
but it aint giving an error either

--------------------------------------------------------------------
Welcome pappa to ???? [NL] ????? ]-[?? [NL]
?-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-?

Your IP            ?         217.121.195.6
Your Share         ?         56.50 GB
Your Client         ?         DC++

Min share in hub         ?         0 GB
Min slots in hub         ?         2
Max slots in hub         ?         20
Max Hubs in hub         ?         50
Max users in hub         ?         200
Total users connected now      ?         70
Current share amount      ?         2.12 TB
Hub Uptime         ?         0 Days 9 hours 40 minutes 9 seconds

Online Ops                            ?         0
Online VIPs                           ?         0
Online Regs                           ?         0

?-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-

and i edited this line :
-----------------------------------
write(file,date("%x").." | "..i.." | "..v.." | "..client.." - <"..ver.."\n")
--------------------------------------------------------
 hope this is oke .
i added -%X to it and now it is showing the time also in iplog.


 function SaveIPS(user, client, ver)
local file = openfile(Logg,"w+")
   for i,v in LogIP do
      write(file,date("%x-%X").." | "..i.." | "..v.." | "..client.." - <"..ver.."\n")
   end
   closefile(file)
end

function WriteClone(user)
local file = openfile(CLONES,"a+")
   write(file,date("%x - %X").." - "..user.sName.." ["..user.sIP.."] tried to login with another nickname\n")
   closefile(file)
end

the log is now looking like this :
----------------------------------------------------
03/01/04-23:50:30 | [NL]--Liekerdjuh | 83.117.49.166 | DC++ - <0.306
03/01/04-23:50:30 | (NL)Karel12347 | 212.127.225.51 | DC++ - <0.306
-----------------------------------------------------


looks cool and clean :-))

Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


kepp

hmm, that i don't know :S

This is my info



Welcome kepp to [BOLINA]Test
?-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-?

Your IP            ?         127.0.0.1
Your Share         ?         21.47 GB
Your Client         ?         DC++

Min share in hub         ?         5 GB
Min slots in hub         ?         1
Max slots in hub         ?         10
Max Hubs in hub         ?         8
Max users in hub         ?         100
Total users connected now      ?         12
Current share amount      ?         875.29 GB
Hub Uptime         ?         9 Days 7 hours 57 minutes 21 seconds

Online Ops                            ?         0
Online VIPs                           ?         0
Online Regs                           ?         0

?-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-?


As you can see, it shows up, BUT, mine is disabled in PtokaX, and therefor must be some kind of a bug..

You want me to make it so you can set it up by yourself?
Guarding    

[NL]trucker

kepp

mines is disabled in pkotax 15,25 also cause my mainbot is robo and that one needs to have all the settings in pkotax disabled.


but got an error after a night of testing .

 Syntax error: attempt to perform arithmetic on local `share' (a nil value)
stack traceback:
   1:  function `ErrCorHandler' at line 118 [file `D:\==PTOTAX==\trucker\scripts\welcome.lua']
   2:  function `SendHubInfo' at line 134 [file `D:\==PTOTAX==\trucker\scripts\welcome.lua']
   3:  function `NewUserConnected' at line 162 [file `D:\==PTOTAX==\trucker\scripts\welcome.lua']
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


[NL]trucker

kepp is this oke?


------------------------------------------------------------------------
   share = share /1024/1024/1024
   share = format("%0.2f",share)
   MINshare = frmHub:GetMinShare() / 1024
   local SHAREa = format("%0.2f",(frmHub:GetCurrentShareAmount() / 1024 / 1024 / 1024))

      if strlen(SHAREa) <= 6 then
         SHAREa = SHAREa.." GB"
      else
         SHAREa = format("%0.2f",(SHAREa / 1024)).." TB"
      end
      days,hrs,min,sec = Syncro()
      return client,ver,MINshare,SHAREa,share,days,hrs,min,sec
   end
end

function SendHubInfo(user)
client,ver,MINshare,SHAREa,share,days,hrs,min,sec = ErrCorHandler(user)
local t = ""
   t = t.."\r\n\r\n"
   t = t.."Welcome "..user.sName.." to "..frmHub:GetHubName().."\r\n"
   t = t.."?-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-?
-----------------------------------------------------------------------

i changed his part :
--------------------------
share = share /1024/1024/1024
   share = format("%0.2f",share)
   MINshare = frmHub:GetMinShare() / 1024
------------------------------
to

share = share /1024/1024/1024
   share = format("%0.2f",share)
   Minshare = frmHub:GetMinShare() / 1024

and this :
-------------------------------

client,ver,MINshare,SHAREa,share,days,hrs,min,sec
   end
end
------------------------

to:
----------------------------
client,ver,Minshare,SHAREa,share,days,hrs,min,sec
   end
end

------------------------------

and this :
-----------------

function SendHubInfo(user)
client,ver,MINshare,SHAREa,share,days,hrs,min,sec = ErrCorHandler(user)


----------------------

to

----------------------------
function SendHubInfo(user)
client,ver,Minshare,SHAREa,share,days,hrs,min,sec = ErrCorHandler(user)
-----------------------------------

hope this solves a few :-))
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


kepp

i won't solve anything if share retuens nil;

update soon
Guarding    

[NL]trucker

kepp

lol i was referring to the MINshare values i changed them to Minshare in these lines

and after changing these i didnt get any errors anymore but still minshare is 0

perhaps better to make it selfadjustablle setting
although i rather go for the setting that takes it directly from hub but i,ll gues because i,m running robocop
that is out of the question.

grrrrrr.
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


kepp

QuoteOriginally posted by [NL]trucker
kepp

lol i was referring to the MINshare values i changed them to Minshare in these lines

and after changing these i didnt get any errors anymore but still minshare is 0

perhaps better to make it selfadjustablle setting
although i rather go for the setting that takes it directly from hub but i,ll gues because i,m running robocop
that is out of the question.

grrrrrr.

What im worried about is not that you chnaged them... not at all.. it's just that it should not matter..
about grabbing the share from PtokaX works as i said here, Mine is disabled because i let X-Ray take care of min share, though,  i have "5 GB" in the textbox, so if you keep that one on 0 then just change the amount and disable!! :)
Guarding    

[NL]trucker

kepp

i just did as you said and it is functioning now

i will let itt run and report back tomorrow to see if there aren,t any other errors.
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


[NL]trucker

well i thought i could post the script i use now

======================================

-- Request from [NL]Trucker
-- Origanally made by kepp
-- Modified and bugs fixed (Hopefully) by nErBoS
-- Hub Up time taken from skrolsters.... (Can't remember)
-- kepp fixed nErBoS small bug
-- Yet another bug fixed
-- Added Online Status of Op's Regs and VIPS
-- Several bugs fixed, Hoppefully new one's showed up :D
-- Added, A little client support..

--/ Bot Name
sBot = "=[[NL]?????]="


--/ Files / Folders
Logg = "OoOoOo/iplog.txt"
CLONES = "OoOoOo/clones.txt"

--/ If you use a DC++k client on your hub then enter the name of the client here
DCpp = "BadFilechecker"

--/ This one is the amount of connection that must be made before it saves to file
SaveIntervall = 2

--/ Set minimum Share
Minshare = 5
--/ Set minimum Slots
MINslots = 2
--/ Set Max Slots
MAXslots = 20
--/ Set max Hubs
MAXhubs = 50

--/ yes:no  Set to "yes" to enable welcome greetings

WELCOMEhubowner = "yes"
WELCOMEmaster = "yes"
WELCOMEop = "yes"
WELCOMEvip = "no"
WELCOMEuser = "yes"
WELCOMEDCpp = "yes"

--/ Configure your own messages for a normal user and the DC++k client
USERmsg = "-=-=-=- Welcome [USER], Your IP is [IP]"
DCPPmsg = "-=-=-=- The [USER] has entered the hub, Hide your bad files, HE HE HE HE :D -=-=-=-"

--/  All IPS in this table will be blocked from entering your hub
BlockIP = {
   ["24.50.199.138"]=1,
   ["24.30.199.200"]=2,
   ["213.17.210.95"]=3,
   ["213.122.194.182"]=4,
   ["212.181.76.156"]=5,
   ["213.118.127.62"]=6,
   ["213.118.127.62"]=7}

--/ HubOwner(s) name(s) and welcome messages
HubOwnerWlc = {
   ["pappa"]="Welcome back pappa please stay this time."}

--/ Master(s) name(s) and welcome messages
MASTERWlc = {
   ["[NL]Trucker"]   ="Put Away your bad files the master [NL]trucker has returned",
   ["Tequilla"]="Welcome o Great TeQuilla please feel at home",
   ["[NL]Mazda626"]="Welcome My fellow rider;[NL]Mazda626  let,s keep the roads clear of those drunk bastards here",
   ["[INT]masterload"]="Hehehe the great weed smoking and hasjh sniffing master;[INT]masterload is back !!"
}

--/ Operator(s) Name(s) and welcome messages
OPWlc = {
   ["[NL]Janeb"]="Welcome Janeb always nice to see you back on duty",
   ["[NL[fuego_gtx"]="Welcome Fuego_gtx just passing through in your high speed car?",
   ["[NL]Spikey"]="Watch and tremble the great Spikey has arrived",
   ["hhps"]="Welcome hhps be Aware dear User obey his command or feel his wrath "}

--/ VIP(s) and Welcome messages
VIPWlc = {
   ["kepp"]="Welcome kepp ;)",
   ["nErBoS"]="Welcome Message here",
   ["Skrolster"]="Welcome Message here",
   ["Tezlo"]="Welcome Message here"}

--/ Don't change anything below this point.

LogIP = {}
Clone = {}
OnlineOP = {}
OnlineVIP = {}
OnlineReg = {}
BeforeLog = 0
TIMERs = 0

function Main()
   frmHub:RegBot(sBot)
   SetTimer(1000*60*40)
   StartTimer()
end

function ErrCorHandler(user)
   if user.sMyInfoString ~= nil then
   local s,e,ver = strfind(user.sMyInfoString,"V:(%S+),M:")
   local s,e,share = strfind(user.sMyInfoString,"%$%s*(%d+)%$")
      if strfind(user.sMyInfoString,"<++") then
         client = "DC++"
      elseif strfind(user.sMyInfoString,"         client = "oDC"
      elseif strfind(user.sMyInfoString,"         client = "DC-GUI"
      elseif strfind(user.sMyInfoString,"<.P>") then
         client = "Phantom DC"
      elseif strfind(user.sMyInfoString,"         client = "Italian DC"
      elseif strfind(user.sMyInfoString,"         client = "Neo Modus DC"
      else
         client = "(N/A)"
      end
      if ver == nil then ver = "(N/A)" end

   share = share /1024/1024/1024
   share = format("%0.2f",share)
--   Minshare = frmHub:GetMinShare() / 1024
   local SHAREa = format("%0.2f",(frmHub:GetCurrentShareAmount() / 1024 / 1024 / 1024))

      if strlen(SHAREa) <= 6 then
         SHAREa = SHAREa.." GB"
      else
         SHAREa = format("%0.2f",(SHAREa / 1024)).." TB"
      end
      days,hrs,min,sec = Syncro()
      return client,ver,Minshare,SHAREa,share,days,hrs,min,sec
   end
end

function SendHubInfo(user)
client,ver,Minshare,SHAREa,share,days,hrs,min,sec = ErrCorHandler(user)
local t = ""
   t = t.."\r\n\r\n"
   t = t.."Welcome "..user.sName.." to "..frmHub:GetHubName().."\r\n"
   t = t.."?-=-=-=-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-=-=-=-?\r\n\r\n"
   t = t.."Your IP            \t?\t    "..user.sIP.."\r\n"
   t = t.."Your Share        \t?\t    "..share.." GB \r\n"
   t = t.."Your Client        \t?\t    "..client.."\r\n"
   t = t.."\r\n"
   t = t.."Min share in hub            \t?\t   "..Minshare.." GB\r\n"
   t = t.."Min slots in hub       \t?\t   "..MINslots.."\r\n"
   t = t.."Max slots in hub       \t?\t   "..MAXslots.."\r\n"
   t = t.."Max Hubs in hub          \t?\t"..MAXhubs.."\r\n"
   t = t.."Max users in hub       \t\t?\t"..frmHub:GetMaxUsers().."\r\n"
   t = t.."Total users connected now   \t?\t"..frmHub:GetUsersCount().."\r\n"
   t = t.."Current share amount       \t?\t"..SHAREa.."\r\n"
   t = t.."\r\n"
   t = t.."Hub Uptime               \t?\t\ "..days.." Days "..hrs.." hours "..min.." minutes "..sec.." seconds\r\n"
   t = t.."\r\n"
   t = t.."Online Ops                \t\t?\t\t   "..getn(OnlineOP).."\r\n"
   t = t.."Online VIPs               \t\t?\t\t   "..getn(OnlineVIP).."\r\n"
   t = t.."Online Regs               \t\t?\t\t   "..getn(OnlineReg)
   t = t.."\r\n\r\n"
   t = t.."?-=-=-=-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-=-=-=-?"
   T = t
   user:SendData(sBot,T)
end

function NewUserConnected(user)
   SendHubInfo(user)
   if LogIP[user.sName]==nil then
      LogIP[user.sName]=user.sIP
   end
   if BeforeLog == SaveIntervall then
      SaveIPS(user, client, ver)
      BeforeLog = 0
   else
      BeforeLog = BeforeLog + 1
   end
   if user.iProfile == -1 and (WELCOMEuser == "yes") then
      USERmsg = gsub(USERmsg,"%b[USER]",user.sName)
      USERmsg = gsub(USERmsg,"%b[IP]",user.sIP)
      user:SendData(sBot,USERmsg)
   elseif user.iProfile == 2 and (WELCOMEvip == "yes") and VIPWlc[user.sName] then
      SendToAll(sBot,VIPWlc[user.sName])
   end
   if Clone[user.sIP] then
      user:SendData(sBot,"There is allready someone with the same IP in this hub, You are now disconnected.")
      WriteClone(user)
      --user:Ban()    --// Are you sure about this?
      user:Disconnect()
   else
      Clone[user.sIP] = user.sName
   end
   if user.iProfile == 2 then
      if OnlineVIP[user.sName] == nil then
         OnlineVIP[user.sName] = 1;
   elseif user.iProfile == 3 then
      if OnlineReg[user.sName] == nil then
         OnlineReg[user.sName] = 1;
         end
      end
   end
end

function UserDisconnected(user)
   LogIP[user.sName]=nil;
   OnlineVIP[user.sName]=nil;
   OnlineReg[user.sName]=nil;
   if user.sName == Clone[user.sIP] then
      Clone[user.sIP] = nil;
   end
end

function OpConnected(user)
   SendHubInfo(user)
   if user.iProfile == 0 and (WELCOMEmaster == "yes") and MASTERWlc[user.sName] then
      SendToAll(sBot,MASTERWlc[user.sName])
   elseif user.iProfile == 1 and (WELCOMEop == "yes") and OPWlc[user.sName] then
      SendToAll(sBot,OPWlc[user.sName])
   end
   if HubOwnerWlc[user.sName] and (WELCOMEhubowner == "yes") then
      SendToAll(sBot,HubOwnerWlc[user.sName])
   elseif user.sName == DCpp and (WELCOMEDCpp == "yes") then
      DCPPmsg = gsub(DCPPmsg,"%b[USER]",DCpp)
      SendToAll(sBot,DCPPmsg)
   end
   if OnlineOP[user.sName]==nil then
      OnlineOP[user.sName] = 1;
   end
end

function OpDisconnected(user)
   OnlineOP[user.sName]=nil;
end

function DataArrival(user, data)
   if strsub(data,1,7)=="$MyINFO" then
      if BlockIP[user.sIP] then
         user:SendData(sBot,"Your IP is blocked in this hub.")
         user:Disconnect()
      end
   end
end

function Syncro()
   local sec = clock()
   local days = floor(sec/86400)
   local hrs = floor((sec-(days*86400))/3600)
   local min = floor((sec-(days*86400)-(hrs*3600))/60)
   sec = floor(sec-(days*86400)-(hrs*3600)-(min*60))
   return days,hrs,min,sec
end

function SaveIPS(user, client, ver)
local file = openfile(Logg,"w+")
   for i,v in LogIP do
      write(file,date("%x-%X").." | "..i.." | "..v.." | "..client.." - <"..ver.."\n")
   end
   closefile(file)
end

function WriteClone(user)
local file = openfile(CLONES,"a+")
   write(file,date("%x - %X").." - "..user.sName.." ["..user.sIP.."] tried to login with another nickname\n")
   closefile(file)
end


function OnTimer()
days,hrs,min,sec = Syncro()
   if TIMERs == 0 then
      Waiting_For_The_King()
      TIMERs = 1
   elseif TIMERs == 1 then
      TIMERs = 2
   elseif TIMERs == 2 then
      Waiting_For_The_King()
      TIMERs = 0
   end
end

function Waiting_For_The_King()
MINshare = frmHub:GetMinShare() / 1024
SHAREa = frmHub:GetCurrentShareAmount() / 1024 / 1024 / 1024
SHAREa = format("%0.2f",SHAREa)
local t = ""
   t = t.."\r\n\r\n"
   t = t.."?-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-?\r\n\r\n"
   t = t.."Min share in hub      \t?\t   "..MINshare.." GB\r\n"
   t = t.."Min slots in hub      \t?\t   "..MINslots.."\r\n"
   t = t.."Max slots in hub      \t?\t   "..MAXslots.."\r\n"
   t = t.."Max Hubs in hub      \t?\t   "..MAXhubs.."\r\n"
   t = t.."Max users in hub      \t?\t   "..frmHub:GetMaxUsers().."\r\n"
   t = t.."Total users connected now   \t?\t   "..frmHub:GetUsersCount().."\r\n"
   t = t.."Current share amount   \t?\t   "..SHAREa.." GB\r\n"
   t = t.."Hub uptime      \t\t\t?\t                 "..days.." Days "..hrs.." Hours "..min.." Sec "..sec
   t = t.."\r\n\r\n"
   t = t.."?-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-?"
   T = t
   SendToAll(sBot,T)
end

=======end================================================
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


[NL]trucker

#60
hmmmm

i did a hub reboot and nothing changed (:-

Welcome pappa to ???? [NL] ????? ]-[?? [NL]
?-=-=-=-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-=-=-=-?

Your IP               ?       217.121.195.6
Your Share           ?       56.50 GB
Your Client           ?       DC++

Min share in hub               ?      5 GB
Min slots in hub          ?      2
Max slots in hub          ?      20
Max Hubs in hub             ?   50
Max users in hub             ?   200
Total users connected now      ?   43
Current share amount          ?   1.41 TB

Hub Uptime                  ?    1 Days 10 hours 44 minutes 30 seconds

Online Ops                      ?         0
Online VIPs                     ?         0
Online Regs                     ?         0

?-=-=-=-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-=-=-=-?
[00:45:36] <=[guard]=>

i waited a few minuts before i reconnected again and still got no online OPs or Vip,s or REg,s

and hub uptime?

Hub Uptime                  ?    1 Days 10 hours 44 minutes 30 seconds

after a hubreboot??

or is this a total time? like up and running since foundation date??
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


kepp

ok, im rewrting the script now...

About the hub uptime, im not so very familiar with clock()
i think that is untill you close PtokaX itself, then it will reset!! i'll see if i can find another way of doing this..

Soon to come a new
Guarding    

[NL]trucker

#62
Kepp

thanks for your patience with me.

hubuptime stayd this way after a stop from pkotax hubsoft that is what i ment with hubreboot ,sorry had to be a bit more clear on that part.

edit:

Kepp perhaps you can get some idears from this:

http://board.univ-angers.fr/thread.php?threadid=1440&boardid=11&sid=579bd8b13817711a69f077accfb1883c
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


kepp

ok, no ideas are needed... ok, One was :)

The problem with the script not showing Online OPS are not a problem!

you see, try, 1. restartscript
2. reconnect
3. tell another OP to reconnect
4. then you reconnect again and see that 1 OP is Online.
Because everytime you reconnect you are out of the table again :O
Guarding    

kepp

Let's take a look at this!!

-- Bot Name
sBot = "OoOoOo"

-- Changeable Settings

sNetwork = "Network name"
sWebSite = "http://www.ourhub.com"
-- Files
fLogg = "OoOoOo/iplog.txt"
fClones = "OoOoOo/clones.txt"

sMinSlots = 1
sMaxSlots = 10
sMaxHubs = 8

-- Block clones, 0 = Disabled
sBlockClones = 1
-- if this is disabled the timmer will trigger at 40 minuts, else 80
sTriggerEight = 1

-- 1 = Yes/0 = no, Send Welcome message
sHubOwner = 1
sMaster = 1
sOp = 1
sVip = 1

--Messages
sUsrmsg = "Welcome [USER], Your IP is [IP]"

tWelcomeHubOwner = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

tWelcomeMaster = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

tWelcomeOp = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

tWelcomeVip = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

-- Don't chnage anything below this point
tLogIp = {}
tClone = {}
sOnlineOP = 0
sOnlineVIP = 0
sOnlineReg = 0
sBeforeLog = 0
sTimers = 0


function Main()
	frmHub:RegBot(sBot)
	SetTimer(1000*60*40)
	StartTimer()
end

function Send_Info(user)
a,b,c,sMode,ver,sClient = Client_Check(user)
sDays,sHrs,sMin,sSec = SynHubTime()
share,sMinShare,sCurShare = Arithmetic(user)
local t = ""
	t = t.."\r\n\r\n"
	t = t.."Welcome "..user.sName.." To "..frmHub:GetHubName().."\r\n"
	t = t.."?-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-?\r\n\r\n"
	t = t.."Information about you :\r\n"
	t = t.."Your IP		?		"..user.sIP.."\r\n"
	t = t.."Your Client	?		"..sClient.."\r\n"
	t = t.."Version		?		"..ver.."\r\n"
	t = t.."Mode		?		"..sMode.."\r\n"
	t = t.."Your share	?		"..share.."\r\n"
	t = t.."\r\n"
	t = t.."You are in "..a.." Hubs as a normal user\r\n"
	t = t.."You are in "..b.." ubs as a regged user\r\n"
	t = t.."You are in "..c.." Hubs as an OP user\r\n"
	t = t.."\r\n"
	t = t.."Hub Settings :\r\n"
	t = t.."Minimum share		?	"..sMinShare.."\r\n"
	t = t.."Minimum slots		?	"..sMinSlots.."\r\n"
	t = t.."Maximum slots		?	"..sMaxSlots.."\r\n"
	t = t.."Maximum hubs		?	"..sMaxSlots.."\r\n"
	t = t.."Maximum users		?	"..frmHub:GetMaxUsers().."\r\n"
	t = t.."\r\n"
	t = t.."Hub Statistic :\r\n"
	t = t.."Amount of users now	?	"..frmHub:GetUsersCount().."\r\n"
	t = t.."Total share amount		?	"..sCurShare.."\r\n"
	t = t.."Online OP's		?	"..sOnlineOP.."\r\n"
	t = t.."Online VIP's		?	"..sOnlineVIP.."\r\n"
	t = t.."Online Reg's		?	"..sOnlineReg
	t = t.."\r\n\r\n"
	t = t.."?-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-?"
	T = t
	user:SendData(sBot,T)
end

function Arithmetic(user)
	local s,e,share = strfind(user.sMyInfoString,"%$%s*(%d+)%$")
	share = format("%0.2f",(share / 1024 / 1024 / 1024))

	sMinShare = frmHub:GetMinShare() / 1024
	sCurShare = format("%0.2f",(frmHub:GetCurrentShareAmount() / 1024 / 1024 / 1024))
	if strlen(sCurShare) <= 6 then
		sCurShare = sCurShare.." GB"
	else
		sCurShare = format("%0.2f",(sCurShare / 1024)).." TB"
	end
	return share,sMinShare,sCurShare
end

function Client_Check(user)
--Ver,Client
	local s,e,ver = strfind(user.sMyInfoString,"V:(%S+),M:")
	local s,e,a,b,c = strfind(user.sMyInfoString,"H:(%d+)/(%d+)/(%d+)")
	if strfind(user.sMyInfoString,"<++") then
		sClient = "DC++"
	elseif strfind(user.sMyInfoString,"") then
		sClient = "Phantom DC"
	elseif strfind(user.sMyInfoString,"

This one will be updated instantly :)
Guarding    

kepp

-- Bot Name
sBot = "OoOoOo"

-- Changeable Settings

sNetwork = "Network name"
sWebSite = "http://www.ourhub.com"
-- Files
fLogg = "OoOoOo/iplog.txt"
fClones = "OoOoOo/clones.txt"

sMinSlots = 1
sMaxSlots = 10
sMaxHubs = 8

-- Block clones, 0 = Disabled
sBlockClones = 1
-- if this is disabled the timmer will trigger at 40 minuts, else 80
sTriggerEight = 1

-- 1 = Yes/0 = no, Send Welcome message
sHubOwner = 1
sMaster = 1
sOp = 1
sVip = 1

--Messages
sUsrmsg = "Welcome [USER], Your IP is [IP]"

tWelcomeHubOwner = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

tWelcomeMaster = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

tWelcomeOp = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

tWelcomeVip = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

-- Don't chnage anything below this point
tLogIp = {}
tClone = {}
sOnlineOP = 0
sOnlineVIP = 0
sOnlineReg = 0
sBeforeLog = 0
sTimers = 0


function Main()
	frmHub:RegBot(sBot)
	SetTimer(1000*60*40)
	StartTimer()
end

function Send_Info(user)
a,b,c,sMode,ver,sClient = Client_Check(user)
sUpTime = SynHubTime()
share,sMinShare,sCurShare = Arithmetic(user)
local t = ""
	t = t.."\r\n\r\n"
	t = t.."Welcome "..user.sName.." To "..frmHub:GetHubName().."\r\n"
	t = t.."?-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-?\r\n\r\n"
	t = t.."Information about you :\r\n"
	t = t.."Your IP		?		"..user.sIP.."\r\n"
	t = t.."Your Client	?		"..sClient.."\r\n"
	t = t.."Version		?		"..ver.."\r\n"
	t = t.."Mode		?		"..sMode.."\r\n"
	t = t.."Your share	?		"..share.."\r\n"
	t = t.."\r\n"
	t = t.."You are in "..a.." Hubs as a normal user\r\n"
	t = t.."You are in "..b.." ubs as a regged user\r\n"
	t = t.."You are in "..c.." Hubs as an OP user\r\n"
	t = t.."\r\n"
	t = t.."Hub Settings :\r\n"
	t = t.."Minimum share		?	"..sMinShare.."\r\n"
	t = t.."Minimum slots		?	"..sMinSlots.."\r\n"
	t = t.."Maximum slots		?	"..sMaxSlots.."\r\n"
	t = t.."Maximum hubs		?	"..sMaxSlots.."\r\n"
	t = t.."Maximum users		?	"..frmHub:GetMaxUsers().."\r\n"
	t = t.."\r\n"
	t = t.."Hub Statistic :\r\n"
	t = t.."Uptime			?	"..sUpTime.."\r\n"
	t = t.."Amount of users now	?	"..frmHub:GetUsersCount().."\r\n"
	t = t.."Total share amount		?	"..sCurShare.."\r\n"
	t = t.."Online OP's		?	"..sOnlineOP.."\r\n"
	t = t.."Online VIP's		?	"..sOnlineVIP.."\r\n"
	t = t.."Online Reg's		?	"..sOnlineReg
	t = t.."\r\n\r\n"
	t = t.."?-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-?"
	T = t
	user:SendData(sBot,T)
end

function Arithmetic(user)
	local s,e,share = strfind(user.sMyInfoString,"%$%s*(%d+)%$")
	share = format("%0.2f",(share / 1024 / 1024 / 1024))

	sMinShare = frmHub:GetMinShare() / 1024
	sCurShare = format("%0.2f",(frmHub:GetCurrentShareAmount() / 1024 / 1024 / 1024))
	if strlen(sCurShare) <= 6 then
		sCurShare = sCurShare.." GB"
	else
		sCurShare = format("%0.2f",(sCurShare / 1024)).." TB"
	end
	return share,sMinShare,sCurShare
end

function Client_Check(user)
--Ver,Client
	local s,e,ver = strfind(user.sMyInfoString,"V:(%S+),M:")
	local s,e,a,b,c = strfind(user.sMyInfoString,"H:(%d+)/(%d+)/(%d+)")
	if strfind(user.sMyInfoString,"<++") then
		sClient = "DC++"
	elseif strfind(user.sMyInfoString,"") then
		sClient = "Phantom DC"
	elseif strfind(user.sMyInfoString,"
Guarding    

kepp

You were right, i didn't show VIPS, regs nor ops

I had to go back to an OLD post to fix that ;)

-- Bot Name
sBot = "OoOoOo"

-- Changeable Settings

sNetwork = "Network name"
sWebSite = "http://www.ourhub.com"
-- Files
fLogg = "OoOoOo/iplog.txt"
fClones = "OoOoOo/clones.txt"

sMinSlots = 1
sMaxSlots = 10
sMaxHubs = 8

-- Block clones, 0 = Disabled
sBlockClones = 0
-- if this is disabled the timmer will trigger at 40 minuts, else 80
sTriggerEight = 1

-- 1 = Yes/0 = no, Send Welcome message
sHubOwner = 1
sMaster = 1
sOp = 1
sVip = 1

--Messages
sUsrmsg = "Welcome [USER], Your IP is [IP]"

tWelcomeHubOwner = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

tWelcomeMaster = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

tWelcomeOp = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

tWelcomeVip = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

-- Don't chnage anything below this point
tLogIp = {}
tClone = {}
sOnlineOP = {}
sOnlineVIP = {}
sOnlineReg = {}
sBeforeLog = 0
sTimers = 0


function Main()
	frmHub:RegBot(sBot)
	SetTimer(1000*60*40)
	StartTimer()
end

function Send_Info(user)
a,b,c,sMode,ver,sClient = Client_Check(user)
sUpTime = SynHubTime()
share,sMinShare,sCurShare = Arithmetic(user)
local t = ""
	t = t.."\r\n\r\n"
	t = t.."Welcome "..user.sName.." To "..frmHub:GetHubName().."\r\n"
	t = t.."?-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-?\r\n\r\n"
	t = t.."Information about you :\r\n"
	t = t.."Your IP		?		"..user.sIP.."\r\n"
	t = t.."Your Client	?		"..sClient.."\r\n"
	t = t.."Version		?		"..ver.."\r\n"
	t = t.."Mode		?		"..sMode.."\r\n"
	t = t.."Your share	?		"..share.."\r\n"
	t = t.."\r\n"
	t = t.."You are in "..a.." Hubs as a normal user\r\n"
	t = t.."You are in "..b.." ubs as a regged user\r\n"
	t = t.."You are in "..c.." Hubs as an OP user\r\n"
	t = t.."\r\n"
	t = t.."Hub Settings :\r\n"
	t = t.."Minimum share		?	"..sMinShare.."\r\n"
	t = t.."Minimum slots		?	"..sMinSlots.."\r\n"
	t = t.."Maximum slots		?	"..sMaxSlots.."\r\n"
	t = t.."Maximum hubs		?	"..sMaxSlots.."\r\n"
	t = t.."Maximum users		?	"..frmHub:GetMaxUsers().."\r\n"
	t = t.."\r\n"
	t = t.."Hub Statistic :\r\n"
	t = t.."Uptime			?	"..sUpTime.."\r\n"
	t = t.."Amount of users now	?	"..frmHub:GetUsersCount().."\r\n"
	t = t.."Total share amount		?	"..sCurShare.."\r\n"
	t = t.."Online OP's		?	"..getn(sOnlineOP).."\r\n"
	t = t.."Online VIP's		?	"..getn(sOnlineVIP).."\r\n"
	t = t.."Online Reg's		?	"..getn(sOnlineReg)
	t = t.."\r\n\r\n"
	t = t.."?-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-?"
	T = t
	user:SendData(sBot,T)
end

function Arithmetic(user)
	local s,e,share = strfind(user.sMyInfoString,"%$%s*(%d+)%$")
	share = format("%0.2f",(share / 1024 / 1024 / 1024))

	sMinShare = frmHub:GetMinShare() / 1024
	sCurShare = format("%0.2f",(frmHub:GetCurrentShareAmount() / 1024 / 1024 / 1024))
	if strlen(sCurShare) <= 6 then
		sCurShare = sCurShare.." GB"
	else
		sCurShare = format("%0.2f",(sCurShare / 1024)).." TB"
	end
	return share,sMinShare,sCurShare
end

function Client_Check(user)
--Ver,Client
	local s,e,ver = strfind(user.sMyInfoString,"V:(%S+),M:")
	local s,e,a,b,c = strfind(user.sMyInfoString,"H:(%d+)/(%d+)/(%d+)")
	if strfind(user.sMyInfoString,"<++") then
		sClient = "DC++"
	elseif strfind(user.sMyInfoString,"") then
		sClient = "Phantom DC"
	elseif strfind(user.sMyInfoString,"
Guarding    

[NL]trucker

#67
kepp

no error in script but this is result:

[23:05:16]

Welcome pappa To ???? [NL] ????? ]-[?? [NL]
?-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-?

Information about you :
Your IP      ?      xxx.xxx.xxx.
Your Client   ?      DC++
Version      ?      0.261
Mode      ?      Active
Your share   ?      56.50

You are in 0 Hubs as a normal user
You are in 13 ubs as a regged user =12 hubs
You are in 17 Hubs as an OP user   = 13 hubs

Hub Settings :
Minimum share      ?   0 <- still no go
Minimum slots      ?   2
Maximum slots      ?   20
Maximum hubs      ?   20
Maximum users      ?   200

Hub Statistic :
Uptime         ?   0 Days 4 Hours and 44 Minutes
Amount of users now   ?   51
Total share amount      ?   1.50 TB
Online OP's      ?   1 = 4
Online VIP's      ?   0 = tomuch ..lol
Online Reg's      ?   0 = tomuch

?-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-?
[23:05:16] Welcome back pappa


layout is great and info also :-)

perhaps if you tried this:

---------------------------------
?There are:       "..ProfileCounter("Master").." [MASTER] - "..ProfileCounter("Operator").." [OPERATOR] - "..ProfileCounter("Vip").." [VIP] online\r\n"
   
?There are now:      "..frmHub:GetUsersCount().." of "..frmHub:GetMaxUsers().." users Online\r\n"
-----------------------------------------------------------------------

i got thos from a piece of script by optimus out of the other threat i mentioned before.
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


kepp

lol, i just noticed myself...
update tomorow!

Did you have a look in the iplog.txt? lol...
the last person the get's in the table, the version of that person gets saved on everyone :S
Guarding    

[NL]trucker

#69
oepps

there is a error

Syntax error: bad argument #1 to `strfind' (string expected, got nil)
stack traceback:
   1:  function `strfind' [C]
   2:  function `Client_Check' at line 120 [file `D:\==PTOTAX==\trucker\scripts\kepss_welcome.lua']
   3:  function `NewUserConnected' at line 168 [file `D:\==PTOTAX==\trucker\scripts\kepss_welcome.lua']


these are the line 118 till 171.
----------------------------------------------------------------------
function Client_Check(user)
--Ver,Client
   local s,e,ver = strfind(user.sMyInfoString,"V:(%S+),M:")
   local s,e,a,b,c = strfind(user.sMyInfoString,"H:(%d+)/(%d+)/(%d+)")
   if strfind(user.sMyInfoString,"<++") then
      sClient = "DC++"
   elseif strfind(user.sMyInfoString,"      sClient = "Opera DC"
   elseif strfind(user.sMyInfoString,"      sClient = "Opera DC"
   elseif strfind(user.sMyInfoString,"      sClient = "DC-GUI"
   elseif strfind(user.sMyInfoString,"http://dc.ketelhot.de") then
      sClient = "DC-GUI"
   elseif strfind(user.sMyInfoString,"      sClient = "DC:PRO"
   elseif strfind(user.sMyInfoString,"<.P>") then
      sClient = "Phantom DC"
   elseif strfind(user.sMyInfoString,"      sClient = "NeoModus Direct Connect"
   else
      sClient = "(N/A)"
   end
   if strfind(user.sMyInfoString,"M:P") then
      sMode = "Passive"
   elseif strfind(user.sMyInfoString,"M:A") then
      sMode = "Active"
   else
      sMode = "(N/A)"
   end
   if a == nil then a = "(N/A)"
   elseif b == nil then b = "(N/A)"
   elseif c == nil then c = "(N/A)"
   end
   if ver == nil then
      ver = "(N/A)"
   end
   if a == nil then a = "(N/A)" end
   if b == nil then b = "(N/A)" end
   if c == nil then c = "(N/A)" end
   return a,b,c,sMode,ver,sClient
end

function SynHubTime()
SC = clock()
sUpTime = floor(SC/86400).." Days "..floor(mod(SC/3600,24)).." Hours and "..floor(mod(SC/60,60)).." Minutes"
   return sUpTime
end

function NewUserConnected(user)
a,b,c,sMode,ver,sClient = Client_Check(user)
if tLogIp[user.sName] == nil then
   tLogIp[user.sName] = user.sIP
end

----------------------------------

lol forgot to add a %X  so i just see name and ip and version but your right the verions are all the same :-))
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


kepp

ok...

-- Bot Name
sBot = "OoOoOo"

-- Changeable Settings

sNetwork = "Network name"
sWebSite = "http://www.ourhub.com"
-- Files
fLogg = "OoOoOo/iplog.txt"
fClones = "OoOoOo/clones.txt"

sMinSlots = 1
sMaxSlots = 10
sMaxHubs = 8

-- Block clones, 0 = Disabled
sBlockClones = 0
-- if this is disabled the timmer will trigger at 40 minuts, else 80
sTriggerEight = 1

-- 1 = Yes/0 = no, Send Welcome message
sHubOwner = 1
sMaster = 1
sOp = 1
sVip = 1

--Messages
sUsrmsg = "Welcome [USER], Your IP is [IP]"

tWelcomeHubOwner = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

tWelcomeMaster = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

tWelcomeOp = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

tWelcomeVip = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

-- Don't chnage anything below this point
tLogIp = {}
tClone = {}
sOnlineOP = {}
sOnlineVIP = {}
sOnlineReg = {}
sBeforeLog = 0
sTimers = 0


function Main()
	frmHub:RegBot(sBot)
	SetTimer(1000*60*40)
	StartTimer()
end

function Send_Info(user)
a,b,c,sMode,ver,sClient = Client_Check(user)
sUpTime = SynHubTime()
share,sMinShare,sCurShare = Arithmetic(user)
local t = ""
	t = t.."\r\n\r\n"
	t = t.."Welcome "..user.sName.." To "..frmHub:GetHubName().."\r\n"
	t = t.."?-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-?\r\n\r\n"
	t = t.."Information about you :\r\n"
	t = t.."Your IP		?		"..user.sIP.."\r\n"
	t = t.."Your Client	?		"..sClient.."\r\n"
	t = t.."Version		?		"..ver.."\r\n"
	t = t.."Mode		?		"..sMode.."\r\n"
	t = t.."Your share	?		"..share.."\r\n"
	t = t.."\r\n"
	t = t.."You are in "..a.." Hubs as a normal user\r\n"
	t = t.."You are in "..b.." Hubs as a regged user\r\n"
	t = t.."You are in "..c.." Hubs as an OP user\r\n"
	t = t.."\r\n"
	t = t.."Hub Settings :\r\n"
	t = t.."Minimum share		?	"..sMinShare.."\r\n"
	t = t.."Minimum slots		?	"..sMinSlots.."\r\n"
	t = t.."Maximum slots		?	"..sMaxSlots.."\r\n"
	t = t.."Maximum hubs		?	"..sMaxSlots.."\r\n"
	t = t.."Maximum users		?	"..frmHub:GetMaxUsers().."\r\n"
	t = t.."\r\n"
	t = t.."Hub Statistic :\r\n"
	t = t.."Uptime			?	"..sUpTime.."\r\n"
	t = t.."Amount of users now	?	"..frmHub:GetUsersCount().."\r\n"
	t = t.."Total share amount		?	"..sCurShare.."\r\n"
	t = t.."Online OP's		?	"..getn(sOnlineOP).."\r\n"
	t = t.."Online VIP's		?	"..getn(sOnlineVIP).."\r\n"
	t = t.."Online Reg's		?	"..getn(sOnlineReg)
	t = t.."\r\n\r\n"
	t = t.."?-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-?"
	T = t
	user:SendData(sBot,T)
end

function Arithmetic(user)
	local s,e,share = strfind(user.sMyInfoString,"%$%s*(%d+)%$")
	share = format("%0.2f",(share / 1024 / 1024 / 1024))

	sMinShare = frmHub:GetMinShare() / 1024
	sCurShare = format("%0.2f",(frmHub:GetCurrentShareAmount() / 1024 / 1024 / 1024))
	if strlen(sCurShare) <= 6 then
		sCurShare = sCurShare.." GB"
	else
		sCurShare = format("%0.2f",(sCurShare / 1024)).." TB"
	end
	return share,sMinShare,sCurShare
end

function Client_Check(user)
--Ver,Client
	local s,e,ver = strfind(user.sMyInfoString,"V:(%S+),M:")
	local s,e,a,b,c = strfind(user.sMyInfoString,"H:(%d+)/(%d+)/(%d+)")
	if strfind(user.sMyInfoString,"<++") then
		sClient = "DC++"
	elseif strfind(user.sMyInfoString,"") then
		sClient = "Phantom DC"
	elseif strfind(user.sMyInfoString,"
This shall solve the error atleast!

"Minimum share ? 0 <- still no go"

The script grabs the part from PtokaX, so don't blame me, Blame PtokaX :P

"You are in 13 ubs as a regged user =12 hubs"

my answer to that is : "WTF?? lol" Honestly, i have no idea, it's not possible

"Online OP's ? 1 = 4"

Again... As soon as you restartscripts all those 3 will be back to 0, so each op must reconnect and then it will show... (I Promisse)

the iplog.txt part will be fixed tomorow!!
until then, report bugs / errors
Guarding    

[NL]trucker

oke here we go :-))

sMinSlots = 1
sMaxSlots = 10
sMaxHubs = 8

info in main

---------------------------------------------------------------

[00:06:23]

Welcome pappa To ???? [NL] ????? ]-[?? [NL]
?-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-?

Information about you :
Your IP      ?      217.121.195.6
Your Client   ?      DC++
Version      ?      0.261
Mode      ?      Active
Your share   ?      56.50

You are in 0 Hubs as a normal user
You are in 15 Hubs as a regged user
You are in 16 Hubs as an OP user

Hub Settings :
Minimum share      ?   0
Minimum slots      ?   1
Maximum slots      ?   10
Maximum hubs      ?   10
Maximum users      ?   200

Hub Statistic :
Uptime         ?   0 Days 5 Hours and 45 Minutes
Amount of users now   ?   43
Total share amount      ?   1.26 TB
Online OP's      ?   1
Online VIP's      ?   0
Online Reg's      ?   0

?-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-?
[00:06:23] Welcome back pappa

howcome?

no error in scripteditor from pkotax sofar.

i will let it run overnight and see tomorrow if there is something changed.
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


kepp

i already see something weird :S

sMaxHubs = 8

Maximum hubs ? 10
Guarding    

kepp

-- Bot Name
sBot = "OoOoOo"

-- Changeable Settings

sNetwork = "Network name"
sWebSite = "http://www.ourhub.com"
-- Files
fLogg = "OoOoOo/iplog.txt"
fClones = "OoOoOo/clones.txt"

sMinSlots = 1
sMaxSlots = 10
sMaxHubs = 8

-- Block clones, 0 = Disabled
sBlockClones = 0
-- if this is disabled the timmer will trigger at 40 minuts, else 80
sTriggerEight = 1

-- 1 = Yes/0 = no, Send Welcome message
sHubOwner = 1
sMaster = 1
sOp = 1
sVip = 1

--Messages
sUsrmsg = "Welcome [USER], Your IP is [IP]"

tWelcomeHubOwner = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

tWelcomeMaster = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

tWelcomeOp = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

tWelcomeVip = {
	["kepp"]="Welcome message here.",
	["kepp2"]="Welcome msg here."}

-- Don't chnage anything below this point
tLogIp = {}
tClone = {}
sOnlineOP = {}
sOnlineVIP = {}
sOnlineReg = {}
sBeforeLog = 0
sTimers = 0


function Main()
	frmHub:RegBot(sBot)
	SetTimer(1000*60*40)
	StartTimer()
end

function Send_Info(user)
a,b,c,sMode,ver,sClient = Client_Check(user)
sUpTime = SynHubTime()
share,sMinShare,sCurShare = Arithmetic(user)
local t = ""
	t = t.."\r\n\r\n"
	t = t.."Welcome "..user.sName.." To "..frmHub:GetHubName().."\r\n"
	t = t.."?-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-?\r\n\r\n"
	t = t.."Information about you :\r\n"
	t = t.."Your IP		?		"..user.sIP.."\r\n"
	t = t.."Your Client	?		"..sClient.."\r\n"
	t = t.."Version		?		"..ver.."\r\n"
	t = t.."Mode		?		"..sMode.."\r\n"
	t = t.."Your share	?		"..share.."\r\n"
	t = t.."\r\n"
	t = t.."You are in "..a.." Hubs as a normal user\r\n"
	t = t.."You are in "..b.." Hubs as a regged user\r\n"
	t = t.."You are in "..c.." Hubs as an OP user\r\n"
	t = t.."\r\n"
	t = t.."Hub Settings :\r\n"
	t = t.."Minimum share		?	"..sMinShare.."\r\n"
	t = t.."Minimum slots		?	"..sMinSlots.."\r\n"
	t = t.."Maximum slots		?	"..sMaxSlots.."\r\n"
	t = t.."Maximum hubs		?	"..sMaxHubs.."\r\n"
	t = t.."Maximum users		?	"..frmHub:GetMaxUsers().."\r\n"
	t = t.."\r\n"
	t = t.."Hub Statistic :\r\n"
	t = t.."Uptime			?	"..sUpTime.."\r\n"
	t = t.."Amount of users now	?	"..frmHub:GetUsersCount().."\r\n"
	t = t.."Total share amount		?	"..sCurShare.."\r\n"
	t = t.."Online OP's		?	"..getn(sOnlineOP).."\r\n"
	t = t.."Online VIP's		?	"..getn(sOnlineVIP).."\r\n"
	t = t.."Online Reg's		?	"..getn(sOnlineReg)
	t = t.."\r\n\r\n"
	t = t.."?-=-=-=-=-=-=-=-=-? I N F O R M A T I O N ?-=-=-=-=-=-=-=-=-?"
	T = t
	user:SendData(sBot,T)
end

function Arithmetic(user)
	local s,e,share = strfind(user.sMyInfoString,"%$%s*(%d+)%$")
	share = format("%0.2f",(share / 1024 / 1024 / 1024))

	sMinShare = frmHub:GetMinShare() / 1024
	sCurShare = format("%0.2f",(frmHub:GetCurrentShareAmount() / 1024 / 1024 / 1024))
	if strlen(sCurShare) <= 6 then
		sCurShare = sCurShare.." GB"
	else
		sCurShare = format("%0.2f",(sCurShare / 1024)).." TB"
	end
	return share,sMinShare,sCurShare
end

function Client_Check(user)
--Ver,Client
	local s,e,ver = strfind(user.sMyInfoString,"V:(%S+),M:")
	local s,e,a,b,c = strfind(user.sMyInfoString,"H:(%d+)/(%d+)/(%d+)")
	if strfind(user.sMyInfoString,"<++") then
		sClient = "DC++"
	elseif strfind(user.sMyInfoString,"") then
		sClient = "Phantom DC"
	elseif strfind(user.sMyInfoString,"
Guarding    

[NL]trucker

kepp first scripterror


Syntax error: bad argument #1 to `strfind' (string expected, got nil)
stack traceback:
   1:  function `strfind' [C]
   2:  function `Client_Check' at line 120 [file `D:\==PTOTAX==\trucker\scripts\kep-info.lua']
   3:  function `NewUserConnected' at line 164 [file `D:\==PTOTAX==\trucker\scripts\kep-info.lua']
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


SMF spam blocked by CleanTalk