Hi.
Have some questions related to Lua scripts in DCDM++0.029.. (and other clients)
Is it possible to get the following fields to the lua script?? If. How?
Description
IP
Tag
Connection Type
Status
ISP
SPEED
Cheating Description
Is it Possible to call the command "/startchecking 1200000" or "/away" from a lua script??
and last.. but not less importent...
is it possible to change my own:
Connection Type
Description
Status
Tag (Version it says dc++ 0.401 all the time; Slots to 2 or 4)
QuoteOriginally posted by Flow84
Hi.
Have some questions related to Lua scripts in DCDM++0.029.. (and other clients)
Is it possible to get the following fields to the lua script?? If. How?
Description
IP
Tag
Connection Type
Status
ISP
SPEED
Cheating Description
the myinfostring is availeble, from that info you can grab the tag/connection type/status.
the rest isn't posible i think, not sure here and it might change in the future.
QuoteOriginally posted by Flow84 Is it Possible to call the command "/startchecking 1200000" or "/away" from a lua script??
no you can't trigger those commands but /away can be made in in scripted form 2.
beside this you can make your own /commands.
QuoteOriginally posted by Flow84 and last.. but not less importent...
is it possible to change my own:
Connection Type
Description
Status
Tag (Version it says dc++ 0.401 all the time; Slots to 2 or 4)
again a no.
and personaly i can't really see the need for this.
plop
Hi. thanks for your fast answer. :)
Quotethe myinfostring is availeble, from that info you can grab the tag/connection type/status.
how do i do that?
Quoteand personaly i can't really see the need for this.
if you want to run it like a bot its useful..
Connection Type = "BOT"
Description = "type of bot"
Status = dont know all values.. maybe not so useful..
Version in Tag = "Dont want to show this.. possible security risk"
Slots in Tag = "more neat if it could show 0"
QuoteOriginally posted by Flow84
Hi. thanks for your fast answer. :)
Quotethe myinfostring is availeble, from that info you can grab the tag/connection type/status.
how do i do that?
here's a old script i made 2 try sutch kind of thing, it kicks clients older then 0.304.
--// vim:ts=4:sw=4:noet
--//
--// the second argument decides in which order the scripts are run
--// use numbers when you need order, else you can just use a _unique_ identifier
VersionTable = {}
dcpp:setListener( "info", "minver",
function( hub, user, msg )
DC():PrintDebug(user:getNick().." from minversion script")
--if user:isOp() == nil then
local tmp = hub:getOpList()
if tmp[user:getNick()] == nil then
if VersionTable[user:getNick()] then
VersionTable[user:getNick()] = VersionTable[user:getNick()] +1
DC():PrintDebug("username: "..user:getNick().." number stored: "..VersionTable[user:getNick()])
if VersionTable[user:getNick()] >= 2 then
local s,e,tag=string.find(msg, "(%b<>)%$")
DC():PrintDebug("tag: "..tag)
local s,e,version=string.find(tag, "<%+%+%sV:([%d%.]+)")
DC():PrintDebug("version: "..version)
if tonumber(version) < 0.304 then
hub:sendChat("!kickuser "..user:getNick().." update your client")
end
end
else
VersionTable[user:getNick()]=1
DC():PrintDebug(user:getNick().." "..VersionTable[user:getNick()])
end
else
DC():PrintDebug(user:getNick().." is a op")
end
end
)
dcpp:setListener( "info", "onquit",
function( hub, user, msg )
DC():PrintDebug(user:getNick().." from minversion script, on quit part")
if VersionTable[user:getNick()] then
if VersionTable[user:getNick()] >= 2 then
VersionTable[user:getNick()] = nil
DC():PrintDebug(user:getNick().." removed from the table cause he left")
else
DC():PrintDebug(user:getNick().." funny stuff")
end
end
end
)
QuoteOriginally posted by Flow84 if you want to run it like a bot its useful..
Connection Type = "BOT"
Description = "type of bot"
Status = dont know all values.. maybe not so useful..
Version in Tag = "Dont want to show this.. possible security risk"
Slots in Tag = "more neat if it could show 0"
a good hub kicks you for those connection types or weird versions.
don't share anything with BCDC/DCDM solves the 0 slots, no share nothing 2 download.
plop