[ADD] Use actual OS as information

This commit is contained in:
lda 2025-02-12 16:47:48 +00:00
commit 71f3836ee1

View file

@ -9,6 +9,7 @@
#include <Matrix.h>
#include <AS.h>
#include <sys/utsname.h>
#include <string.h>
#include <ctype.h>
@ -583,13 +584,15 @@ IQGet(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
query = XMLCreateTag("query");
XMLAddAttr(query, "xmlns", "jabber:iq:version");
{
struct utsname info;
name = XMLCreateTag("name");
version = XMLCreateTag("version");
os = XMLCreateTag("os");
uname(&info);
XMLAddChild(name, XMLCreateText(NAME));
XMLAddChild(version, XMLCreateText(VERSION "[" CODE "]"));
XMLAddChild(os, XMLCreateText("POSIX-like"));
XMLAddChild(os, XMLCreateText(info.sysname));
}
XMLAddChild(query, name);
XMLAddChild(query, version);