Author: dylan
Date: 2004-07-04 23:13:17 -0400 (Sun, 04 Jul 2004)
New Revision: 296

Modified:
   trunk/main/server/lib/Haver/Server/POE/Commands.pm
   trunk/main/server/lib/Haver/Server/POE/Connection.pm
Log:
Added OF and such.



Modified: trunk/main/server/lib/Haver/Server/POE/Commands.pm
===================================================================
--- trunk/main/server/lib/Haver/Server/POE/Commands.pm  2004-07-05 03:07:19 UTC 
(rev 295)
+++ trunk/main/server/lib/Haver/Server/POE/Commands.pm  2004-07-05 03:13:17 UTC 
(rev 296)
@@ -212,21 +212,21 @@
                my $users = $chan->list_ids('user');
                @msg = (
                        'IN', $heap->{scope}{cid},
-                       'MSG', $heap->{uid}, @$args,
+                       'OF', $heap->{uid}, 'MSG', @$args,
                );
                $kernel->post('Broadcaster', 'send', $users, [EMAIL PROTECTED]);
        } elsif ($heap->{scope}{uid}) {
                if (not ref $heap->{scope}{uid}) {
                        my $user = $Registry->fetch('user', 
$heap->{scope}{uid});
-                       $user->put(['MSG', $heap->{uid}, @$args]);
+                       $user->put(['OF', $heap->{uid}, 'MSG', @$args]);
                } else {
-                       my @msg = ( 'MSG', $heap->{uid}, @$args );
+                       my @msg = ( 'OF', $heap->{uid}, 'MSG', @$args );
                        $kernel->post('Broadcaster', 'send', 
$heap->{scope}{uid}, [EMAIL PROTECTED]);
                }
        } else {
                return unless check_perm_access($heap->{user}, 'global msg');
                my $users = $Registry->list_ids('user');
-               $kernel->post('Broadcaster', 'send', $users, ['MSG', 
$heap->{uid}, @$args]);
+               $kernel->post('Broadcaster', 'send', $users, ['OF', 
$heap->{uid}, 'MSG', @$args]);
        }
 }
 
@@ -247,7 +247,7 @@
                $user->add($chan);
                my $uids = $chan->list_ids('user');
                $kernel->post('Broadcaster', 'send', $uids,
-                       ['IN', $cid, 'JOIN', $heap->{uid}],
+                       ['IN', $cid, 'OF', $heap->{uid}, 'JOIN'],
                );
        } else {
                $kernel->yield('warn', ALREADY_JOINED => [$cid]);
@@ -265,7 +265,7 @@
        if ($user->contains('channel', $cid)) {
                my $chan = $Registry->fetch('channel', $cid);
                my $uids = $chan->list_ids('user');
-               $kernel->post('Broadcaster', 'send', $uids, ['IN', $cid, 
'PART', $uid]);
+               $kernel->post('Broadcaster', 'send', $uids, ['IN', $cid, 'OF', 
$uid, 'PART']);
                $chan->remove($user);
                $user->remove($chan);
        } else {

Modified: trunk/main/server/lib/Haver/Server/POE/Connection.pm
===================================================================
--- trunk/main/server/lib/Haver/Server/POE/Connection.pm        2004-07-05 
03:07:19 UTC (rev 295)
+++ trunk/main/server/lib/Haver/Server/POE/Connection.pm        2004-07-05 
03:13:17 UTC (rev 296)
@@ -109,7 +109,7 @@
                uid         => undef,
        );
 
-       $sock->put(['HAVER', 3, "line=2048"]);
+       $sock->put(['HAVER', 3, 2048]);
        $kernel->yield('want', 'IDENT',
                address     => $address,
                port        => $port,
@@ -264,7 +264,7 @@
                                push(@users, $chan->list_ids('user'));
                        }
                        my %users = map { ($_ => $_) } @users;
-                       my $msg = ['QUIT', $uid, @args];
+                       my $msg = ['OF', $uid, 'QUIT', @args];
                        $kernel->post('Broadcaster', 'send', [ keys %users ], 
$msg);
                }
                if ($user) {


Reply via email to