]>
Dogcows Code - chaz/chatty/blob - extra/cometd/Meteor/Message.pm
2 ###############################################################################
4 # An HTTP server for the 2.0 web
5 # Copyright (c) 2006 contributing authors
10 # Meteor message object
12 ###############################################################################
14 # This program is free software; you can redistribute it and/or modify it
15 # under the terms of the GNU General Public License as published by the Free
16 # Software Foundation; either version 2 of the License, or (at your option)
19 # This program is distributed in the hope that it will be useful, but WITHOUT
20 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
24 # You should have received a copy of the GNU General Public License along
25 # with this program; if not, write to the Free Software Foundation, Inc.,
26 # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 # For more information visit www.meteorserver.org
30 ###############################################################################
32 package Meteor
::Message
;
33 ###############################################################################
35 ###############################################################################
39 ###############################################################################
41 ###############################################################################
44 # Create a new empty instance
55 # new instance from new server connection
57 my $self=shift-
>new();
61 $self->{'timestamp'}=time;
63 $self->{'text'}=$text;
65 $::Statistics-
>{'unique_messages'}++;
70 ###############################################################################
72 ###############################################################################
77 $self->{'text'}=$text;
86 my $channelName=shift || '';
88 $self->{'channel'}=$channelName;
100 shift-
>{'timestamp'};
105 shift-
>messageWithTemplate($::CONF
{'MessageTemplate'});
108 sub messageWithTemplate
{
113 if(!defined($1) || $1 eq '')
117 elsif(exists($self->{$1}))
131 ############################################################################EOF
This page took 0.048959 seconds and 5 git commands to generate.