Ulysses Stuff > Suggestions
Something like motd for modlist
lpha:
Hello all,
I just want to add something on my server which can be useful for other persons.
At the moment, it is possible to add a windows for the motd by entering !motd in chat.
A lot of people add all their mod list in this motd.
I want to create something that when you enter !addons or !mod in chat, you have a similar windows that open the content of your installed_addons.txt (new file) in \addons\ulx.
Another thing would be the possibility of having a !rules command that open rules.txt in \addons\ulx
Thanks for your help ;D
WildWill:
Your looking for something like UMotd, I'm not sure if it's still working though. I think it's still broken. http://forums.ulyssesmod.net/index.php/topic,658.0.html
I haven't had the chance to test out anything as my PC is dead but anyone else have any input in this?
JamminR:
Umotd is in a coma for now.
I won't say it's dead, because it may be revived again some day.
But, for now, it's in a deep coma. Not on life support, brain activity is there, just very little. :)
Golden-Death:
Why not just make it? It's not some crazy GUI thing he's asking for, all he wants is a simple system.
I can't make it because my computers dead right now, and I don;t have gmod installed.
Could even just at the simplest have it read the folder names in /addons for the list.
JamminR:
Time, patience, mood.
For any projects I do, I really have to be in a programming mood.
For various reasons I don't wish to share, I just haven't been in the mood to update/remake Umotd.
As for actual technical challenge of reading the addons..No, it's not that difficult.
I'd already made unreleased Umotd code (before the Garry Gmod HTML update/our ULX release that outdated Umotd) that would read the addon name and author.
It was part of my Umotd Todo list.
--- Code: --- --ToDo: Get Addon list
function Umotd_GetAddons(Ufmt,Usep) -- fmt = long = Mod Name(version) description, short = Mod Name(version). sep = what to use as seperator.
local U_aloc = "../addons/"
local U_AddonDirs = file.FindDir(U_aloc .. "*")
local UAddRslt = false
for Uaid, Udir in pairs(U_AddonDirs) do
if file.Exists(U_aloc..Udir.."/info.txt") then
local UAddInfo = util.KeyValuesToTable(file.Read(U_aloc..Udir.."/info.txt"))
if not UAddRslt then
UAddRslt = UAddInfo["name"] .. "("..UAddInfo["version"]..")"
else
UAddRslt = UAddRslt..Usep..UAddInfo["name"] .. "("..UAddInfo["version"]..")"
end
if Ufmt == "long" then UAddRslt = UAddRslt .. " by [" ..UAddInfo["author_name"].."]"
end
end
end
return UAddRslt
end
local UAddons_long = Umotd_GetAddons("long",Umotd_AddOnSep1)
local UAddons_short = Umotd_GetAddons("short",Umotd_AddOnSep2)
--- End code ---
The above code example is raw, and can't be used without modification to adjust.
It has no error checking either. Feel free to use it in your own code. Try to give me a little credit if you do.
Navigation
[0] Message Index
[#] Next page
Go to full version