a bot that can hide the tag for ops like in verlihub you can hide the dc++ tag for ops .. is that possible?
Try this 1 ...
--- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
--- OpTagHider v1
--- by Herodes
--- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
--- it hides the tag of the operators in the Hub .. ;o)
--- initialise a new table ...
ToSent = {}
--- when a new user or an op connects sent to him the changed myinfo's
function NewUserConnected(user)
-- for every stored entry in the table
for op, info in ToSent do
--- send the info to the user ...
user:SendData(info)
end
end
OpConnected = NewUserConnected
--- when an op disconnects delete his info from the storage table
function OpDisconnected(user)
--- if there is info on this op in the table ...
if ToSent[user.sName] then
--- nil it ...
ToSent[user.sName] = nil
end
end
--- when the hub receives a MyINFO then it has to get it disassembled and then store a newly assembled one ..
function DataArrival(user, data)
if strsub(data, 1,12) == "$MyINFO $ALL" and user.bOperator then
--- trim off the pipe "|"
data= strsub(data, 1, strlen(data)-1)
--- identify the MyINFO parts ...
s,e,descTag, con, email, share = strfind(data, "$MyINFO $ALL%s+"..user.sName.."%s+([^$]*)%$%s%$([^$]*)$([^$]*)%$([^$]*)%$")
--- split description and tag ...
local desc, tag = SplitTagDescr(descTag)
--store the new info in the table ..
ToSent[user.sName] = "$MyINFO $ALL "..user.sName.." "..desc.."--$ $"..con.."$"..email.."$"..share.."$|"
end
end
--- split the tag from the description the proper way ( watching for a "<" from the end to the start of the string ..
function SplitTagDescr(str)
local tag, descr, tTab = "", "", {}
--- get those letters in the tTab
for i= 1, strlen(str) do tTab[i] = strsub(str, i,i) end
--- move backwards until we find a "<"
local i = getn(tTab)
repeat
tag = tTab[i]..tag
i = i - 1
until tTab[i] == "<"
--- add the missing "<"
tag = "<"..tag
--- construct the description
for l = 1, i-1 do descr = descr..tTab[l] end
return descr, tag
end
ahh thank you it works fine :))
got this now
Syntax error: bad argument #1 to `strlen' (string expected, got nil)
stack traceback:
1: function `strlen' [C]
2: function `SplitTagDescr' at line 48 [file `...\PtokaX_0.330_15.25 zaturn\scripts\taghider.lua']
3: function `DataArrival' at line 38 [file `...\PtokaX_0.330_15.25 zaturn\scripts\taghider.lua']
Syntax error: bad argument #1 to `strlen' (string expected, got nil)
stack traceback:
1: function `strlen' [C]
2: function `SplitTagDescr' at line 48 [file `...\PtokaX_0.330_15.25 zaturn\scripts\taghider.lua']
3: function `DataArrival' at line 38 [file `...\PtokaX_0.330_15.25 zaturn\scripts\taghider.lua']
and another if an op connects again after i restart the scripts
the users can see his tag.. and its not untill the user reconnects the tag goes away.
QuoteOriginally posted by VAZ
and another if an op connects again after i restart the scripts
the users can see his tag.. and its not untill the user reconnects the tag goes away.
this is fixed .. there has been an edit to the script above ...
as far as the error is concerned .. pls findout the $MyINFO that did it ... I'll fix it as soon as it is found ... I suppose it is a user with no description ..but I need to be sure .. I'll do more tests as my time allows ..
ok will do thanks :)
Still does not work
First the orgiginal will be sent then the fake one, With many users in hub this is no good