preventing muc-room-title mangling in ejabberd
ESL Developer Blog - - August 05, 2008ejabberd seems to think it is a good idea to put the number of room-members into the title, this will result in something like this:
My funky chatroom (5711)
This is quite nasty when you try to do something with that string, you either have to always cut away stuff using some nasty regular expression, or you have to query each rooms metadata respetively. First one is bad because of regular expressions and mangling with server output in general, second one is bad because of “performance” when you have A LOT of MUC-Rooms.
So i decided to grab the source and make this behaviour configurable, on a per room basis, but
also as a default option in the config file. Simply grab the source, replace your existing src/mod_muc/mod_muc_room.erl (this is ejabberd 2.0.1) and recompile. You now should have the option
modify_title
in every configuration form, and you can change it in ejabberd.cfg file using
{default_room_options, [{modify_title, false}]}
Default setting is “true”, which means everything is the same way as in ejabberd before, set to false the option will prevent ejabberd from putting any additional information into the MUC-Rooms title.
Download: mod_muc_room.erl
Patch: mod_muc_room_modify_title.patch
Categories: Blogs ESL Developer Blog
Comments
No comments so far, you could be the first.Add comment
Erlang on Twitter
» hnakamur2 (Hiroaki Nakamura): Erlang/OTPは“a true dream technology”とのことです。まだ仕事で使ったことはないけど、私も同感だなー。
[erlang-questions] The future of Erlang and BEAM http://t.co/QRR5w029
» setyawanSH (setyawan): Mbok ra koyok cah cilik ndra RT @Harindraa: Dewa erlang, dewi kuan’im, paman pikolo, paman kweceng, bibi lung, mbak yoona, mbak seohyun podo
» Harindraa (Haryndra Nugraha): Dewa erlang, dewi kuan’im, paman pikolo, paman kweceng, bibi lung, mbak yoona, mbak seohyun podo ning endi? Aku butuh sandaran :’(
» quantymt (高橋誠(MakotoTakahashi)): えwww!!!、erlangってソースが71MBもあるの?
» bestjobsonline (Best Jobs): Senior Erlang Engineer - relo to SF available - http://t.co/BaKJm1J3 #jobs #CyberCodersEngineering #NewYork
» agnesMRPS (A . M . R . P . S): @doni_erlang ora !
» agnesMRPS (A . M . R . P . S): @doni_erlang tlg y pke bhsa yg merakyat . Aku dk ngerti kw pke bhsa planet mna ? :p
» eComjobs (Henry James): Ecom Jobs USA Senior Erlang Developer - Principal Erlang Engineer - Erlang: IN-Indianapolis, CyberCode… http://t.co/9t8gRwA7 #ecomjobs
» agnesMRPS (A . M . R . P . S): @doni_erlang apaan si ? :p
» IccaAnnisaD (Annisa Dewi ♕): RT @ajengjeng_: ohehe bilangin ke ajil follow twitt aku + salam dari aku ;;) ahihi RT @IccaAnnisaD: lagi main sama erlang . aciee hahaha RT @ajengjeng_ : he
Statistics
Number of aggregated posts: 10456
Number of comments: 1446
Most recent article: February 06, 2012
Latest comments
» vindisesl on Pretend This Optimization Doesn't Exist: I completely agree with you. I really like this article. It contains a lot of useful information. I can set…
» simple smile on Scale means Skills: Very informative article. Pretty sure people would love to go to that place for shopping. Specially to those who are…
» simplesmile on 27 January 2012: Erlang Solutions embarks on an Erlang Embedded KTP: Your article will make the world better. Thanks again and good luck to you in your life. See you next time.simplesmile