After being constantly pelted to change our Jabber/XMPP services from jabberd2 to ejabberd. We took a few hours of time and gone through with it once and for all.
“Thats gonna be easy”, was our first thought on it, “There are merge tools and such”. After testing the tools and running into problems with each of them(not merging at all, producing garbage output), we simply converted the information presented in the jabberd2 database to a ejabberd compatible format. Here is the sql we used to convert our database format: git.ring0.de
Okay the next problem was way worse then the first one. jabberd2 uses UNIX crypt() with salt for saving the passwords where as ejabberd uses plain text passwords by standard, hashes with hacking. As we are not really good with an old language like erlang we hacked ourselves something together. Mainly relying on the features (My)SQL provides us with. And here is the patch against ejabberd 2.1.2: git.ring0.de
Of course this version of the patch requires you to use MySQL with ejabberd therefore relying on the module from ejabberd.im But from this point on it’s easy to patch yourself some SQL together for other servers as well.
Vala 0.8 has been released on March 31th. Apart from the usual added bindings there are the following really awesome features:
void main(string[] argv) {
var number = argv[1].to_int();
message("number: %d", number);
if(1 < number < 10)
message("number is between 1 and 10");
}
void main(string[] argv) {
string msg = argv[1];
message("msg: %s", msg);
if(/foo.*bar/.match(msg))
message("string matches foo.*bar");
}
in
for arraysvoid main(string[] argv) {
if("--help" in argv)
message("You can't be helped!");
}
This is kind of secret (note: it has not been announced with the release). You can use the dova profile instead of the glib profile. The leightweight glib alternative can be enabled with “–profile=dova”, but it’s still in heavy development and lots of stuff won’t work. You can find out more about dova on gitorious.
Project is most likely dead some information about it can still be found on Gnome.
Welcome to a side product of ring0 development.
As our C version of our blog software is halted for now I took the opportunity, and fixed us up with some Vala CGI. Which is basicly displaying you nicely formated text files.
What this blog is all about is very simple: Displaying our progress in certain fields of development and solutions for uncommon issues with software. Also code snippets.
Have a nice day folks