Erlang Mailing Lists

Author Message

<  Ejabberd mailing list  ~  chatroom logging notice

Guest
Posted: Tue Nov 21, 2006 6:45 am Reply with quote
Guest
I'm just looking for a few pointers before i dive into the code. Smile

Some of my users are concerned about the possibility that a muc room
may be logged. (our logs are easily available on a yaws webserver).

I would like to hack the muc code so that when joining a muc room that
has logging enabled, a message would be sent to the user. maybe something
like:

"Warning: This chatroom is logged, and the logs are public! see: *URL*
for more information."

...

Has anybody done something similar to this? And (before I dig into code)
can anybody point out the best place to add such functionality?

...

On a side note... I have been working on modifying the mod_presence code
to work under a Yaws server, with a web page (based on the shopping cart
demo code from the yaws distribution) where users can login and set the
presence preferences via the web in addition to the XForm based Service
Discovery method. (many of my users use JWChat or other clients that do
not yet support the Service method for configuring preferences..)

Is anybody else interested in such a mod_presence_yaws type module?

----
Carl Hayter
Information Technology Services
University of Southern California
(but working on: http://www.thejapanesepage.com learning site. Smile


Post recived from mailinglist
Guest
Posted: Tue Nov 21, 2006 8:47 am Reply with quote
Guest
Carl Hayter <hayter@usc.edu> writes:

> I'm just looking for a few pointers before i dive into the code. Smile
>
> Some of my users are concerned about the possibility that a muc room
> may be logged. (our logs are easily available on a yaws webserver).
>
> I would like to hack the muc code so that when joining a muc room that
> has logging enabled, a message would be sent to the user. maybe something
> like:
>
> "Warning: This chatroom is logged, and the logs are public! see: *URL*
> for more information."
>
> ...
>
> Has anybody done something similar to this? And (before I dig into code)
> can anybody point out the best place to add such functionality?

Spoiling all the fun for you, search for "This room is not anonymous"
in mod_muc_room.erl. Doing what you want should be analogous to
sending that message.

--
Magnus
JID: legoscia@jabber.cd.chalmers.se

_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post recived from mailinglist
Guest
Posted: Tue Nov 21, 2006 11:08 am Reply with quote
Guest
2006/11/21, Carl Hayter <hayter@usc.edu>:
> On a side note... I have been working on modifying the mod_presence code
> to work under a Yaws server, with a web page (based on the shopping cart
> demo code from the yaws distribution) where users can login and set the
> presence preferences via the web in addition to the XForm based Service
> Discovery method. (many of my users use JWChat or other clients that do
> not yet support the Service method for configuring preferences..)
>
> Is anybody else interested in such a mod_presence_yaws type module?

Yes, me!

It can be published on
http://ejabberd.jabber.ru/mod_presence
if you allow.
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post recived from mailinglist
Guest
Posted: Wed Nov 22, 2006 1:16 am Reply with quote
Guest
On Tue, Nov 21, 2006 at 09:46:51AM +0100, Magnus Henoch wrote:
>
> Spoiling all the fun for you, search for "This room is not anonymous"
> in mod_muc_room.erl. Doing what you want should be analogous to
> sending that message.

Sweet! That is about as close to perfect as possible. Thank you.

----
Carl Hayter
Information Technology Services
University of Southern California
(hacking for www.thejapanesepage.com)
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post recived from mailinglist
Guest
Posted: Wed Nov 22, 2006 1:32 am Reply with quote
Guest
On Tue, Nov 21, 2006 at 12:08:46PM +0100, Badlop wrote:
> 2006/11/21, Carl Hayter <hayter@usc.edu>:
> >On a side note... I have been working on modifying the mod_presence code
> >to work under a Yaws server, with a web page (based on the shopping cart
> >demo code from the yaws distribution) where users can login and set the
> >presence preferences via the web in addition to the XForm based Service
> >Discovery method. (many of my users use JWChat or other clients that do
> >not yet support the Service method for configuring preferences..)
> >
> >Is anybody else interested in such a mod_presence_yaws type module?
>
> Yes, me!
>
> It can be published on
> http://ejabberd.jabber.ru/mod_presence
> if you allow.

Cool, before that I want to post a URL to the code in the mailing list
so some more Erlang savvy people can maybe correct my extreemly poor
code. Smile

I had everything 'working' but went back and thought about it a little
more. I want to use Yaws rewrite to handle the presence requests with the
hope that will allow Yaws to cache the image files in memory instead of
reading them from disk everytime.

And my initial hack only supported a single server. I want to figure out
how to easily support multiple-servers on same host like ejabberd does.
So I need to look at some more of the current modules and figure out how
to configure via ejabberd.conf like I should. At the moment everything
about the server is hard coded in the files. Sad And I may be doing some
things in a really stupid way...

I've also hacked a simple Chatroom/User List web page for my users.
http://chat.thejapanesepage.com:5224/online_users.yaws

I'll try and get my code a little cleaner and put it up for review, after
that I'm more than happy to let it be posted on the ejabberd site if
it will be useful to somebody.

----
Carl Hayter
Information Technology Services
University of Southern California
(hacking for www.thejapanesepage.com)
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post recived from mailinglist
Guest
Posted: Wed Nov 22, 2006 2:44 am Reply with quote
Guest
On Tue, Nov 21, 2006 at 05:15:49PM -0800, Carl Hayter wrote:
<snip>

Just an update. I had to move the 'send_existing_presences' and
'send_new_presence' functions to be above the "warning message" sections
before it would work with Gaim. I don't know if this is a bug with Gaim
or ejabberd. Looking at the debug logs, it seemed that Gaim would ignore
any messages sent before it recieved the presence information...

case check_password(Affiliation, Els, StateData) of
true ->
NewState =
add_user_presence(
From, Packet,
add_online_user(From, Nick, Role, StateData)),
--> send_existing_presences(From, NewState),
--> send_new_presence(From, NewState),
if not (NewState#state.config)#config.anonymous ->

But otherwise... it works! Many thanks.

----
Carl Hayter
Information Technology Services
University of Southern California
(hacking for www.thejapanesepage.com)
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum